Annie

KB Query Path

A question crosses the daemon proxy to Annie, retrieves chunks, and a provider chain generates the answer under a nested timeout budget.

KB Query Path (v2026-09-30T100759Z-5e473105f4) 2026-09-30 | A question crosses the daemon proxy to Annie, retrieves chunks, and a provider chain generates the answer under a nested timeout budget. 1 - QUERY PROCESSING - Query processing and retrieval kb_proxy_router.py POST /api/kb/query GET /api/kb/domains GET /api/kb/news GET /api/kb/academic retrieve() _get_collection() collection.query() evict_collection() ChromaDB .rag_store viai_knowledge query_embeddings query retrieved chun… 2 - GENERATION - Generation of the answer generate() _platform_embedding_function() OLLAMA_URL GROQ_URL Groq API GET /api/groq.com/openai/v1/chat/completions GROQ_API_KEY GROQ_MODEL Ollama http://localhost:11434 OLLAMA_MODEL OLLAMA_ENABLED chunks LLM request 1. Receive query 2. Retrieve chunks 3. Generate answer 4. Return response Query request payload {"query": "What is the capital of France?", "domain": "global_news"} LLM request payload {"model": "openai/gpt-oss-120b", "messages": [{"role": "user", "content": "What is the capital of France?"}]} The system uses environment variables for configuration, such as API keys and URLs. Ensure these are correctly set for the system to function. Legend actor = initiates work · process = code path · store = state on disk · bus = durable queue · dashed = separate process cyan = request flow · pink = state read/write · dashed green = pull / return path · red = refusal As of 2026-09-30 10:07 UTC, from commit 5e47310

Provenance

This drawing is generated, not drawn. It is rebuilt from the source files below, so when they change the picture changes — a diagram here cannot quietly describe a system that no longer works this way.

Owner
Annie
Slug
kb-query-path
Rendered
2026-09-30T100759Z
From commit
5e473105f4
Updated
30 Sep 2026, 10:07 UTC
Sources at
5e47310
Watches
2 paths
  • plugins/rag-router/rag_bridge.py
  • daemon/src/kb_proxy_router.py