BACK TO TEMPLATES
architecturesany
RAG Evaluation and Retrieval Blueprint Template
Architecture template detailing vector retrieval, chunking strategy, re-ranking, and Ragas evaluation pipeline.
When to use this
Architecture document template for production Retrieval-Augmented Generation (RAG) systems.
The template
# RAG Pipeline Architecture Spec
## Pipeline Overview
1. **Ingestion & Chunking**: Recursive character chunking (500 token chunk size, 50 token overlap).
2. **Embedding Model**: OpenAI `text-embedding-3-small` or Cohere Embed v3.
3. **Vector Database**: Qdrant / Pgvector / Supabase with HNSW index.
4. **Re-Ranking**: Cohere Rerank v3 filtering top 20 candidates down to top 5.
5. **Evaluation Suite**: Ragas framework measuring Context Precision, Context Recall, and Faithfulness scores.
## Component Flow
```mermaid
graph TD
A[User Query] --> B[Embedding Generator]
B --> C[Vector DB HNSW Search]
C --> D[Top 20 Chunks]
D --> E[Cohere Re-Ranker]
E --> F[Top 5 Relevant Chunks]
F --> G[LLM Context Generator]
G --> H[Response Output]
```How to use
Save to docs/architecture/rag-pipeline.md.
Last verified 2026-07-26