Design 1: RAG chatbot
Practice this questionWANT TO UNDERSTAND THE CONCEPT FIRST?Learn Design 1: RAG chatbot
Overview
A conversational interface over an eligible knowledge corpus. It combines a document pipeline with a request-time answer pipeline.
Why this matters
Users need understandable answers grounded in private sources.
An everyday example
A librarian talks through an applicable handbook.
A technical example
API returns {answer, sourceIds, answerable}.
How it works
- Ingest/version
- Authorize
- Retrieve/rerank
- Construct context
- Generate
- Validate.
Architecture and flow
UI → auth API → retriever/index → LLM → cited response.
The insurance assistant example
Explain active policy reporting instructions.
When to use it
Private/changing documents with clear source ownership.
When to avoid it
Exact live claim lookup needs a service tool.
Interview answer
“I design ingestion and answer-time retrieval separately, with ACLs, freshness, abstention, and independent evals.”
Benefits, trade-offs, and production considerations
- Use documents/chunks/jobs/messages records, queue ingestion, trace evidence IDs, and degrade to authorized search results if generation fails.
- Scale search and provider capacity independently.
Adapted from 13_AI.MD · “Design 1: RAG chatbot”. Code examples are study fragments. Difficulty and core labels are editorial estimates; version-specific behavior should be checked against your project.