RAG Pipeline
The complete processing chain from document to response. Any RAG system consists of the same stages.
Steps
flowchart LR
A[Loading] --> B[Chunking]
B --> C[Vectorization]
C --> D[Storage]
E[Query] --> F[Retrieval]
D --> F
F --> G[Prompts]
G --> H[LLM]
H --> I[Response]
| Step | What it does | Key term |
|---|---|---|
| Loading | Reading PDF, HTML, DB | — |
| Chunking | Cutting into fragments | chunk |
| Vectorization | Text → vectors | embedding |
| Storage | Saving to DB | vector DB |
| Retrieval | Relevant selection | retrieval |
| Generation | Response based on context | LLM |
Offline vs Online
- Offline part — loading, chunking, vectorization (one-time or scheduled);
- Online part — retrieval and generation (for each request).