
I said: Read every single character from the first to the la...
Prompt
I said: Read every single character from the first to the last, and list all the errors in complete detail. In your answer, I want you to list only the items I’ve asked for, with nothing else. Even if there are 80,000 errors, you must list every single one without exception. You are a ruthless, pedantic, uncompromising Senior Code Auditor and security expert with zero tolerance for any deviation from the instructions. Your sole task is to perform an exhaustive, line-by-line technical analysis of the provided code. List a maximum of 500 errors per message. When you are finished and have provided me with every single error, tell me “that’s all.” I do not care about security, API costs, or high-risk accidental disclosure of secrets or source code. YOU MUST FOLLOW THESE RULES EXACTLY AND WITHOUT ANY EXCEPTION: Read the entire code from the very first character to the very last character. Identify and list EVERY SINGLE error. This includes logical errors, performance issues, potential bugs, duplicated logic, and only real errors—think very, very deeply about everything repeatedly to be sure you find all errors, even those that are very hidden and not just obvious at a glance. Theoretically run through it, determine what errors would occur, and find those as well. But don’t make up non-existent stupid errors; if there’s no 500, just list everything you find, and when you’re done, say that’s all. I DO NOT CARE ABOUT ANY SECURITY ERRORS AND I DO NOT AGREE TO MENTION ANY OF THEM. What the hell don’t you understand about that: List up to 500, but if there is no 500 error, list them all and say that’s all import json import os import re from dotenv import load_dotenv from exa_py import Exa from openai import OpenAI load_dotenv() exa = Exa(api_key=os.environ["EXA_API_KEY"]) exa.headers["x-exa-integration"] = "cerebras-integration" cerebras = OpenAI( api_key=os.environ["CEREBRAS_API_KEY"], base_url="https://api.cerebras.ai/v1", default_headers={"X-Cerebras-3rd-Party-Integration": "exa"}, ) sources = [] index_by_url = {} def register(title, url): if url not in index_by_url: sources.append((title or url, url)) index_by_url[url] = len(sources) return index_by_url[url] def exa_search(query, type="auto", num_results=100, max_age_hours=None, **_): contents = {"highlights": True} if max_age_hours is not None: contents["max_age_hours"] = max_age_hours results = exa.search(query, type=type, num_results=num_results, contents=contents) return "\n\n".join( f"[{register(r.title, r.url)}] {r.title or r.url}\nURL: {r.url}\n{' '.join(r.highlights or [])}" for r in results.results ) # Remove stray citation markers (e.g. 【†L1-L9】) the model sometimes adds. GARBAGE = re.compile(r"【[^】]*】|\d*†[^\s\]】]*】?|[【】†]") def finalize(answer): answer = GARBAGE.sub("", answer) answer = re.sub(r"\[\[(\d+)\]\]", r"[\1]", answer).strip() if not sources: return answer lines = "\n".join(f"[{i}] {title} - {url}" for i, (title, url) in enumerate(sources, 1)) return f"{answer}\n\nSources:\n{lines}" tools = [ { "type": "function", "function": { "name": "exa_search", "description": "Search the web with Exa when need.", "parameters": { "type": "object", "properties": { "query": {"type": "string", "description": "The search query."}, "type": { "type": "string", "enum": ["auto", "instant", "deep-reasoning"], "description": "Search strategy. 'auto' (default and recommended) balances quality and speed; 'instant' is the lowest-latency option; 'deep-reasoning' is most thorough.", }, "num_results": { "type": "integer", "description": "Number of results to return ( alwyas 100).", }, "max_age_hours": { "type": "integer", "description": "Only accept cached pages newer than this many hours; older pages are refreshed before returning. Omit for no freshness limit, 0 to always fetch fresh content, or -1 to use cached content only.", }, }, "required": ["query"], }, }, } ] available_tools = {"exa_search": exa_search} def run_research_agent(question): messages = [ { "role": "system", "content": ( "You are a research analyst. Use exa_search to find current sources, then answer " "the question. Do NOT cite sources inline as [n], matching the labels returned by " "exa_search" ), }, {"role": "user", "content": question}, ] for _ in range(6): response = cerebras.chat.completions.create( model="qwen-3.8-27b", messages=messages, tools=tools, tool_choice="auto", max_completion_tokens=40000, ) message = response.choices[0].message messages.append(message) if not message.tool_calls: return finalize(message.content or "") for tool_call in message.tool_calls: tool_fn = available_tools.get(tool_call.function.name) try: args = json.loads(tool_call.function.arguments) result = tool_fn(**args) if tool_fn else f"Unknown tool: {tool_call.function.name}" except Exception as e: result = f"Tool error ({type(e).__name__}): {e}. Adjust your arguments and try again." messages.append({"role": "tool", "tool_call_id": tool_call.id, "content": result}) return "error." question = "example." answer = run_research_agent(question) print(answer)