Home / GenAI Engineer practice test / Application Development / Question

Databricks Generative AI Engineer Associate · free practice question

Imagine designing a Retrieval-Augmented Generation (RAG) system tasked with analyzing extensive legal documents, each approximately 50 pages long. Within these…

Exam-style question on Application Development from the free GenAI Engineer practice test, with the answer and a full explanation below.

Updated November 11, 2026

Application Development

Imagine designing a Retrieval-Augmented Generation (RAG) system tasked with analyzing extensive legal documents, each approximately 50 pages long. Within these documents, critical information often resides in passages spanning between 2,000 and 8,000 tokens. Users typically submit concise queries, usually 1 to 3 sentences, rarely exceeding 50 tokens. Given these parameters, what is the most suitable strategy for determining the embedding model's context length?

  1. AUse an embedding model with a 128-token context window and ingest each document whole, with no chunking step
  2. BUse an embedding model with a 512-token context window and embed each document as a single unit to preserve its structure
  3. CMatch the embedding model's context window to the 50-token maximum query length to make query encoding as efficient as possible
  4. DUse a model with a context window of at least 512 tokens, chunk sections to fit it, and consider an asymmetric model for the short queries
Answer & explanation

Correct answer: D

WHY D is correct: Source sections of 2,000–8,000 tokens require chunking to fit within any practical embedding model context window. A 512+ token window allows reasonably large, semantically coherent chunks. Asymmetric embedding models (for example the E5 family, which uses separate query and passage prefixes) use separate optimized representations for short queries and long passages, improving retrieval quality when the query–document length gap is large.

WHY NOT A: A 128-token window cannot hold a 50-page document. Without chunking, everything past the first 128 tokens is truncated, so almost none of the document is represented in the embedding.

WHY NOT B: A 512-token window still truncates a 50-page document to its first 512 tokens. Embedding the document as one unit does not preserve its structure; it discards nearly all of it.

WHY NOT C: Optimizing the embedding model for 50-token queries produces a model poorly calibrated for encoding paragraph-length document chunks. Short-context models produce degraded embeddings for longer inputs.

Take the full GenAI Engineer practice test free →

Would you pass today?

This question is one of 45 in the free, timed Databricks Generative AI Engineer Associate practice test. Take it and get a section-by-section score.

Start the free test →