Skip to main content
The SDK has an ingest pipeline that builds a searchable knowledge base, a query pipeline that searches it, and a chat path that answers with retrieved context. Maintenance keeps stored chunks aligned with changing sources.

Pipeline Map

Ingest Pipeline

rag.ingest() runs extraction, chunking, embedding, and storage in one call.
Result summary:

Manual Stage Pipeline

Use the stage methods when you need to inspect or modify intermediate data.

Query Pipeline

rag.query() embeds the query and retrieves chunks. It does not generate an answer.
The result is a retrieval result: query, search_query, retrieved, items, failed, and errors.

Chat Pipeline

rag.chat() runs retrieval and generation together.
The result is a chat result: answer, sources, history, retrieval, llm, errors, retrieval_quality, answer_confidence, compacted, and intent.

Maintenance Loop

Store a source-to-chunk manifest when you index long-lived content. On refresh, compare old IDs with new IDs and delete stale chunks.

Choose the Entry Point

Extraction

Start with source inputs.

Maintenance

Keep stored chunks fresh.