Skip to content

Agentic AI Architecture

RAG orchestration

The RAG engine performs clarification or multi-hop decomposition, query rewrite/expansion, parallel dense/sparse retrieval, Reciprocal Rank Fusion, optional Jina reranking, and streamed grounded generation. Multi-hop service tests and prompt/service modules evidence this as a retrieval orchestration system rather than a free-form autonomous agent.

flowchart TD
  classDef default fill:#1e293b,stroke:#38bdf8,stroke-width:2px,color:#f8fafc
  classDef highlight fill:#065f46,stroke:#34d399,stroke-width:2px,color:#f0fdf4
  Query["User question"]:::highlight --> Clarify["Clarify / multi-hop analysis"]
  Clarify --> Rewrite["Rewrite or expand query"]
  Rewrite --> Dense["Qdrant dense search"]
  Rewrite --> Sparse["Meilisearch keyword search"]
  Dense --> RRF["Reciprocal Rank Fusion"]
  Sparse --> RRF
  RRF --> Rerank["Optional reranker"]
  Rerank --> Prompt["Prompt with history/context"]
  Prompt --> Stream["LLM SSE stream"]
  linkStyle default stroke:#64748b,stroke-width:2px

Scoped agents/prompts

Project IDs choose domain instructions and retrieval boundaries. HS and concordance flows can fall back to model knowledge when their scoped corpus is empty; private dossier flows remain explicitly scoped to prevent public retrieval leakage. This fallback should be treated as lower-confidence than grounded retrieval.

Memory and observability

Redis stores sliding-window conversation memory with TTL and history limits. SSE payloads include answer content, citations, follow-up suggestions, retrieval diagnostics, stage timings, and trace events.