Skip to content
Mermaid templates

RAG Pipeline (Retrieval-Augmented Generation)

Indexing and query paths for a retrieval-augmented LLM app.

Template previewMermaid
Rendering…

Make it your own.

flowchart LR
    subgraph Index[Indexing]
      D[Documents] --> CH[Chunk]
      CH --> EM[Embed]
      EM --> VDB[(Vector store)]
    end
    subgraph Query[Query time]
      Q[User question] --> QE[Embed query]
      QE --> RT[Retrieve top-k]
      VDB --> RT
      RT --> PR[Build prompt<br/>+ context]
      PR --> LLM[LLM]
      LLM --> ANS[Answer + citations]
    end