Skip to main content
Ragrails has two main pipelines: an ingest pipeline that builds a searchable knowledge base, and a query pipeline that searches it or answers with chat. Maintenance keeps the stored knowledge base aligned with source changes.

Pipeline map

Ingest pipeline

The ingest pipeline runs extraction, chunking, embedding, and storage in one call. It returns the individual stage results as well as summary counts.
Result:

Query pipeline

The query pipeline 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

Chat runs retrieval and generation together. Use it when the product surface needs an answer rather than raw chunks.
The result is a Chat result: answer, sources, history, retrieval, llm, errors, retrieval_quality, answer_confidence, compacted, and intent.

Maintenance loop

After the initial ingest, keep a manifest of source IDs to chunk IDs. On refresh, upsert new chunks and delete the old IDs that are no longer produced.

Choosing the right entry point

Next steps