A generative AI engineer is building a product FAQ chatbot. The source data is a structured FAQ document with 350 question-answer pairs in the format: **Q:** [question text] **A:** [answer text]. Each QA pair is 2–8 sentences on average. Users will query the chatbot with questions semantically similar to the FAQ questions. The engineer is choosing between three chunking strategies. Which approach produces the BEST retrieval quality for this specific document structure?
Show answer & explanation
Correct answer: B
WHY B is correct: When source documents have a natural semantic unit — in this case, the Q+A pair — the chunking strategy should preserve that unit. A document with explicit Q/A structure provides a strong signal: each QA pair is a self-contained knowledge nugget. When a user asks a question similar to a FAQ question, embedding-based retrieval will score the chunk highest when the chunk contains the FAQ question + answer as a complete unit, because the FAQ question and the user query will be semantically close, and the complete answer is co-located. Splitting per-QA-pair is sometimes called 'structure-aware' or 'document-aware' chunking. WHY NOT A: Recursive character splitting ignores the QA structure and may split a QA pair mid-answer or merge partial answers from two adjacent QA pairs into one chunk. A generic strategy that ignores document structure always underperforms a structure-aware strategy when clear semantic units exist. WHY NOT C: Separating the question from its answer into different chunks breaks the retrieval-answer co-location property. If a user query retrieves the FAQ question chunk (high similarity, since both are questions), the retrieved chunk contains no answer text — the LLM must then try to answer without any retrieved context. If the answer chunk is retrieved (lower similarity, since answer text is often declarative while queries are interrogative), it lacks the question's framing. WHY NOT D: Fixed 128-token chunks cut some QA pairs mid-answer (an 8-sentence answer may exceed 128 tokens), again breaking the semantic unit. Small chunks also create more noise in the index by splitting structural units that should stay together. WHY NOT E: Sentence-level chunking across the entire document obliterates the QA structure. A retrieved single sentence like 'The return window is 30 days' has almost no context about what product, what conditions, or what exceptions apply. The user would receive ambiguous, context-free fragments instead of complete answers.