Databricks Generative AI Engineer Associate · Section 2 · 14% of the exam
Use tools and metrics to evaluate retrieval performance
One of the objectives of the Databricks Certified Generative AI Engineer Associate exam, in the section “Data Preparation”. Here is what it covers, the points to remember and a question to try.
What it covers
Go beyond flat chunks with parent-child, context-enriched and hybrid retrieval designs, measure retrieval with precision, recall, MRR, NDCG and MLflow judges, and use a reranker to put the best candidates at the top.
Points to remember
- Parent-child (small-to-big): embed small chunks, return their parent section for context.
- Context-enriched chunks prepend title or section path to the embedded text;
ai_prep_searchbuildschunk_to_embedthis way. - Hybrid search runs ANN and BM25 full-text in parallel and merges with Reciprocal Rank Fusion; best for exact codes and names (
query_type="hybrid"). - Metadata filters (version, region, product) restrict search to the right subset.
- Precision@k, recall@k, hit rate, MRR and NDCG need labeled relevant documents; label at document or section level so labels survive re-chunking.
Try a question
Evaluation of a RAG retriever shows recall@50 of 0.94 but precision@5 of 0.30. The chain passes only the top five chunks to the LLM, and answers often miss the key passage. The latency budget allows about one extra second per query. Which change most directly improves answer quality?
- APass all 50 candidates to the LLM so that the key passage is always included in the prompt
- BHalve the chunk size so that each chunk is more focused on a single topic
- CRebuild the index on a storage-optimized endpoint to improve approximate-search accuracy
- DRerank the top 50 candidates with the AI Search reranker and pass its top five on
Show the answer
D. The relevant chunks are already in the candidate set (high recall@50) but ranked too low (low precision@5). A reranker rescores each candidate against the query and moves the best ones to the top; the AI Search reranker typically adds under a second per query, which fits the budget.
Written for practice in the style of the exam: never a question from the real exam.
In the course
The lesson Advanced Retrieval: Chunking Designs, Evaluation and Re-ranking teaches this objective (about 45 minutes), and 13 practice questions test it. The course has lessons, exam-style questions, timed practice exams and an AI tutor for every objective, and a pass prediction that tells you when you're ready to book.
More in this section
- Apply a chunking strategy for a given document structure and model constraints
- Filter extraneous content in source documents that degrades quality of a RAG application
- Choose the appropriate Python package to extract document content from provided source data and format
- Define operations and sequence to write given chunked text into Delta Lake tables in Unity Catalog
- Identify needed source documents that provide necessary knowledge and quality for a given RAG application
- Design retrieval systems using advanced chunking strategies
- Explain the role of re-ranking in the information retrieval process