Skip to content
Mermaid templates

RAG — Retrieval-Augmented Generation

End-to-end RAG pipeline: ingest → embed → vector store → retrieve → LLM.

Template previewMermaid
Rendering…

Make it your own.

flowchart LR
subgraph Ingestion
  Docs[Documents] --> Chunk[Chunker]
  Chunk --> Embed[Embedding model]
  Embed --> VStore[(Vector store)]
end
subgraph Query
  U[User question] --> QEmbed[Embed query]
  QEmbed --> Search[Top-K search]
  VStore --> Search
  Search --> Rerank[Reranker]
  Rerank --> Prompt[Prompt template]
  U --> Prompt
  Prompt --> LLM[LLM]
  LLM --> A[Answer + citations]
end
classDef store fill:#dbeafe,stroke:#1e3a8a;
classDef llm fill:#fce7f3,stroke:#9d174d;
class VStore store
class LLM,Embed,QEmbed,Rerank llm