Skip to main content
Ragrails has two workflows. ingest() builds the index from your sources. query() reads from that index. chat() builds on query by retrieving context and asking your configured LLM for a grounded answer. Start with the workflows when you want the shortest path. Open the pipeline stages when you need to inspect output, tune behavior, or run one part directly.

Workflows

Workflows are the high-level APIs most apps call directly. Use them when you want Ragrails to run the full path for indexing or answering without managing each stage yourself.

Ingest

Load sources, chunk them, embed them, and store them in a vector database.

Query

Search the index and generate grounded answers with retrieved context.

Pipeline

Pipeline stages are the lower-level building blocks behind the workflows. Use them when you need to inspect intermediate output, tune a specific step, or run stages independently.

Extraction

Load documents, scraped websites, APIs, or direct Markdown before indexing.

Chunking

Split normalized Markdown into searchable passages.

Embedding

Convert chunks into vectors with your embedding model.

Storing

Write embedded chunks to the configured vector database.

Retrieval

Find the chunks most relevant to a user query.

Chat

Use retrieved context to answer with an LLM.

Knowledge Base Maintenance

Update or remove stored chunks so answers stay current.
New to RAG? Read How RAG works. Ready to run it? Start with the Quickstart.

How it fits together

Ingest path: Extraction -> Chunking -> Embedding -> Storing. Query path: Retrieval -> Chat. Stored data is not frozen. As sources change, keep your knowledge base current with edit() and delete() so answers stay accurate.