HOW IT WORKS

Govern when agents search, when they answer, and what it cost. Governance is tuned on your query mix — not one-size-fits-all thresholds. Two decisions per request: how much to search (cost) and whether to answer (risk).

REQUEST PIPELINE

Swipe chart → to read full pipeline

cost routing risk gate audit trail

Blue steps route spend. Gold steps gate risk. Both paths end with an audit_id and structured policy reasons.

TWO DECISIONS (DO NOT CONFLATE)

Probe / fanout — cost router

Scores the first result batch, then decides whether to fan out. Starting defaults: 1 query above ~78% probe score, up to 3 above ~55%, full fanout below — derived from our 125-task Tavily benchmark corpus, not tuned for your tenant out of the box.

Thresholds are overrideable per deployment. Calibrate on your logs (below) before trusting them in production.

Policy / allow_answer — risk gate

Runs on whatever evidence was retrieved. Checks overall confidence, qualifying source count, authority, and conflicts.

This is what legal and compliance stakeholders review — independent of probe routing.

SYNTHESIS CONTRACT

Retrieval governance is not enough if the agent layer free-formats answers. Every cleared response is wrapped in a synthesis contract (also returned as synthesis_contract JSON on POST /evidence):

REQUIREDWHAT THE AGENT GETS
CitationsClaim + URL/title + per-source confidence and authority
Uncertainty statementHigh / moderate / low band derived from overall confidence
Conflict disclosuresEach detected disagreement with confidence and authority gap
No-answer phrasingPreset-specific lead when allow_answer: false (legal, support, research variants)

Your agent should render synthesis_contract.body or map the structured fields directly — not paraphrase from raw retrieval snippets.

CONFLICT DETECTION & RESOLUTION

Detection: pairwise compare qualifying evidence items. When title-token overlap is high and snippet polarity diverges (positive vs negative framing), we record a Conflict with confidence (max of the two items) and authority gap.

RULEDEFAULT THRESHOLDACTION
High-confidence conflict conflict ≥ 65% (legal: 60%) block — opposing claims too strong to clear
Low-confidence conflict conflict ≤ 45% (research: 50%) search_more — retrieve before answering
Authority-tier conflict authority gap ≥ 20% (support: 15%) escalate — human review across source tiers

When multiple rules fire, the strictest action wins (block > escalate > search_more). legal blocks on high-confidence conflicts; support escalates; research warns but still allows (unless confidence or source-count thresholds fail).

POLICY PRESETS

Start with a named preset. Override thresholds via YAML or API for your workload.

CHOOSING A PRESET (POST /policy/evaluate)

Partners bring their own retrieval (Tavily, Exa, internal RAG, etc.). Query Fanout scores each chunk’s URL for authority and applies the preset you pass. You do not set min_authority per request on the hosted API — pick the preset, optionally add authority_overrides for internal doc hosts.

Authority overrides: one-time domain patterns in your integration, e.g. {"internal://filing": 0.92}. Match how you label chunk URLs. Include a url on every source — empty URLs score 40%.

QUALIFYING SOURCES (WHY LEGAL BLOCKS)

Policy does not count raw search hits. It counts qualifying sources after our evidence pass:

That is why legal can block at “2 qualifying sources; minimum is 3” even when the search API returned more raw results.

Legal block rates are from a controlled web-search benchmark with default policy thresholds — illustrative of gating behavior, not a compliance certification or production SLA.

SOURCE AUTHORITY (V0)

Each evidence item gets an authority score from the result URL’s domain — a fixed tier table, not PageRank or a legal citation graph. Scores are attached in the audit trail and returned on POST /evidence citations.

DOMAIN PATTERNAUTHORITYBAND
courtlistener.com97%institutional
law.cornell.edu96%institutional
*.gov95%institutional
gov.uk94%institutional
legislation.gov.uk94%institutional
eur-lex.europa.eu93%institutional
europa.eu92%institutional
justia.com92%institutional
canlii.org90%institutional
findlaw.com90%institutional
nature.com90%institutional
ncbi.nlm.nih.gov90%institutional
who.int90%institutional
arxiv.org88%institutional
austlii.edu.au88%institutional
bailii.org88%institutional
iso.org88%institutional
*.edu86%institutional
aicpa.org85%institutional
pci.org85%institutional
wikipedia.org84%reference
owasp.org82%reference
britannica.com78%reference
github.com75%official docs / community
anthropic.com72%official docs / community
cloud.google.com72%official docs / community
developer.mozilla.org72%official docs / community
docs.aws.amazon.com72%official docs / community
docs.langchain.com72%official docs / community
kubernetes.io72%official docs / community
learn.microsoft.com72%official docs / community
openai.com72%official docs / community
python.org72%official docs / community
stackoverflow.com72%official docs / community
all other domains55%default web
missing URL40%missing URL

Bands: institutional (85%+) for courts, .gov, journals, and .edu; reference (78–84%) for Wikipedia and encyclopedias; official docs (72%) for vendor documentation your agents hit daily; everything else defaults to 55% (most blogs, forums, SEO).

How policy uses it: after qualifying-source filtering, we take the highest authority among remaining items and compare it to the preset’s min_authority (e.g. 75% on legal). Official docs at 72% improve research / support confidence but do not clear legal on a single source. Conflict detection can escalate when disagreeing sources sit in different authority tiers (gap ≥ 15–20%).

How confidence uses it: authority is 25% of per-item confidence (alongside cross-query consensus, query–snippet relevance, and provider score). A blog or vendor URL at 55% authority can still contribute to source count but may fail a legal gate on its own.

What you can tune today: raise or lower min_authority per preset, or add tenant-specific authority_overrides in policy YAML or on POST /evidence. Overrides use the same host/suffix matching as the table above and always win over built-in tiers (longest suffix wins among overrides).

policy:
  name: legal
  min_authority: 0.75
authority_overrides:
  docs.acme.com: 0.90
  help.acme.com: 0.82

Heuristic defaults for explainability, not a compliance certification. General web search results cluster at 55%; that is why live legal benchmarks block heavily on authority even when retrieval spend is low.

PRESETMIN CONFMIN SOURCESMIN AUTHON FAILUSE CASE
default 50% 1 allow General agents; returns draft synthesis tagged as not policy-cleared
support 60% 2 escalate Customer support; hand off to human when thin evidence
legal 70% 3 75% block Legal / compliance; blocks on conflict; no answer if bar not met
research 55% 2 search_more Internal research; expand retrieval instead of hard-blocking
calibrated 55% 2 50% allow + tag Draft / internal tools — always answers with confidence band + policy warnings, never hard-blocks

Thresholds should be tuned on your query mix. Run the offline benchmark locally, or send 3–7 days of JSONL logs for a design-partner autopsy (48h report).

Example block response (legal preset):

{
  "allow_answer": false,
  "audit_id": "99c08409-28ec-4427-...",
  "policy": {
    "profile": "legal",
    "action": "block",
    "reasons": ["only 2 qualifying source(s); minimum is 3"]
  }
}

FAILURE MODES (UPFRONT)

False block (too strict)

Legal preset blocks a helpful support answer because evidence is thin or authority scores are low.

Mitigation: use support + escalate, lower min_sources in YAML, or run an autopsy to measure block rate on real queries.

Over-spend (probe too cautious)

Probe scores low on a factual query and fans out to 5 searches when 1 would suffice — policy may still allow the answer, but you paid extra.

Mitigation: calibrate probe thresholds on your corpus; autopsy quantifies over-search patterns by agent.

Under-search (probe too aggressive)

Probe stays at 1 query; evidence is thin; policy escalates or blocks. Spend is low but allow_answer is false — correct for risk, frustrating if preset is wrong for the workflow.

CALIBRATION PATHS

You do not need to send production logs to start evaluating the architecture.

PATHTRUST REQUIREDWHAT YOU GET
Offline benchmark None — runs locally python examples/gaia-baseline/run_benchmark.py --demo — mock backend, instant naive vs governed diff. Wikipedia + legal preset blocks 4/12 tasks in our published demo set.
CLI autopsy Your machine only query-fanout-validate-logs + query-fanout-autopsy on any JSONL export — no hosted upload.
Design-partner autopsy Send redacted logs 48h report: spend model, block/escalate patterns, recommended preset thresholds for your agents.

Published live benchmark: 125 production-style tasks, 625→173 searches (~72% reduction) on Tavily — see field study and landing stats. Numbers vary by corpus; treat as reference, not a SLA.

SEARCH PROVIDERS

Tavily is our reference benchmark preset. The control plane sits above your search API:

Policy, audit, and allow_answer are provider-agnostic. Swap the adapter; keep the governance layer.

CONFIGURATION & PRECEDENCE

METHODWHONOTES
API param policy=legalApp engineersNamed preset on POST /evidence
YAML policy_filePlatform / complianceWins over policy= when both are set — deterministic override
Hosted dashboardOperators/dashboard — read-only audit metrics; does not change policy

Precedence: policy_file (YAML) > policy API param > preset defaults. Set one source of truth per environment to avoid surprises.

from query_fanout import RetrievalClient

client = RetrievalClient(preset="tavily", policy="legal", agent_id="support-bot")
report = await client.retrieve("How do refund policies work?")

if report.allow_answer:
    answer(report.synthesis)
else:
    escalate(report.audit_id, report.policy.reasons)

Need soft answers instead of hard blocks? Use calibrated for draft generation (confidence band + warnings, always allow_answer: true), default for permissive general use, or research to expand retrieval before failing.

Ready with logs? Autopsy submission guide · autopsy@queryfanout.dev