All MicroEvals
read the full code. list every of any type error! just list ...
Create MicroEval

read the full code. list every of any type error! just list ...

Prompt

read the full code. list every of any type error! just list the results, nothing else. now critique your answer and fix the weak parts read the full code. list every of any type error! just list the results, nothing else. const INTERACTIONS_URL = "https://generativelanguage.googleapis.com/v1beta/interactions"; const FAST_MODEL = "models/gemini-3.8-flash"; const ADVISOR_MODEL = "models/gemini-3.1-pro-preview"; const CONSENSUS_MODELS = ["models/gemini-3.8-flash", "models/gemini-3.5-flash", "models/gemini-3.1-pro-preview"]; const TOOLS = [{ type: "code_execution" }, { type: "google_search" }, { type: "url_context" }]; export type SubagentResult = { status: "completed" | "error"; result: Record<string, unknown> }; function collectText(value: unknown, out: string[]): void { if (Array.isArray(value)) { for (const item of value) collectText(item, out); return; } if (!value || typeof value !== "object") return; const record = value as Record<string, unknown>; if (record.type === "text" && typeof record.text === "string") out.push(record.text); for (const key of ["outputs", "steps", "content", "parts"]) { if (key in record) collectText(record[key], out); } } async function interact(model: string, input: string, signal: AbortSignal): Promise<{ model: string; text: string }> { const key = process.env["GEMINI_API_KEY"]; if (!key) throw new Error("A GEMINI_API_KEY nincs beĂĄllĂ­tva."); let attempt = 0; for (;;) { const response = await fetch(INTERACTIONS_URL, { method: "POST", headers: { "x-goog-api-key": key, "Content-Type": "application/json" }, body: JSON.stringify({ model, input, tools: TOOLS, generation_config: { max_output_tokens: 65536, thinking_level: "high" } }), signal, }); const body = await response.text(); if (response.ok) { let parsed: unknown; try { parsed = JSON.parse(body); } catch { throw new Error(`${model}: Ă©rvĂ©nytelen vĂĄlasz.`); } const parts: string[] = []; collectText(parsed, parts); const text = parts.join("\n").trim(); if (!text) throw new Error(`${model}: ĂŒres vĂĄlasz.`); return { model, text }; } let message = body.slice(0, 500); try { const parsed = JSON.parse(body) as { error?: { message?: string } }; if (parsed.error?.message) message = parsed.error.message; } catch {} if ((response.status === 429 || response.status >= 500) && attempt < 2 && !/quota/i.test(message)) { attempt += 1; const wait = Number(response.headers.get("retry-after")) * 1000 || 2000 * 2 ** attempt + Math.random() * 1000; await new Promise((resolve) => setTimeout(resolve, wait)); continue; } throw new Error(`${model} (${response.status}): ${message}`); } } function errorResult(error: unknown): SubagentResult { return { status: "error", result: { code: "SUBAGENT_FAILED", message: error instanceof Error ? error.message : "Az alĂŒgynök hibĂĄval leĂĄllt." } }; } export async function delegateTask(task: string, context: string, signal: AbortSignal): Promise<SubagentResult> { try { const input = `ÖnĂĄllĂł alĂŒgynök vagy. Hajtsd vĂ©gre pontosan a rĂ©szfeladatot; kĂłdfuttatĂĄst, Google keresĂ©st Ă©s URL-olvasĂĄst hasznĂĄlhatsz. Adj tömör, ellenƑrzött eredmĂ©nyt magyarul, forrĂĄsokkal ha kerestĂ©l.\n\nKontextus:\n${context || "nincs"}\n\nRĂ©szfeladat:\n${task}`; const answer = await interact(FAST_MODEL, input, signal); return { status: "completed", result: { model: answer.model, answer: answer.text } }; } catch (error) { return errorResult(error); } } export async function consultAdvisor(question: string, context: string, signal: AbortSignal): Promise<SubagentResult> { try { const input = `SzakĂ©rtƑ tanĂĄcsadĂł vagy egy autonĂłm ĂŒgynök mellett. Elemezd a helyzetet, mutass rĂĄ hibĂĄkra Ă©s kockĂĄzatokra, Ă©s adj konkrĂ©t, sorrendbe ĂĄllĂ­tott javaslatot a tovĂĄbblĂ©pĂ©sre magyarul.\n\nHelyzet:\n${context || "nincs"}\n\nKĂ©rdĂ©s:\n${question}`; const answer = await interact(ADVISOR_MODEL, input, signal); return { status: "completed", result: { model: answer.model, advice: answer.text } }; } catch (error) { return errorResult(error); } } export async function multiModelConsensus(question: string, context: string, signal: AbortSignal): Promise<SubagentResult> { const input = `VĂĄlaszolj önĂĄllĂłan Ă©s indokolva magyarul a kĂ©rdĂ©sre; ellenƑrizd keresƑvel vagy kĂłddal, ahol lehet.\n\nKontextus:\n${context || "nincs"}\n\nKĂ©rdĂ©s:\n${question}`; const settled = await Promise.allSettled(CONSENSUS_MODELS.map((model) => interact(model, input, signal))); const answers = settled.flatMap((entry) => (entry.status === "fulfilled" ? [entry.value] : [])); const failures = settled.flatMap((entry) => (entry.status === "rejected" ? [entry.reason instanceof Error ? entry.reason.message : String(entry.reason)] : [])); if (!answers.length) return { status: "error", result: { code: "SUBAGENT_FAILED", message: "Egyik modell sem vĂĄlaszolt.", failures } }; try { const synthesisInput = `Több modell fĂŒggetlen vĂĄlaszĂĄt kaptad ugyanarra a kĂ©rdĂ©sre. HasonlĂ­tsd össze Ƒket: hol Ă©rtenek egyet, hol tĂ©rnek el, melyik Ă©rvelĂ©s erƑsebb. Adj vĂ©gsƑ, megalapozott konszenzusvĂĄlaszt Ă©s bizonyossĂĄgi szintet magyarul.\n\nKĂ©rdĂ©s:\n${question}\n\n${answers.map((answer, index) => `### ${index + 1}. vĂĄlasz (${answer.model})\n${answer.text}`).join("\n\n")}`; const synthesis = await interact(ADVISOR_MODEL, synthesisInput, signal); return { status: "completed", result: { consensus: synthesis.text, answers: answers.map((answer) => ({ model: answer.model, answer: answer.text })), failures } }; } catch (error) { return { status: "completed", result: { consensus: null, synthesis_error: error instanceof Error ? error.message : String(error), answers: answers.map((answer) => ({ model: answer.model, answer: answer.text })), failures } }; } } how to fix every error in one turn Your task is to take the provided plan and rewrite it as a single, comprehensive prompt. Write it as if you were about to update the entire upgrade from the current state of the implementation: describe step by step, from beginning to end, exactly what you will construct and how you will construct it. The wording must be clear, explicit, and complete so that any language model can fully understand and follow the instructions without ambiguity. Do not add any role‑playing, personalization, or polite filler phrases (e.g., ‘You are a software developer’, ‘As an expert’, ‘Please kindly’). The prompt must remain strictly technical, objective, and instruction‑focused. Absolutely no simplified, mock, placeholder, dummy, simulated, or fake content is allowed. You must require the full ugrade in complete, unabridged, production‑ready codes. Define what you want & what success looks like: “I want to [TASK] so that [SUCCESS CRITERIA].” No roles, “act as a senior expert.” That era is over.

Drag to resize
Drag to resize

Response not available

Drag to resize
Drag to resize
Drag to resize