← Artificial Intelligence Optimizer (AIO) All Artificial Intelligence Optimizer (AIO) Docs Multi-LLM Synthesis Specification Free Core (Beta) · ~13 KB

Multi-Frontier LLM Consultation & Synthesis Specification

Reusable .md playbook for querying multiple frontier LLMs through AIO (prepaid-first, X-AIO-Pin-Model: 1, smoke probes, reasoning-budget caps, independent Round 1 elicitation, disagreement mapping) to synthesize an answer better than any single model alone.

Purpose: Use Artificial Intelligence Optimizer (AIO) as a single local control gateway (http://127.0.0.1:14787) to ask multiple independent frontier LLMs for information, analysis, second opinions, and/or advice — then cross-examine disagreements and synthesize a final answer stronger than any individual model alone. Pairs With: AIO Communication Bus Architecture & HTTP API (127.0.0.1:14786), which lets different AI coders collaborate on the same goal and feed reviewed plans into implementation.


0. Why Ask Multiple Frontier LLMs Instead of One?

No single frontier model is uniformly strongest across architecture critiques, edge-case spotting, adversarial reasoning, quantitative analysis, and practical judgment. Asking one model leaves you exposed to its blind spots, silent assumptions, and tone biases.

Routing the same well-structured brief through AIO (http://127.0.0.1:14787) across 3 to 6 independent frontier models from different model families (for example Anthropic, OpenAI, Google Gemini, DeepSeek, Qwen, GLM, or Kimi) solves this structurally:


1. Pre-Flight Inventory & Prepaid-First Routing

Before sending any multi-model consultation batch through AIO:

  1. Discover active models & pricing modes:
     aioptimizer balance refresh && aioptimizer balance show
  1. Choose 3–6 diverse frontier slots across distinct families:
  1. Always pin explicit model calls:
  1. Never fail over prepaid calls onto paid wallets silently:

2. Lean Payload Preparation & Smoke-Probe Gate

Multi-model fan-outs amplify payload size by the panel size (N models × prompt_tokens). Prepare cleanly before launching:

  1. Strip formatting noise: Send clean Markdown or compact plain text only — strip HTML markup, CSS stylesheets, navigation boilerplate, and duplicated headers. Same text can tokenize roughly 1.5x–2x larger across different tokenizers, so keep context concise and targeted.
  2. Pass the identical brief to every model: Give every panelist the same facts, explicit constraints, and question framing so differences in output come from model reasoning, not inconsistent prompts.
  3. Run a ~20-token smoke probe first: Before sending a large dossier to every slot, send a lightweight sanity check (max_tokens=256 to 1024, simple prompt asking for a short READY line) and verify on every slot:

3. Reasoning-Budget Hygiene (Preventing Silent Truncation)

Reasoning-capable frontier models share max_tokens between hidden reasoning tokens and visible response text:


4. Stage 1 — Independent Parallel Elicitation (Anti-Groupthink)

Dispatch the exact same prompt in parallel to all N chosen frontier models with zero cross-visibility (none of the models sees what the others wrote).

Require every model to return the same five structured sections so downstream comparison and synthesis stay sharp:

  1. Direct Answer / Core Thesis: Concrete answer or recommendation upfront (avoid vague hedging).
  2. Key Facts, Evidence & Assumptions: Explicit factual basis and what is inferred vs. verified.
  3. Trade-Offs & Counter-Arguments: Strongest arguments against the model's own recommendation.
  4. Blind Spots, Failure Modes & Open Risks: What breaks first under real load, cost, security, or human constraints (with confidence notes).
  5. Concrete Actionable Changes: Ranked, specific edits, decisions, or verification checks.

Save each raw response separately (round1_<slot>_<model>.md) along with its finish_reason, token counts, and usage.cost.


5. Stage 2 — Disagreement Ledger & Optional Cross-Critique Panel

Once all Stage 1 responses arrive:

  1. Check spend between rounds: Run aioptimizer balance refresh && aioptimizer balance show before deciding whether a second round is warranted. Simple informational queries or aligned panels can jump directly to Stage 3 synthesis at $0 extra token cost.
  2. Build a Disagreement Ledger (no extra LLM call needed): List:
  1. Optional Round 2 — Targeted Cross-Critique (for high-stakes architecture or strategy decisions):
  1. Which disputes settle cleanly once primary evidence is checked?
  2. Which single minority objection from Round 1 is right and should override the majority?
  3. Which specific recommendation should be cut, kept, or refined?

6. Stage 3 — Grounded Synthesis Protocol (Better Than Any Model Alone)

Synthesizing is not averaging outputs or concatenating five essays into a wall of text. Follow four strict rules (whether performed by a human decision-maker or a lead AI controller):

  1. Verify concrete claims against primary reality: Before adopting any factual claim (API behavior, config path, command flag, benchmark number, or bug report) — even if all five models agreed on it — check actual source files, docs, or tool outputs. Unanimous model agreement never outweighs verified facts on disk.
  2. Preserve high-signal minority catches: Explicitly test any unique warning raised by just one model; often the highest value of a multi-model panel comes from one model spotting a subtle race condition, legal edge, or security leak.
  3. Decide trade-offs under real constraints: When models split on valid design alternatives, pick one coherent direction tailored to the user's stated goal, budget, and operational environment rather than stitching together contradictory advice.
  4. Emit an explicit Decision & Provenance Report:

7. Copy-Paste Specification Prompt & Minimal Python Pattern

A. Ready-to-Paste AI Orchestrator Prompt (.md)

Copy or point any capable AI coder / assistant at this block when asking multiple frontier LLMs through AIO:

Consult a diverse panel of 3–6 frontier LLMs through local AIO (http://127.0.0.1:14787) on the question/artifact below, cross-check disagreements, verify factual claims against primary sources, and synthesize one final answer stronger than any single model alone.

Rules:
1. Check GET http://127.0.0.1:14787/v1/models and run `aioptimizer balance refresh && aioptimizer balance show` first. Prefer live prepaid models (`pricing_mode="prepaid"`, `quota_exhausted=false`) ahead of paid wallets.
2. Pass `X-AIO-Pin-Model: 1` with explicit `"model"` on every `POST http://127.0.0.1:14787/v1/chat/completions` call. Never auto-fallback prepaid onto paid or blindly retry truncated paid calls.
3. Strip boilerplate to minimal plain text / Markdown. Run a 20-token smoke probe (`finish_reason == "stop"`, non-empty content) on every slot before sending full payload.
4. On paid OpenRouter reasoning models use `"reasoning": {"effort": "low"}` + `max_tokens: 16000–24000`; inspect `finish_reason`, `reasoning_tokens`, and `usage.cost`.
5. Run Stage 1 in parallel with zero cross-visibility requiring: Direct Answer, Evidence/Assumptions, Trade-Offs, Blind Spots/Risks, Concrete Recommendations.
6. Build a Disagreement Ledger (plus an optional Round 2 cross-critique if high-stakes disagreements remain, re-checking `balance show` between rounds).
7. Verify concrete factual claims directly against files/tools, preserve valid minority catches, reject hallucinations, and output one cohesive synthesis with model telemetry and reconciled cost (`aioptimizer costs show`).

B. Minimal Stdlib Python Pattern (Zero External Dependencies)

import json
import urllib.request

AIO_GATEWAY = "http://127.0.0.1:14787"

def ask_pinned_model(model: str, system_prompt: str, user_prompt: str, max_tokens: int = 16000) -> dict:
    payload = {
        "model": model,
        "messages": [
            {"role": "system", "content": system_prompt},
            {"role": "user", "content": user_prompt},
        ],
        "max_tokens": max_tokens,
        "reasoning": {"effort": "low"},
    }
    req = urllib.request.Request(
        f"{AIO_GATEWAY}/v1/chat/completions",
        data=json.dumps(payload).encode("utf-8"),
        headers={
            "Content-Type": "application/json",
            "X-AIO-Pin-Model": "1",
        },
        method="POST",
    )
    with urllib.request.urlopen(req, timeout=300) as resp:
        data = json.loads(resp.read().decode("utf-8"))
    choice = data["choices"][0]
    return {
        "model_returned": data.get("model", model),
        "finish_reason": choice.get("finish_reason"),
        "content": choice["message"]["content"],
        "usage": data.get("usage", {}),
    }

8. Pairing Frontier Synthesis With the AIO Communication Bus

This specification pairs directly with AIO's native Communication Bus (127.0.0.1:14786 — read architecture & HTTP reference):

  1. A lead AI coder (or controller session running under Antigravity, Claude Code, or a custom orchestrator) consults multiple frontier LLMs over AIO gateway 127.0.0.1:14787 using this protocol to lock down an architecture decision, editorial strategy, or security review.
  2. Once the synthesized plan resolves open risks and disagreements, the lead dispatches clean, file-disjoint work briefs over the AIO Communication Bus (127.0.0.1:14786) so multiple different AI coders execute in parallel toward the same goal and report verified results back deterministically.

Want a live walkthrough or evaluation setup for Artificial Intelligence Optimizer (AIO)? Message George Vranjesevic or reach out at george@developmentsnapshot.com.