Databricks Generative AI Engineer Associate Question 120
Single answerYou are designing a document retrieval system using a Generative AI model and need to determine the best chunking strategy for your dataset. The dataset contains long-form text documents with multiple sections, and your goal is to maximize retrieval accuracy for specific queries. During evaluation, you notice that smaller chunks improve retrieval precision but increase the total number of chunks processed. Which chunking strategy is most appropriate for this scenario?
- A
Divide the document into overlapping chunks of smaller size, ensuring each chunk contains some context from neighboring chunks.
- B
Split the document into fixed-size non-overlapping chunks regardless of context.
- C
Use adaptive chunking, where the chunk size is based on semantic boundaries like paragraphs or topics.
- D
Process the entire document as a single chunk to minimize the number of chunks processed by the system.
Show answer and explanation
Correct answer: A
Explanation
Smaller, overlapping chunks are ideal for maximizing retrieval accuracy because they provide sufficient context for specific queries and ensure the Generative AI model retrieves relevant information. While this increases the number of chunks processed, it aligns well with the goal of improving precision in the retrieval system.
- A. Correct.
Dividing the document into overlapping chunks of smaller size ensures that queries have sufficient context, improving retrieval accuracy. This approach is particularly effective in models that benefit from fine-grained input with overlapping context.
- B. Incorrect.
Splitting the document into fixed-size non-overlapping chunks can lead to a loss of context, which negatively impacts retrieval accuracy for specific queries.
- C. Incorrect.
Using adaptive chunking based on semantic boundaries is a good approach for maintaining context but may not provide the granularity needed for higher retrieval precision in this scenario.
- D. Incorrect.
Processing the entire document as a single chunk minimizes the number of chunks but is inefficient and reduces retrieval precision, especially for long-form texts.