Model answers for 4 RAG questions
Typical round: pipeline design, failure debugging, metrics
Q: A RAG bot gives a wrong answer. How do you debug it? A: First check retrieval: was the right passage in the top results? If not, look at chunking, the embedding model, filters or the need for keyword search. If it was retrieved, check the prompt, context order and length, and whether the model was told to answer only from sources.
Q: How do you choose chunk size? A: Match it to how questions are answered in your documents. Small chunks are precise but lose context; large chunks keep context but dilute relevance and cost tokens. Start around a few hundred tokens with some overlap, split on headings, and tune using a retrieval test set.
Q: Why use hybrid search? A: Vector search finds similar meaning but can miss exact terms like product codes or names; keyword search such as BM25 catches those. Combining them, then re-ranking, usually improves recall and precision.
Q: How do you evaluate a RAG system? A: Separately: retrieval with recall@k or hit rate on labelled question-passage pairs, and generation with faithfulness to sources and answer correctness, using human or LLM grading on a fixed test set.