Architecture
┌────────────────────────────────────────────────────────────┐
│ User Query │
│ “What’s the return policy for electronics?” │
└──────────────────────────────┬─────────────────────────────┘
│ │ │
│ ▼ │
┌────────────────────────────────────────────────────────────┐
│ Query Processing │
│ Query understanding → Intent detection → Query expansion │
└───────────────────────────────┬────────────────────────────┘
│ │ │
│ ▼ │
┌────────────────────────────────────────────────────────────┐
│ Retrieval │
│ Vector search → Keyword search → Hybrid ranking │
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
│ │ Chunk │ │ Chunk │ │ Chunk │ │ Chunk │ │
│ │ 1 │ │ 2 │ │ 3 │ │ 4 │ │
│ └─────────┘ └─────────┘ └─────────┘ └─────────┘ │
└──────────────────────────────┬─────────────────────────────┘
│ │ │
│ ▼ │
┌────────────────────────────────────────────────────────────┐
│ Answer Generation │
│LLM synthesizes answer from retrieved chunks with citations │
└──────────────────────────────┬─────────────────────────────┘
│ │ │
│ ▼ │
┌────────────────────────────────────────────────────────────┐
│ Response │
│ “Electronics can be returned within 30 days of purchase” │
│ [Source: Return Policy Document, Section 2.3] │
└────────────────────────────────────────────────────────────┘
Key Terminology
Answer Generation Pipeline
The answer generation process consists of five sequential steps:
Pipeline Flow: