The RAG stack

Retrieval-augmented generation grounds an LLM in your own data. A production RAG pipeline is four layers: ingestion, a vector store, orchestration, and evaluation.

Ingestion & retrieval - parse, chunk, and load documents into a retrievable form.

When not to use: Skip a heavy ingestion framework when your corpus is small and static; a script plus the embedding API is enough.

Vector store - persist embeddings and run similarity search at query time.

When not to use: Don't reach for a dedicated vector DB under ~100k vectors; pgvector on your existing Postgres is simpler to operate.

Orchestration - assemble retrieval, prompting, and the model into a chain.

When not to use: Avoid a framework for a single prompt-and-retrieve call; the abstraction can cost more than it saves.

Evaluation & tracing - measure answer quality, cost, and latency before and after changes.

When not to use: Defer heavyweight eval infra only until you have real traffic - never skip it once users depend on answers.