Back to components

AI Interfaces

Retrieval Query Planner

A preflight plan showing generated search queries, target sources, expected hits, and context cost.

retrievalqueriesrag

Installation

Copy and paste the code into your project.

Accessibility notes

The ordered list preserves query execution order and every source, hit count, and context estimate is readable text.

Retrieval plan

Quarterly risk brief

3 queries
  1. 1

    enterprise retention Q2

    Search Reports

    8 hits
  2. 2

    renewal risk signals

    Search CRM

    14 hits
  3. 3

    support escalation themes

    Search Tickets

    21 hits
Estimated context6.4k tokens

Preview accent

TypeScript
const queries = [{ text: "enterprise retention Q2", source: "Reports", hits: 8 }, { text: "renewal risk signals", source: "CRM", hits: 14 }, { text: "support escalation themes", source: "Tickets", hits: 21 }];

export function RetrievalQueryPlanner() {
  return <section className="w-full max-w-md rounded-xl border border-white/12 bg-[#0b0f14]/92 p-4 shadow-2xl">
    <header><p className="text-xs font-semibold uppercase tracking-[0.18em] text-[#40E0D0]">Retrieval plan</p><h3 className="mt-1 text-base font-bold text-white">Quarterly risk brief</h3></header>
    <ol className="mt-4 space-y-2">{queries.map((query, index) => <li key={query.text} className="grid grid-cols-[auto_1fr_auto] items-center gap-3 rounded-lg border border-white/9 p-3"><span>{index + 1}</span><div><p className="font-mono text-xs text-slate-200">{query.text}</p><p className="text-[0.65rem] text-slate-500">Search {query.source}</p></div><span className="text-[0.65rem]">{query.hits} hits</span></li>)}</ol>
  </section>;
}
Usage
<RetrievalQueryPlanner />

Related components

Retrieval health

Source freshness

1 stale
  • Product docsupdated 2h ago
  • Support indexupdated 3d ago
  • Policy archiveupdated 41d ago

Policy archive may reduce grounded-answer confidence until it is re-indexed.

AI Interfaces

Retrieval Freshness Gauge

Intermediate

A source-health view that highlights stale retrieval indexes before they weaken grounded answers.

retrievalfreshnessrag
View component

Retrieval health

Knowledge index

healthy
Product docs
Synced 2m ago
98%
Help center
Synced 1h ago
91%
Release notes
Synced 3d ago
76%

12,482 chunks indexed · 3 sources online

AI Interfaces

Retrieval Health Card

Intermediate

A source-level health summary for RAG indexes, sync freshness, and retrieval quality.

retrievalragobservability
View component

Context conflict

Resolve competing claims

2 sources
  • Pricing guide · v8Current

    Refund window: 30 days

  • Support article · 2024Stale

    Refund window: 14 days

Recommended: prefer v8 because it has the newer effective date and product-owner approval.

AI Interfaces

Context Conflict Resolver

Advanced

A grounded-answer control for comparing contradictory retrieved claims and choosing an authoritative source.

contextconflictretrieval
View component