Databricks Generative AI Engineer Associate · Free practice question 6 of 12
Fitting retrieved context in the window
Hartwell Pottery's RAG app retrieves 40 chunks per question, and requests now fail because the prompt exceeds the LLM's context window. What is the most direct fix?
- A.Increase the embedding dimension of the index
- B.Remove the system prompt entirely
- C.Retrieve fewer, more relevant chunks, for example by lowering k or reranking
- D.Add more chunks so the model has a complete picture
Show answer and explanation
Correct answer: C. Retrieve fewer, more relevant chunks, for example by lowering k or reranking
Why: The prompt is too large because too much context is included; retrieving fewer chunks, or reranking and keeping only the best ones, brings the prompt within the window and often improves focus. Embedding dimension does not affect prompt length. Dropping the system prompt removes needed instructions, and adding chunks makes the overflow worse.
More free Databricks Generative AI Engineer Associate questions
- Choosing translation as the task
- Delimiters around untrusted text
- Parsing HTML help pages
- Keeping tables intact when chunking
- Same embedding model for queries and docs
- Managed versus self-managed embeddings
- External models in Model Serving
- Unity Catalog lineage for audits
- Groundedness judge without references
- Evaluation datasets from production traces
- Cost control for low-traffic prototypes