Databricks Generative AI Engineer Associate Question 162
Single answerYou are tasked with selecting an embedding model for a document retrieval system. The source documents are highly technical and average 8,000 tokens in length, while the expected queries are concise, typically around 50 tokens. Your optimization strategy prioritizes maximizing document context retention to improve search relevance. How should you select the embedding model's context length?
- A
Choose a model with a context length equal to the average query length for faster processing.
- B
Choose a model with a context length slightly longer than the average query length to capture additional query nuances.
- C
Choose a model with a context length that can accommodate the full document length to preserve complete document context.
- D
Choose a model with a context length that balances between document length and query length for computational efficiency.
Show answer and explanation
Correct answer: C
Explanation
Given the technical nature and length of the documents, retaining the complete document context is essential for ensuring search relevance. A model with a context length that can accommodate the full document is the best option, as it aligns with the optimization strategy to maximize document context retention.
- A. Incorrect.
Choosing a model based on the average query length would result in losing the majority of the document's context, which is critical for search relevance in this scenario.
- B. Incorrect.
Expanding the context length slightly beyond the query length might help for nuanced queries, but it still fails to capture the full document context, leading to suboptimal relevance.
- C. Correct.
Selecting a model with a context length that can handle the full document ensures that the complete document context is preserved, which is crucial for improving content retrieval relevance in highly technical documents.
- D. Incorrect.
Balancing between document and query length might improve computational efficiency but would compromise the primary goal of maximizing document context retention.