Offline indexing: load documents, parse and clean them, split into chunks, enrich with metadata, embed the chunks, and store vectors (plus a keyword index) in a database.
Online query: take the user question, optionally rewrite it using chat history, embed it, retrieve candidates with hybrid search and permission filters, rerank, and select the top chunks within a token budget.
Generation: build a prompt containing instructions, the chunks (with source IDs) and the question; call the LLM; return the answer with citations.
Surrounding it: evaluation, caching, monitoring, security and an update pipeline that keeps the index fresh.
Loading…