Skip to content

Databricks

Databricks Certified Generative AI Engineer Associate

Question bank · 127 questions · Bank reference 4062

Databricks Certified Generative AI Engineer Associate

127 questions · instant answer feedback · concise explanations · free

  1. Question 1 of 127You are building a multilingual Databricks support platform that must detect sentiment from feedback, summarize conversations, translate responses, and hold human-like dialogue. Which option correctly maps these LLM tasks to their NLP categories?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Sentiment analysis -> NLU, Summarization -> NLG, Translation -> NLG, Dialogue -> NLG

    Sentiment analysis is natural language understanding because it interprets input text, while summarization, translation, and dialogue all produce new text, so they fall under natural language generation. Remember the split: NLU covers classification and extraction tasks; anything that writes output is NLG.

  2. Question 2 of 127You are developing a Databricks content-generation tool. During testing the outputs are vague and inconsistent, even though the LLM and tokenizer work correctly. Which strategy is most likely to improve the quality and relevance of the responses?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Refine and optimize the prompt with detailed instructions using prompt-engineering techniques so the model has enough context for the task.

    When the model and tokenizer work but outputs are vague, the fix is better prompt engineering: add context, constraints, format, and few-shot examples. Increasing parameters or switching architectures is irrelevant when the prompt itself lacks the needed guidance.

  3. Question 3 of 127You are deciding where Retrieval-Augmented Generation (RAG) adds the most value across several Databricks applications. Which scenario is the best use case for RAG?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Building a support chatbot that must fetch the latest product policies and give accurate, real-time answers.

    RAG shines when the chatbot must fetch current, private documents like product policies and answer with accurate grounding. Pure generation from internal training data needs no retrieval, so those scenarios miss the point of RAG.

  4. Question 4 of 127Which option best describes the sequence and role of the components in a Retrieval-Augmented Generation (RAG) workflow?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Embeddings turn text into vectors, the vector database stores those vectors, search and retrieval find the most relevant ones, and prompt augmentation merges them with the user query.

    The canonical RAG flow is embed, store in a vector database, retrieve the most similar vectors, then augment the prompt with that content before the LLM call. Any option that swaps these roles, like vector databases generating embeddings, is wrong.

  5. Question 5 of 127A Generative AI Engineer is building a question-answering system on Databricks. The LLM frequently hallucinates on fact-based queries that need internal company policies. To improve factual recall, what should they do?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Pass relevant context documents into the LLM prompt during query processing.

    Passing relevant policy documents into the prompt, the core of RAG, grounds the model's answers and reduces hallucination. Jumping straight to fine-tuning is the classic distractor; grounding context is the first-line fix, not weight updates.

  6. Question 6 of 127Why is a vector store essential in a Retrieval-Augmented Generation (RAG) workflow?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. It stores embeddings and enables fast semantic search by finding vectors with similar meaning rather than relying only on exact keyword matches.

    A vector store indexes embeddings and enables fast semantic similarity search, so related meanings match even without shared keywords. Note that it does not create embeddings itself; embedding models do that before storage.

  7. Question 7 of 127Which option BEST describes the key role of correct chunking when preparing data for a Retrieval-Augmented Generation (RAG) system?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. It balances context retention and retrieval precision by splitting documents into appropriately sized, semantically coherent pieces.

    Good chunking splits documents into right-sized, semantically coherent pieces, balancing enough context against precise retrieval. Fixed-size chunks with no overlap often cut ideas in half, and chunking never replaces the embedding step.

  8. Question 8 of 127You are designing a Databricks support assistant that uses a Retrieval-Augmented Generation (RAG) workflow. A user asks, 'What is the refund policy for premium customers?' The answer lives only in internal policy documents the base LLM never saw in training. Which sequence best describes how RAG handles this query?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. The system retrieves relevant policy documents from the vector database, combines them with the user query into an augmented prompt, and passes it to the LLM, which produces a grounded answer.

    RAG retrieves the relevant internal documents from the vector store, augments the user query with them, and the LLM generates a grounded answer. Fine-tuning the documents into weights is the key distractor; RAG fetches at query time instead.

  9. Question 9 of 127A Generative AI Engineer builds a RAG system but embeds the documents with one model and the user queries with a different embedding model. Retrieved results are consistently irrelevant. What is the most likely cause?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Different embedding spaces – queries and documents were embedded with different models, producing mismatched vector spaces.

    Embeddings from different models live in incompatible vector spaces, so similarity comparisons become meaningless and results are irrelevant. The other options are tuning issues that would not cause consistent irrelevance like a mismatched embedding model does.

  10. Question 10 of 127You are designing an LLM application that needs prompt templates, chaining of multiple model calls, and integration with a vector database for retrieval. Which tool is best suited for building this workflow?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. LangChain

    LangChain is purpose-built for LLM workflows with prompt templates, chains, agents, memory, and RAG retrieval integration. Spark, TensorFlow, and Delta Lake serve data processing, deep learning, and storage rather than orchestration.

  11. Question 11 of 127You implement a RAG pipeline with vector search and add a reranking model that reorders the top-k candidates before the LLM. Which of the following is NOT a real benefit of reranking?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. It optimizes latency, since reranking makes the query return faster.

    Reranking adds an extra scoring step, so it increases latency rather than reducing it; its real value is retrieval quality. Watch for NOT questions where a speed claim is the false benefit.

  12. Question 12 of 127In a RAG workflow, what is the main purpose of prompt augmentation?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. To merge the user's original query with retrieved context, giving the LLM in-context learning for accurate, source-backed answers.

    Prompt augmentation combines the user's query with retrieved context so the LLM can answer via in-context learning. The retraining option fails because RAG avoids retraining and instead grounds answers in retrieved sources.

  13. Question 13 of 127A Databricks LLM is asked to sort news headlines into the labels Technology, Finance, Sports, and Politics. The model has never seen labeled examples for these categories, but the prompt instructs it to pick from the provided labels. What is happening?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. It uses zero-shot classification, assigning labels from its general knowledge.

    With no labeled examples in the prompt, the model applies zero-shot classification, mapping inputs onto the given labels from its pretrained knowledge. Few-shot would require example labelings in the prompt, so that distractor does not fit here.

  14. Question 14 of 127In a RAG workflow, why is vector search essential after documents and queries have been converted into embeddings?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. Vector search finds semantically relevant documents by comparing embedding similarity, returning results based on meaning rather than exact keyword matches.

    Vector search compares embedding similarity so retrieval matches meaning rather than exact keywords, which is exactly what option D states. The distractors describe generation, raw-text matching, or date ranking, none of which reflect how similarity search works.

  15. Question 15 of 127In a RAG pipeline, which option correctly describes how vector search works end-to-end and why it beats keyword search?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Convert the user query to an embedding with the same model used for the chunks, compute similarity against stored document embeddings, rank and retrieve the top-k chunks, then assemble them with the original question for the LLM. It beats keyword search because embeddings capture meaning (e.g., 'canine care' is close to 'dog training').

    The retrieval flow is query embedding with the same model, similarity computation, top-k ranking, then context assembly for the LLM. Using one embedding model keeps query and document vectors in the same space; the other options skip retrieval entirely.

  16. Question 16 of 127In a RAG workflow, what is the primary role of a vector database, and why is it preferred over a traditional database for storing embeddings?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. A vector database stores embeddings and metadata and uses specialized indexes to retrieve vectors by mathematical similarity rather than exact matches, integrating with RAG for semantic search.

    A vector database stores embeddings plus metadata and uses specialized indexes to retrieve by mathematical similarity, enabling semantic search in RAG. Options claiming it removes embeddings or replaces retrieval misstate its core purpose.

  17. Question 17 of 127In a RAG pipeline, why would you add a reranking step after a vector similarity search?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. To re-evaluate retrieved chunks beyond raw similarity scores and order them by true relevance to the query before sending them to the LLM.

    Reranking re-scores retrieved chunks for true relevance to the query, improving the ordering beyond raw similarity scores. Options about generating embeddings or fine-tuning the LLM describe other pipeline stages, not reranking.

  18. Question 18 of 127In a RAG workflow, when would you prefer a vector library such as FAISS instead of a full vector database?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. When your dataset is small enough to fit in memory, changes rarely, and you need fast similarity search without deploying a full database.

    FAISS suits small, static, in-memory datasets where you need fast similarity search without a deployed database. Large, dynamic datasets needing real-time updates and multi-user access call for a full vector database instead.

  19. Question 19 of 127A Generative AI Engineer must evaluate a RAG system at both the component level and the system level. Which evaluation breakdown is most appropriate?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Evaluate chunking, the embedding model, the vector store, retrieval/re-ranking, and the generator – both individually and as part of the full pipeline.

    Proper RAG evaluation covers every component, including chunking, embeddings, the vector store, retrieval, reranking, and the generator, both individually and end-to-end. Evaluating only the generator ignores upstream retrieval failures that degrade final answers.

  20. Question 20 of 127You are deploying a RAG application to production on Databricks. The app must call external LLM APIs securely without risking leaked credentials. Which authentication practice is best?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Use an OAuth 2.0 flow with token issuance and automatic rotation.

    OAuth 2.0 with short-lived, automatically rotated tokens minimizes credential exposure and supports revocation. On the exam, remember that hardcoded or shared static keys are always the wrong answer for production security.

  21. Question 21 of 127A Generative AI Engineer is building a multi-agent system with a supervisor agent that coordinates two specialized task agents: a Finance agent that answers questions from financial-report tables and a Markets agent that answers stock-information questions. A strict requirement is that each task agent must only be able to reach its own data – one agent must not be able to access, or even query, the other agent's Genie Space. Using built-in Databricks/Unity Catalog capabilities, how should the engineer set up the Genie Spaces?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Create a separate Genie Space for each task agent, scope each space to only that domain's Unity Catalog tables, and run each agent's serving endpoint under its own service principal that is granted UC access (USE CATALOG, USE SCHEMA, SELECT) only to its own data; the supervisor agent routes each request to the correct subagent.

    Genie Space data access is enforced by Unity Catalog permissions tied to the running identity, not by the space itself. Prompt instructions and shared service principals are classic distractors because they provide no real isolation.

  22. Question 22 of 127You are preparing data for a RAG system on Databricks. Your users mostly ask short, specific questions, and you want embeddings that capture precise meaning. Which chunking strategy is most effective here?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Sentence-based chunks

    Sentence-based chunks create focused, high-precision embeddings ideal for short, specific questions. Paragraph chunks dilute meaning for narrow queries, so match chunk size to the granularity of the questions.

  23. Question 23 of 127You are building a RAG application that queries both a Databricks SQL Warehouse and a Databricks Vector Search index. To keep end-user identities intact and enforce access policies consistently, the team wants authentication passthrough. What does that mean, and which approach is most appropriate?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. It means the application forwards the end-user's identity to downstream systems so access policies apply consistently, achieved via SSO tokens or delegated credentials.

    Authentication passthrough forwards the end user's identity via delegated SSO or OAuth tokens so downstream permissions still apply. A shared service identity defeats the purpose because all queries bypass per-user access rules.

  24. Question 24 of 127You are comparing approximate nearest-neighbor (ANN) methods in a vector database, such as LSH and HNSW, aiming for high semantic accuracy when retrieving embeddings. Which similarity measure is most appropriate? Correct answer

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Cosine similarity

    Cosine similarity is the standard measure for semantic closeness between embeddings because it is scale-invariant and direction-focused. ROUGE, BLEU, and Levenshtein compare surface text, so they cannot capture embedding-level semantics. On the exam, match similarity metrics to vector retrieval, not text generation.

  25. Question 25 of 127You are building a news RAG application. If a user asks, 'Tell me what happened to XYZ around April 1, 2002?', the system must return only documents within +/-5 days (March 27, 2002 to April 5, 2002). What is the best way to implement this?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Apply a metadata filter at retrieval so only documents with event_date BETWEEN '2002-03-27' AND '2002-04-05' are included.

    Applying a metadata filter at retrieval guarantees only documents inside the five-day window are returned. Relying on the LLM or cosine similarity to filter dates is unreliable, so filter structured attributes before generation on the exam.

  26. Question 26 of 127You are preparing documents for a RAG pipeline. Sources include raw HTML pages and scanned PDFs that need OCR. You want to extract clean text from these unstructured formats before chunking and embedding. Which library is most appropriate?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Unstructured

    The Unstructured library parses HTML, PDFs, and images with OCR support, making it ideal for extracting clean text before chunking. BeautifulSoup only handles HTML, and NLTK and TensorFlow do not perform document extraction.

  27. Question 27 of 127You are designing a prompt for an LLM that reads user emails such as 'Hi, can you update me on the order, orderid = 1234?'. The response must always be valid JSON with the fields customer_id, order_id, order_date, order_status. Which prompt best ensures structured, reliable output?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Return only valid JSON with keys: customer_id, order_id, order_date, order_status. Do not include any text or explanation outside the JSON.

    The best prompt explicitly lists the required JSON keys and forbids any text outside the JSON, making output deterministic and parseable. Vague instructions like 'answer in JSON format' leave room for extra prose and unpredictable structure.

  28. Question 28 of 127You have a Delta table pipeline_error_logs with a column error_message containing variations like: 'File not found: /mnt/data/a.csv', 'Missing file: /mnt/data/b.csv', and 'FileNotFoundError on /mnt/data/c.csv' You want to use Databricks built-in AI SQL functions to summarize these so they all fall under a 'Missing File' category. What is the best approach?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. For each row, use regex to strip specific details (file name, IDs, etc.) to sanitize the message, then apply ai_summarize() to summarize the sanitized text.

    Sanitizing the messages with regex first removes unique details, so ai_summarize() can group variants under one root-cause category. A generic summarize prompt without normalization keeps each message distinct and prevents clean categorization.

  29. Question 29 of 127You are processing a large PDF for a RAG pipeline. The text is extracted, split into smaller chunks, and stored as an array of chunks in a PySpark DataFrame. What is the best way to implement chunking for scalability and downstream use in vector search?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Use Auto Loader with a custom UDF to split the PDF text into chunks, then explode the array to flatten it into individual rows.

    Auto Loader with a UDF provides scalable ingestion and chunking, and exploding the array produces one chunk per row for embedding. Looping outside Spark or storing whole documents breaks scalability and vector-search compatibility.

  30. Question 30 of 127A Generative AI Engineer is building a RAG application that helps users learn aviation safety guidelines by answering questions about technical regulations. Which sequence of steps correctly represents building, evaluating, and deploying this RAG application?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Ingest documents -> Index to Vector Search -> User submits query -> LLM retrieves documents -> LLM generates a response -> Evaluate the model -> Deploy with Model Serving

    The correct flow ingests documents, indexes them to Vector Search, retrieves relevant content for the query, generates the answer, then evaluates and deploys. Evaluation must happen after generation, which is why options evaluating before generation fail.

  31. Question 31 of 127You are designing a metaprompt for a Databricks model serving endpoint that will summarize user-uploaded business documents. Your primary goals are to minimize hallucinations and prevent leaking any private data. Which prompt-design strategy is most appropriate?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Add explicit instructions that the model must answer only from the provided input and must say 'I don't know' when information is missing.

    Grounding the model to answer only from provided input and admit 'I don't know' directly reduces hallucination and fabrication of private data. Encouraging detailed output despite missing data is the main trap and increases hallucination risk.

  32. Question 32 of 127In a RAG workflow, why are both document embeddings and query embeddings required?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Document embeddings build a searchable knowledge base during preparation, while query embeddings convert each user query into the same vector format for real-time semantic comparison.

    Document embeddings build the searchable knowledge base at preparation time, while query embeddings convert user questions into the same vector space at runtime. Remember both must come from the same embedding model for comparison to work.

  33. Question 33 of 127A Generative AI Engineer is assessing a customer-facing GenAI app for selling industrial tools. The app requires customers to enter account_id and transaction_id. After launch, feedback shows it answers order and billing details well but fails on shipping status and expected arrival-date questions. Which approach best improves these answers?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Retrieve shipping data from an authoritative transactional data source (for example, Lakebase, a Delta table, or an operational database) keyed by transaction_id, and pass it to the LLM at query time.

    Shipping status and arrival dates are live operational data, so retrieving them from an authoritative transactional source keyed by transaction_id keeps answers accurate. Assuming a fixed delivery window or indexing static policies cannot reflect changing shipping facts.

  34. Question 34 of 127A Generative AI Engineer is building a RAG app whose source documents are scanned and saved as image files (.jpeg, .png). They want to extract the text using the fewest lines of code. Which Python package should they use?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. pytesseract

    pytesseract wraps the Tesseract OCR engine, so it extracts text from scanned images in just a couple of lines. The other options are HTML parsing or scraping libraries and cannot read text embedded in image files.

  35. Question 35 of 127A Generative AI Engineer wants to build an app that rewrites a paragraph-long notes field into a single-sentence gist that conveys the note's intent and fits the application's UI. Which NLP task category should they evaluate candidate LLMs for?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. Summarization

    Summarization condenses a paragraph into a shorter sentence while preserving intent, which matches the goal. Text2text generation is the broader category, so picking the specific task gives the best model evaluation fit.

  36. Question 36 of 127You are building a RAG pipeline on Databricks. After chunking the documents, you must choose an embedding model. Which factor is the MOST critical for that choice?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Matching the model to your data properties, domain, and content type.

    The embedding model should match your data's domain, content type, and vocabulary because alignment drives retrieval quality. Picking the largest or cheapest model ignores semantic fit, and user count does not determine embedding choice.

  37. Question 37 of 127When working with LLMs, passing a very long context window introduces certain downsides. Which option correctly describes these challenges?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. All of the other options are correct.

    Long contexts raise cost per request, increase inference latency, and trigger the lost-in-the-middle effect, so all listed challenges apply. Remember that when every individual option is valid, the comprehensive all-of-the-above choice is correct.

  38. Question 38 of 127You run weekend batch jobs that make many LLM calls on Databricks. During peak usage the jobs hit API throttling limits and fail. You want a robust way to avoid throttling in future runs while still tracking and deploying your models efficiently. What is the best solution?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Use an MLflow pyfunc to package the LLM workflow into a model while implementing retry and exponential backoff in the application or model code.

    Packaging the workflow as an MLflow pyfunc model with retry and exponential backoff handles throttling robustly while keeping versioning and deployment. Temperature, random scheduling, and disabling tracking do not address rate limits at all.

  39. Question 39 of 127A Generative AI Engineer at an online retailer wants to improve search with vector search plus metadata filtering. Searches can reach 90 per second, latency is the most critical metric, and they accept higher up-front development cost if it improves accuracy without harming latency. The catalog has 120 million items. How should they set this up?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Fine-tune a custom embedding model, use standard vector search, and keep hybrid search and reranking off.

    A custom embedding model improves accuracy, standard vector search has the lowest latency, and disabling hybrid search and reranking avoids added compute. Storage-optimized endpoints trade latency for cost, so they fail the latency requirement.

  40. Question 40 of 127You deploy an LLM application with endpoint-level guardrails that block responses containing PII. A user submits a query that includes their phone number. What happens to the request, and what is recorded in the inference table?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. The request is blocked and the client receives a default blocked response. The event is recorded in usage tracking, and guardrail activity can be audited through the evaluator endpoint if inference logging is enabled.

    A blocking PII guardrail rejects the request before it reaches the model, returning a default blocked response to the client. Blocked events still appear in usage tracking, but the endpoint inference table only holds requests that reached the model.

  41. Question 41 of 127A Generative AI Engineer is building an LLM app whose retriever documents are chunked to a maximum of 512 tokens each. Cost and latency matter more than quality. Several embedding-model context-length levels are available. Which one fulfills the need?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Context length 512: smallest model 0.13 GB, embedding dimension 384.

    A context length of 512 exactly matches the chunk size, so the smallest model with the lowest latency and cost suffices. Larger context windows would waste resources since chunks never exceed 512 tokens.

  42. Question 42 of 127You are building a custom sentiment classifier on a Databricks LLM. You give the model three labeled examples and ask it to label a fourth: Tweet1: "I hate long queues" -> Negative; Tweet2: "I love beach holidays" -> Positive; Tweet3: "The coffee is fine" -> Neutral; Tweet4: "This phone exceeded my expectations" -> ? How does the LLM handle this?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: F. It learns from the few in-prompt examples and predicts the sentiment from context.

    Three labeled examples inside the prompt make this few-shot, in-context learning, so the model predicts Positive for the fourth tweet with no retraining. Zero-shot is the trap; it only applies when no examples are supplied in the prompt.

  43. Question 43 of 127You are implementing a RAG pipeline on Databricks and want to use a LangChain PromptTemplate to format input before the LLM call. Given the template: from langchain.prompts import PromptTemplate; prompt_template = "Summarize the following document:\n{document}"; template = PromptTemplate(input_variables=["document"], template=prompt_template), calling template.format() raises an error. What is the correct way to call the template and avoid the error?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: G. formatted_prompt = template.format(document="This is my text")

    PromptTemplate.format requires a value for every declared input variable, so you must pass document as a keyword argument. Omitting it or adding undeclared variables like model raises a missing-variable error.

  44. Question 44 of 127You are evaluating a customer-service LLM in Databricks. Automated metrics show high similarity to reference answers, but human reviewers say responses feel cold and unhelpful. Which evaluation approach gives a more comprehensive assessment?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Combine human evaluation with automated metrics to assess tone, appropriateness, and contextual relevance.

    The correct answer works because combining human review with automated metrics captures subjective qualities like tone and empathy that similarity scores miss. On the exam, remember that automated metrics alone cannot judge helpfulness or appropriateness of customer-facing responses.

  45. Question 45 of 127You are building an AI customer-support platform in Databricks where an LLM generates responses and integrates with a customer database and case-management system. Which approach gives the most comprehensive evaluation?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Evaluate the whole AI system – the LLM plus its integration with retrieval, UI, and business workflows – and the overall user experience.

    The correct answer works because end-to-end evaluation covers the full AI system, including retrieval integration, user experience, and business impact. The distractor about LLM-only benchmarks fails because it ignores the integrated components that determine real-world success.

  46. Question 46 of 127You are using MLflow in Databricks to evaluate an LLM with the LLM-as-a-judge approach, measuring response relevance on a 1-to-5 scale with consistent scoring. Which step is most appropriate?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Create MLflow evaluation records with example queries, define a metric object with relevance criteria and scoring scale, and use an LLM judge to score each response.

    The correct answer works because the MLflow workflow is to build evaluation records, define a metric with criteria and a scoring scale, then have the LLM judge score responses. Loss and perplexity do not measure relevance directly, which is why that distractor fails.

  47. Question 47 of 127A Generative AI Engineer evaluates a customer-facing GenAI app for buying electronic accessories. Customers must enter customer_id and order_id. Post-launch, it answers billing/payment well but often fails shipping status and expected-delivery-date questions. Which solution best improves shipping answers?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Create a feature store table keyed by order_id, populated with tracking data, courier details, and estimated delivery dates.

    The correct answer works because a feature store keyed by order_id supplies accurate, live, order-specific tracking and delivery data to the app. The vector store distractor fails because shipping status needs real-time data, not static policy documents.

  48. Question 48 of 127A Generative AI Engineer builds a RAG app in Databricks for a financial-services company. During testing, the model retrieves customer data that appears to contain PII (account numbers, addresses), and the dataset may not meet compliance requirements. What is the best next step?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Contact the data curator or data governance team to validate whether the dataset is approved and compliant.

    The correct answer works because escalating to the data curator or governance team validates dataset approval and compliance before further use. Exam cue: never silently delete, keep using, or trust an LLM to filter PII; always route governance issues to the responsible team.

  49. Question 49 of 127A Generative AI Engineer has a streaming pipeline that continuously computes live scores and player statistics and publishes them as online features in Databricks. An LLM-powered sports commentary application must retrieve these features with low latency to generate up-to-date commentary. Which Databricks capability best enables access to the latest live data?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Feature Serving

    Feature Serving is the correct choice because it exposes fresh online features to applications with low latency via a serving endpoint. Foundation Model APIs serve models, not feature data, so it does not deliver the live scores needed here.

  50. Question 50 of 127A Generative AI Engineer sets up a Vector Search endpoint and wants embeddings to stay in sync with a Delta table. from databricks.vector_search.client import VectorSearchClient vsc = VectorSearchClient() vsc.create_endpoint( name="my_vs_endpoint", endpoint_type="STANDARD" ) After creating the endpoint with VectorSearchClient, which function should they call next to create an index that auto-updates when the Delta table changes?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. vsc.create_delta_sync_index()

    A Delta sync index automatically stays synchronized with the source Delta table as rows are inserted, updated, or deleted. A direct vector access index must be synced manually, so it does not meet the auto-update requirement.

  51. Question 51 of 127A Generative AI Engineer builds a system that retrieves early-1900s newspaper articles and summarizes them. Summaries are accurate but often add meta-comments like 'Here's how I summarized the content…'. Which modification most effectively fixes this?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. Add few-shot examples showing the desired summary style without explanations.

    Meta-commentary is a prompt formatting problem, so few-shot examples of clean summaries teach the desired output style most reliably. Changing chunking or embeddings targets retrieval quality, which the question says is already fine.

  52. Question 52 of 127A Generative AI Engineer at an electronics manufacturer has a RAG system for product questions, but it often retrieves and summarizes unrelated products, lowering accuracy. What should the engineer do to improve relevance?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. Assess and improve the quality of the retrieved context.

    RAG accuracy failures usually come from retrieval, so evaluating and improving the retrieved context is the priority. Swapping the LLM treats generation when irrelevant documents are the actual root cause.

  53. Question 53 of 127A Generative AI Engineer is deploying a RAG application on Databricks Model Serving. Before each user question reaches the LLM, the input must be cleaned, combined with retrieved context, and formatted into a prompt template; the model's raw output must also be reformatted before it is returned to the caller. The engineer wants to package this pre-processing, the LLM call, and the post-processing as one deployable model. How should the engineer implement the prompt preprocessing?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. Wrap the workflow in a custom MLflow PyFunc model (a class inheriting mlflow.pyfunc.PythonModel) and perform the prompt preprocessing inside predict() before it calls the LLM, with post-processing applied to the output afterward.

    A custom MLflow PyFunc model packages preprocessing, the LLM call, and post-processing into one deployable asset, with prompt preprocessing happening inside predict() before the LLM is called. Hardcoding a prompt cannot adapt to per-request input, and post-processing alone runs too late to shape the prompt.

  54. Question 54 of 127In a RAG or LLM application, when should you design a multi-stage reasoning system rather than a single-stage prompt, and how does that improve accuracy?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. When the goal involves several intents or tasks (e.g., translation, summarization, sentiment), breaking it into ordered stages improves reasoning and reliability.

    The correct answer works because decomposing a multi-intent goal into ordered stages keeps each prompt focused and feeds outputs forward, improving reliability. A practical cue: watch for distractors claiming multi-stage systems remove external tools or run parallel calls for speed; those are fabricated trade-offs.

  55. Question 55 of 127Which Python framework is best suited when the main requirement is to build a data-centric RAG system that indexes enterprise data from SQL databases, APIs, documents, and other sources for LLM retrieval?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. LlamaIndex

    LlamaIndex is correct because it is the data-centric framework purpose-built to index SQL databases, APIs, and documents for retrieval. Remember the pairing: LlamaIndex for data ingestion and retrieval, LangChain for general chaining and orchestration of multi-step workflows.

  56. Question 56 of 127You must build a multi-stage reasoning system that chains tasks like summarization, sentiment analysis, and retrieval, integrates external tools and vector stores, and needs high flexibility to customize prompts, chains, and retrievers. Which framework is most appropriate?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. LangChain – general-purpose LLM apps with chains, retrievers, tools, and flexible integrations.

    LangChain fits because it supports chaining multiple LLM tasks plus retrievers, vector stores, and external tools with high flexibility. The strongest distractor, LlamaIndex, is great for data connections but is not as comprehensive for orchestrating complex multi-task workflows.

  57. Question 57 of 127You are designing a multi-stage reasoning system in Databricks using LangChain. The workflow must accept user input, retrieve relevant documents, generate structured prompts, and call an external API for real-time data. Which combination of LangChain components implements this effectively?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Chain to orchestrate multi-step tasks, Prompt to guide the LLM, Retriever to find relevant context, and Tool to integrate external functionality such as APIs.

    The correct option maps each component properly: Chain orchestrates, Prompt guides the model, Retriever fetches context, and Tool integrates external APIs. The distractors simply scramble these roles, so match each component to its function rather than memorizing order.

  58. Question 58 of 127You are designing a multi-stage reasoning system in Databricks using LlamaIndex. The app must connect an LLM to the company knowledge base, let users ask questions over structured and unstructured data, and retrieve the most relevant context for RAG. Which LlamaIndex component is primary?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Query Engine – indexes, stores, and queries documents to retrieve relevant chunks for RAG.

    The Query Engine is correct because it indexes the knowledge base and retrieves the most relevant context for user questions. The Agent distractor handles multi-step autonomy but is not the primary retrieval interface for straightforward RAG questioning.

  59. Question 59 of 127You are building an intelligent assistant with LlamaIndex that must read and update data in real time, perform multi-step reasoning with feedback loops, and collaborate with other autonomous processes. Which LlamaIndex component is most suitable?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Agent – an autonomous entity that can read, write, run reasoning loops, adapt, and collaborate with other agents.

    The Agent is right because it can read and write data, run reasoning loops with feedback, and collaborate with other agents. Cue: whenever a scenario mentions real-time writes or autonomous multi-step behavior, choose Agent over Query Engine.

  60. Question 60 of 127You are building a multi-stage reasoning system in Databricks using Haystack to answer user questions over a large internal document collection. Which combination of Haystack components retrieves documents, generates answers, and orchestrates the workflow?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Retriever to fetch relevant documents, Generator to create responses with LLMs, and Pipelines to orchestrate the flow.

    The correct combination is Retriever to fetch relevant documents, Generator to produce answers, and Pipelines to orchestrate the flow. The distractors swap component roles, so anchor each Haystack component to its single core job.

  61. Question 61 of 127You are building a multi-stage reasoning system in Databricks using DSPy. You want to stop hand-writing prompts and instead declare what the LLM should achieve, letting the framework optimize prompt design automatically. Which DSPy components do you primarily use?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Use Signatures to specify desired behavior, Modules to implement them with prompting techniques, and Optimizers to automatically improve performance.

    Signatures declare the desired input-to-output behavior, Modules implement them with prompting techniques, and Optimizers automatically refine the prompts. Cue: remember the DSPy trio as declare, implement, optimize; distractors misassign roles like embedding generation to Signatures.

  62. Question 62 of 127You are evaluating a Databricks customer-support LLM. Human evaluation is too costly, so you adopt the LLM-as-a-judge approach. Which statement best describes how it works?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. LLM-as-a-judge uses another LLM to evaluate model outputs with clear prompts, scoring scales, and structured formats for consistent, scalable evaluation.

    The correct answer works because LLM-as-a-judge uses another LLM with structured prompts and scoring scales to evaluate outputs consistently at scale. Remember, it never replaces evaluation with fine-tuning or auto-selection; it requires explicit evaluation prompts and rubrics.

  63. Question 63 of 127A Generative AI Engineer wants an app that condenses a paragraph-long description field into a single-sentence gist that captures intent while fitting the UI. Which NLP task category should they evaluate LLMs for?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. Summarization

    The correct answer works because summarization condenses longer text into a shorter version that preserves the core meaning and intent. Generic text-to-text generation is the strongest distractor, but it is too broad for the specific condensing use case described.

  64. Question 64 of 127A Generative AI Engineer deployed a dedicated model endpoint with guaranteed throughput. They want to track inputs sent to and outputs returned from the model, but their design adds an extra service layer to capture and forward logs to external storage. Which Databricks feature replaces this manual logging by recording the same information automatically?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. Inference Tables

    Inference Tables automatically log all endpoint requests and responses into a Unity Catalog Delta table, removing the need for a custom logging layer. Vector Search handles similarity lookups and does not capture endpoint traffic.

  65. Question 65 of 127A Generative AI Engineer has already created a Vector Search index and now wants to verify it exists and inspect its configuration. Given an index_name, which function call is appropriate?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. vsc.get_index(index_name)

    get_index retrieves the metadata, configuration, and status of an existing Vector Search index. The create functions build new resources, and similarity_search runs queries rather than inspecting index details.

  66. Question 66 of 127A Generative AI Engineer experiments with LangChain to build a simple text-generation chain from a prompt template, but this code errors even with a valid API key: from langchain.chains import LLMChain from langchain_community.llms import OpenAI from langchain_core.prompts import PromptTemplate prompt = PromptTemplate(input_variables=["adjective"], template="Tell me a {adjective} joke") llm = LLMChain(prompt=prompt) llm.generate([{"adjective": "funny"}]) What change fixes the issue?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Use llm_chain = LLMChain(llm=OpenAI(), prompt=prompt) and call llm_chain.run({"adjective": "funny"}).

    The chain needs a real LLM instance passed as llm, and run executes a single input through the chain. The original code omits the model entirely, so it fails no matter how generate is called.

  67. Question 67 of 127A Generative AI Engineer builds an LLM that turns article content into short poetic summaries (e.g., haikus), but outputs don't match the intended tone/style. Which approach will NOT improve stylistic alignment?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Use a neutralizer to normalize the tone and style of the underlying documents.

    Neutralizing the source documents strips the expressive tone the creative task depends on, so it hurts stylistic alignment. Few-shot examples, explicit tone instructions, and fine-tuning all directly steer output style.

  68. Question 68 of 127A Generative AI Engineer has finished fine-tuning an LLM in Databricks and is preparing to deploy it for real-time inference, wanting the simplest and most integrated approach on the platform. Which workflow is easiest?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Log the model with MLflow during training, register it in Unity Catalog via the MLflow API, and start a Model Serving endpoint.

    Logging with MLflow, registering in Unity Catalog, and enabling Model Serving is the native Databricks deployment path. The Docker and Flask options work in general but abandon platform integration, so they fail the 'simplest and most integrated' requirement.

  69. Question 69 of 127A Generative AI Engineer designs a financial-insights assistant that must combine real-time stock data (Delta tables) with up-to-date online news, producing contextually accurate real-time summaries by retrieving latest prices and news before responding. How should the system be architected?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Create an agent that uses specialized tools – one to query Delta tables for prices and another for live web search – and feed both contexts to the LLM.

    An agent with a SQL tool for Delta table prices and a web-search tool for live news supplies current context to the LLM. The pure RAG option fails because a vector store can't guarantee real-time news or fresh prices at query time.

  70. Question 70 of 127A Generative AI Engineer deploys a custom MLflow PyFunc model on Databricks Model Serving. The model needs secure credentials at inference time to reach external systems (e.g., a storage account or API). How should the endpoint be configured to provide these secrets safely at runtime?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Add credentials as environment variables, securely injected into the serving environment.

    Environment variables sourced from Databricks Secrets are the recommended way to inject credentials into a Model Serving PyFunc environment. Spark session configuration doesn't apply to serving, and plaintext secrets in code or requests are insecure.

  71. Question 71 of 127A small cancer-research startup wants to build a RAG app using Databricks Foundation Model APIs, keeping good response quality for medical questions while keeping infrastructure and API costs low. Which approach best balances performance, relevance, and cost?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. Select a smaller, domain-specialized LLM fine-tuned for biomedical/scientific content.

    A smaller domain-specialized model tuned for biomedical content gives strong relevance at lower inference cost. The largest-model option maximizes cost, while limiting retrieval or queries degrades quality instead of improving efficiency.

  72. Question 72 of 127A Generative AI Engineer must manage prompt templates for an agent across development, staging, and production with a gated release: prompts are updated in dev, validated in staging with automated tests, and promoted to prod only after approval. The solution must preserve version history and allow rollback. Which approach supports this workflow?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Track prompts as MLflow versions and promote them using aliases after they pass.

    MLflow prompt versioning with aliases provides gated promotion, full history, and one-step rollback to any prior version. Git branching also versions prompts, but it lacks the platform-native alias-based promotion and evaluation integration the exam expects.

  73. Question 73 of 127A Generative AI Engineer is building a Databricks App that lets support agents ask questions and get answers grounded in internal PDFs. Requirements: users authenticate with corporate identity, the app must call a Mosaic AI Agent endpoint without exposing long-lived tokens in the browser, and answers must respect each user's permissions. Which approach meets these requirements?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Use a Databricks App backend to call the Agent endpoint with the app's credentials and enforce user identity/permissions via the app's authenticated context.

    A backend-for-frontend pattern keeps credentials server-side and passes the authenticated user context so per-user permissions are enforced. Embedding a PAT in browser JavaScript or an API key in the frontend exposes tokens to any client.

  74. Question 74 of 127A Generative AI Engineer evaluates an internal customer-support RAG assistant. Four domain experts review sampled answers each week in MLflow on dimensions like factual accuracy, completeness, and usefulness. Over time, expert ratings vary widely for the same responses, making the data unreliable for tracking improvement. The engineer needs a dependable evaluation process that reduces rater inconsistency while supporting iterative quality gains. What should they do?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Define clear rubrics, calibrate the SMEs on the criteria, and use the aligned judgments in mlflow.genai.evaluate() for consistent evaluation.

    Defining clear rubrics and calibrating the subject-matter experts aligns their judgments, producing consistent labels usable in mlflow.genai.evaluate. Simply averaging disagreeing scores or discarding disputed cases hides inconsistency rather than fixing it.

  75. Question 75 of 127A Generative AI Engineer is building a RAG application and must persist all conversational state – chat history, session records, and message IDs. The datastore must provide ACID transactions for reliable logging, support fast single-row reads and writes as users interact, and be governed centrally through Unity Catalog. Which datastore should the engineer use?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Use Databricks Lakebase – a fully managed, Unity Catalog-governed Postgres (OLTP) database – to store the chat, session, and message IDs.

    Databricks Lakebase is a managed Postgres OLTP database that provides ACID transactions, low-latency row-level access, and Unity Catalog governance. Delta tables excel at analytics but are not optimized for fast single-row reads and writes per interaction.

  76. Question 76 of 127A small company scrapes text from several websites and stores it in a Delta table. The volume is low – only a few hundred records – and the team wants to process the text to determine sentiment. They want the most cost-effective way to run this inference on Databricks. Which approach should they choose?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Run batch inference with the ai_query() SQL function against a pay-per-token Foundation Model API directly over the Delta table.

    The ai_query() function applies a foundation model to a Delta table column in one SQL statement with pay-per-token pricing and no always-on endpoint cost, which is ideal for a small batch. A real-time endpoint adds idle cost that a few hundred rows cannot justify.

  77. Question 77 of 127You are building a multi-stage workflow that chains multiple LLM interactions, integrates various external tools, and needs to simplify managing the connections between components. Which framework fits best, and why?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. LangChain – chains multiple LLM calls with built-in support for retrievers, tools, prompts, and integrations to simplify complex GenAI apps.

    LangChain is the intended answer because it abstracts the wiring between chains, retrievers, prompts, and tools. However, the scenario heavily overlaps with the previous question, so both LangChain and Haystack pipelines could be defended depending on emphasis on integration breadth.

  78. Question 78 of 127You are building a multi-stage reasoning system in Databricks using LangChain to answer user questions from company policy documents and then generate a social-media post summarizing the answer. How should you structure this workflow?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Configure embeddings for semantic search, use a Retriever to find relevant chunks, build a Chain that combines retrieval with answer generation, and optionally add a second Chain to create the social post.

    The staged design works because embeddings and a retriever ground the answer in the policy documents, and a chain links retrieval to generation, with an optional second chain for the post. The single-prompt option fails because it skips retrieval and risks hallucination.

  79. Question 79 of 127You are evaluating the performance of an LLM before deploying it for a customer support application in Databricks. Which option best represents a common objective during LLM evaluation?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Measure perplexity to understand the model's uncertainty in predicting the next token.

    The correct answer works because perplexity is a standard objective metric that reflects the model's uncertainty when predicting the next token. The other options describe training or infrastructure actions, not evaluation objectives, so they fail the question's scope.

  80. Question 80 of 127A Generative AI Engineer builds a Databricks RAG support app where chat messages are chunked to a maximum of 256 tokens. Low cost and responsive real-time answers matter more than handling very long conversations. Several model context-length options exist. Which is most appropriate?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Context length 256, smallest model 0.12 GB, embedding dimension 256.

    The correct answer works because matching context length to the 256-token chunks minimizes cost and latency, which the scenario prioritizes. Larger options like 1024 or 8192 waste capacity and increase cost when long conversations are not a requirement.

  81. Question 81 of 127A team builds an AI coding assistant on Databricks to generate and complete code in multiple languages, deploying via Foundation Model APIs and prioritizing high-quality code generation over speed or cost. Which model should they choose?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. CodeLlama-34B

    CodeLlama-34B is purpose-built for code generation and completion across many programming languages. Llama-2-70B is a general-purpose model, and BGE-Large produces embeddings rather than generating code.

  82. Question 82 of 127A Generative AI Engineer builds a document-retrieval system for a legal firm where each contract often exceeds 10,000 words, and the RAG model has a 512-token-per-chunk context limit. Which chunking strategy best ensures retrieval accuracy and context preservation?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Chunk into 512-token chunks with a 50-token overlap.

    Chunks at the maximum 512 tokens with a 50-token overlap preserve continuity across boundaries in long legal contracts. The 256-token option wastes context capacity, though a test-taker could argue smaller chunks improve retrieval precision, making the wording slightly debatable.

  83. Question 83 of 127A Generative AI Engineer is building an entertainment-focused gaming chatbot where responses are already accurate and relevant. The team wants to reduce repetitive conversations and keep players engaged over long play sessions. Which aspect should they prioritize?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Diversity of responses

    With accuracy and relevance already handled, response diversity is what keeps long conversations fresh and engaging. Randomness is uncontrolled variety and can hurt coherence, making it the strongest distractor to avoid.

  84. Question 84 of 127A Generative AI Engineer must select a model for an internal assistant that will be used by a small group of specialists. Latency and throughput are not important for this workload, but response accuracy is critical, and the data involved is sensitive so it must not leave the organization's governed Databricks environment. The engineer is comparing options from the Databricks Marketplace and Foundation Model APIs. Which choice best meets these requirements?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Deploy Llama-2-70B on Databricks Model Serving using Foundation Model APIs (with provisioned throughput), governed by Unity Catalog.

    A large open model served inside Databricks under Unity Catalog governance keeps sensitive data in-house and maximizes accuracy. The external GPT-4 option sends data outside the governed environment, which directly violates the requirement.

  85. Question 85 of 127A Generative AI Engineer compares zero-shot and few-shot prompting for a Q&A system. Which statement is correct?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Zero-shot gives no examples, while few-shot provides a small number of examples to guide behavior.

    Zero-shot prompting provides no examples, while few-shot prompting includes a handful of demonstrations to steer the model. Any option claiming zero-shot supplies examples reverses the definitions and is wrong.

  86. Question 86 of 127A Generative AI Engineer is comparing zero-shot, few-shot, prompt chaining, and chain-of-thought prompting in a Databricks RAG app. Which scenario correctly describes when to use chain-of-thought prompting?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. When the task involves multi-step reasoning and you want the model to show intermediate steps before the final answer.

    Chain-of-thought prompting is used for multi-step reasoning where the model shows intermediate steps before answering. Option D describes prompt chaining, which splits tasks into sequential sub-prompts rather than reasoning step by step.

  87. Question 87 of 127A Generative AI Engineer optimizes a RAG pipeline for internal document search. Responses sometimes include irrelevant context even though documents are correctly embedded and indexed in Databricks Vector Search; the team suspects chunking. Which approach most improves retrieval relevance for long, multi-section documents like manuals or policy guides?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Use hierarchical chunking that preserves multi-level context (section -> subsection -> paragraph), embedding both parent and child text.

    Hierarchical chunking preserves section structure and embeds both parent and child text, so retrieval captures broad and fine-grained context for long multi-section documents. The distractor about removing overlap cuts cost but reduces recall, which typically worsens relevance.

  88. Question 88 of 127A Generative AI Engineer plans to incorporate a third-party licensed dataset into a GenAI application that will be trained on the data and deployed commercially. To avoid legal risk from the dataset's licensing, which action should the engineer take?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Review the dataset's license and terms of use before using it, and confirm your intended use (training, RAG, commercial deployment) is permitted, securing the necessary rights up front.

    Reviewing the license and terms before use, and confirming training and commercial deployment are permitted, is the correct way to manage legal risk. Waiting until after deployment or only reacting to complaints exposes the organization to violations and does not secure the needed rights.

  89. Question 89 of 127A globally distributed team of business analysts already uses Microsoft 365 (Office 365) and collaborates in Microsoft Teams, with all identities managed in Microsoft Entra ID (Azure Active Directory). A Generative AI Engineer must give them access to a RAG assistant without requiring the team to purchase or adopt another separately licensed application, and analysts should sign in with their existing corporate identity. How should the engineer deliver the RAG interface?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Deploy the RAG agent as a Databricks App and configure SSO with the organization's Microsoft Entra ID (Azure AD) so analysts sign in with their existing Office 365 identity, then surface the app through the Microsoft Teams they already use.

    A Databricks App with SSO federated to the existing Microsoft Entra ID lets analysts use their current corporate identity with no new licensed application. Notebook-based access defeats the purpose of an assistant interface and adds workspace administration overhead.

  90. Question 90 of 127A Generative AI Engineer must pick an LLM for a customer-support chatbot, comparing Model A and Model B. A scores higher on correctness (0.95 vs 0.90) and relevance-to-query (0.92 vs 0.85); B scores higher on safety (0.95 vs 0.93), guideline adherence (0.92 vs 0.90), groundedness (0.90 vs 0.88), with lower latency (0.6s vs 0.8s) and fewer tokens (100M vs 150M). The organization prioritizes safety and policy compliance over small improvements in correctness, while maintaining good response quality and low latency.

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Model B, for its higher safety and lower latency.

    Model B is correct because the organization prioritizes safety and policy compliance, where B leads while still keeping strong accuracy and lower latency. Option D is also defensible, but B names safety and latency, the stated priorities.

  91. Question 91 of 127A Generative AI Engineer designs a recommendation system to match the most suitable employee to newly scoped client projects, based on (a) date availability and (b) how well the employee profile matches the project scope. Profiles and project descriptions are unstructured text, the team is very large, and the solution must be scalable. How should the system be architected?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. Check availability, embed all employee profiles into a vector store, and use the project scope as the query with availability filters to retrieve the best matches.

    Embedding employee profiles once into a vector store and querying with the project scope, plus availability filters, gives scalable semantic matching. Brute-force similarity over every profile doesn't scale for a very large team.

  92. Question 92 of 127A Generative AI Engineer built an application using Databricks Foundation Model APIs on provisioned throughput, but request volume is too low to justify it. They want a more cost-effective deployment that can still scale as traffic grows. Which approach should they choose?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Deploy with on-demand, pay-per-token pricing that optimizes cost for low volume.

    On-demand pay-per-token pricing is correct because it charges only for actual usage and still scales automatically as traffic grows. Switching models or external providers changes capability rather than fixing the billing model.

  93. Question 93 of 127A Generative AI Engineer at a consumer-tech company deployed a RAG app for product questions, but responses often include unrelated products. What should the engineer do to improve relevance?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Evaluate the quality and accuracy of the retrieved context to ensure the right documents are fetched.

    Unrelated products in RAG answers usually signal a retrieval problem, so first evaluate whether the right context is being fetched. Swapping the LLM targets generation, which is not the failing stage here.

  94. Question 94 of 127A Generative AI Engineer must integrate a data source feeding a GenAI app, but the original forum posts do not need to be preserved, and the organization wants to eliminate sensitive text before it can ever be indexed or retrieved by the GenAI application. What is the most effective way to keep this problematic text from the application?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Add a preprocessing step that redacts sensitive information from the Delta table before ingestion.

    Redacting sensitive information in a preprocessing step before ingestion ensures the text never reaches the index. Runtime governance filtering still lets sensitive text into the pipeline, so D is weaker when preservation isn't required.

  95. Question 95 of 127A Generative AI Engineer builds an LLM assistant for internal guidelines and procedures and must avoid hallucinations and prevent exposing restricted information to unauthorized users. Which approach would NOT be effective at preventing incorrect responses or data leaks?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Fine-tune the model on internal documents, assuming it will learn what is safe to share.

    Fine-tuning on internal documents does not guarantee the model learns access rules, so it can still hallucinate or leak confidential content. Guardrails, role-based access, and careful system prompts are all effective controls.

  96. Question 96 of 127A Generative AI Engineer is improving a RAG system after feedback that some responses contain inappropriate or offensive language. Which approach most effectively reduces such outputs?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. Curate and manually review upstream data before adding it to the RAG pipeline.

    Curating and manually reviewing upstream data before ingestion keeps offensive content out of the vector store and therefore out of responses. Restricting who can read the source data doesn't change what the model generates.

  97. Question 97 of 127When creating a prompt for a Generative AI model, which approach is most effective for ensuring the response follows a specific format?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Provide clear examples in the prompt that demonstrate the expected response format.

    Providing clear examples, essentially few-shot prompting, is the best way to steer the model toward a consistent output format. Vague or missing format instructions leave the structure to chance.

  98. Question 98 of 127A Generative AI Engineer sets up a Mosaic AI Vector Search index and must handle large embedding data efficiently while complying with index-creation limits. Which action is correct? Correct answer

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Ensure each row indexed into the Delta Sync Index does not exceed the documented 100 KB row-size limit.

    The Delta Sync Index enforces a documented 100 KB per-row size limit, so keeping each indexed row under it is correct. The other options cite limits that don't match the documented Vector Search constraints, so eliminate them on sight.

  99. Question 99 of 127A Generative AI Engineer designs prompts for an LLM app and wants them well-structured for accurate, consistent responses. Which are key characteristics of a good prompt?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: E. All of the above.

    A well-structured prompt combines all four components: instruction, context, input, and desired output format. Since each individual option is a valid component, the all-of-the-above choice is the only complete answer here.

  100. Question 100 of 127A Generative AI Engineer evaluates a deployed RAG app at a financial institution and must assess both the precision of generated answers and how faithfully the generator adheres to retrieved knowledge. Which metrics should they prioritize? Correct answer

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Precision @ K and Faithfulness.

    Precision at K measures relevance of the top retrieved chunks, and Faithfulness measures how closely the generated answer sticks to them. Latency and toxicity don't address groundedness, so they don't fit the stated requirement.

  101. Question 101 of 127A Generative AI Engineer wants to improve RAG data quality by filtering extraneous content, ensuring sensitive information and harmful language are excluded. Which approach best achieves this?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Apply a toxicity classifier and a PII-detection algorithm to the dataset.

    A toxicity classifier removes harmful language and PII detection removes sensitive information, directly meeting both stated goals. Deduplication and chunking improve quality but don't filter harmful or sensitive content.

  102. Question 102 of 127A Generative AI Engineer creates a Databricks Vector Search index and must ensure only specific columns (the primary key and an embedding column) are synchronized. Which option achieves this?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Use the columns_to_sync parameter to specify the primary key and embedding column.

    The columns_to_sync parameter explicitly restricts which columns the Vector Search index synchronizes. Sync modes and embedding options control refresh behavior, not column selection, so they can't filter what gets indexed.

  103. Question 103 of 127A Generative AI Engineer at a consumer-electronics company wants a Q&A chatbot over product manuals, component details, and troubleshooting guides. Which component would NOT contribute to building it effectively? Correct answer

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Encouraging users to submit long, detailed questions instead of concise ones.

    The correct answer works because concise queries produce focused embeddings and better retrieval, while verbose questions add noise and can degrade semantic search. For the exam, remember that an embedding model, vector database, and response LLM are all core RAG components.

  104. Question 104 of 127A Generative AI Engineer at a financial-analytics firm builds an LLM assistant for real-time company-performance insights, combining recent market news from the web with stock-price data in Delta tables. Which architecture should they implement?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. Build an agent with tools for SQL queries on Delta tables and real-time web search, feeding both into the LLM.

    An agent with a SQL tool for Delta tables and a web-search tool dynamically combines live structured and unstructured data at query time. Options that pre-summarize or push everything into a vector store fail because they cannot handle real-time, query-dependent lookups.

  105. Question 105 of 127A Generative AI Engineer has trained an LLM on Databricks and is preparing to deploy it for inference. Which workflow is the simplest and most efficient on Databricks?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. Log the model with MLflow during training, register it directly to Unity Catalog via the MLflow API, and start a serving endpoint.

    MLflow logging, Unity Catalog registration, and Model Serving is the simplest governed deployment path on Databricks. The Docker and Flask options require you to build and manage your own infrastructure, which defeats the low-setup goal.

  106. Question 106 of 127A Generative AI Engineer builds an agent-based LLM app for a Formula Racing team that must answer text questions about team history, fetch race schedules via an external API, and query tables with the latest standings. How should the system be designed? Correct answer

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Define a system prompt listing the available tools and build an agent that dynamically calls the right tool per query.

    A tool-using agent lets the LLM decide per query whether to call the schedule API, run a SQL query, or answer from history. Cramming data into the system prompt or relying on RAG alone cannot handle dynamic, external data sources.

  107. Question 107 of 127A Generative AI Engineer is improving a RAG chatbot for a retail support platform that occasionally produces offensive/inflammatory responses due to poor-quality retrieved content. Which action most effectively mitigates this? Correct answer

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Implement a human-reviewed data-curation process to filter and clean source documents before ingestion.

    Cleaning and curating source documents before ingestion removes the offensive content that the RAG pipeline would otherwise retrieve and echo. A disclaimer or faster re-indexing does not fix the underlying data-quality problem.

  108. Question 108 of 127A Generative AI Engineer builds an LLM summarizer over archived early-1900s articles. Summaries are good but include meta-comments like 'This summary was created by analyzing the key points.' Which adjustment best removes the unwanted commentary?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. Include few-shot examples in the prompt showing the exact summary format without explanations.

    Few-shot examples that show the exact desired summary format teach the model to skip self-referential commentary. Chunking or ingestion fixes address retrieval quality, which is not the issue here since the summaries are already good.

  109. Question 109 of 127A Generative AI Engineer at a vehicle-manufacturing company builds a support chatbot answering questions about car models, spare parts, and maintenance, relying on technical documents and service manuals. Which component would NOT contribute to accurate answers?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Encouraging users to ask long, overly detailed questions instead of concise ones.

    Verbose user questions add noise, ambiguity, and token overhead, which hurts retrieval accuracy and latency. The embedding model, generating LLM, and vector database are all essential parts of a document-grounded support chatbot.

  110. Question 110 of 127A company's RAG chatbot retrieves knowledge before generating a response. Fill in the end-to-end sequence a user query passes through: User Query -> __ -> __ -> __ -> __ -> Final LLM Response.

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. User Query -> Embedding Model -> Vector Search -> Context-Augmented Prompt -> Response-Generating LLM -> Final Response

    The correct RAG order embeds the query first, retrieves similar passages via vector search, merges them into a context-augmented prompt, and then generates the final response. Any flow that calls the LLM before retrieval breaks the grounding step.

  111. Question 111 of 127A Generative AI Engineer adds a reranker to a RAG pipeline to improve retrieved-context quality before generation. Fill in the correct order of components in this enhanced flow. Correct answer

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. User Query -> Embedding Model -> Vector Search -> Reranker -> Context-Augmented Prompt -> LLM -> Final Response

    A reranker sits after vector search retrieves candidate passages but before the context-augmented prompt is assembled. Placing the reranker before embedding or search makes no sense because there is nothing to rerank yet.

  112. Question 112 of 127A Generative AI Engineer builds a RAG app for TechNova Analytics whose source documents include a lot of unrelated material (ads, lifestyle articles, other companies' news). To ensure the system retrieves and summarizes only TechNova-related content, which approach should they implement?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Apply metadata or corpus filtering during retrieval to retrieve only TechNova-related documents, and reinforce this with a system prompt restricting responses to TechNova content.

    Filtering retrieval by metadata or corpus plus a system prompt keeps only relevant documents reaching the model, which is the recommended defense in depth. Prompt-only instruction fails because irrelevant documents still enter the context and can sway the answer.

  113. Question 113 of 127A Generative AI Engineer designs an LLM financial-insights assistant providing latest stock performance and related market news. Stock prices are in Delta tables; live headlines must be fetched from the internet. Which system design is most suitable?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Build an agent with tools for SQL queries on Delta tables and web search, then pass results to the LLM.

    An agent with a SQL tool for Delta tables and a web search tool for live headlines handles both structured and real-time data. Pure RAG fails here because live news cannot be pre-embedded into a vector store.

  114. Question 114 of 127A Generative AI Engineer in a corporate HR department builds an LLM assistant answering employee questions from internal HR policy PDFs (leave, benefits, payroll). Which high-level design best delivers accurate, context-aware answers?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Chunk the HR documents, embed them into a vector store, retrieve top-matching chunks for the query, and pass them to the LLM for answer generation.

    Chunking, embedding into a vector store, retrieving top matches, and grounding the LLM is the standard RAG design for document Q and A. Averaging whole-document embeddings loses fine-grained signal and hurts retrieval precision.

  115. Question 115 of 127A Generative AI Engineer deploys a customer-facing LLM app using the Databricks Foundation Model API with provisioned throughput. Responses go directly to users, and the engineer wants to prevent toxic, biased, or unsafe outputs with minimal extra setup or maintenance. Which solution is best?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Use Llama Guard through the Foundation Model API to automatically detect and filter unsafe responses.

    Llama Guard via the Foundation Model API provides built-in safety filtering with the least setup and maintenance. Regex rules miss most unsafe phrasing, and self-evaluation LLM calls add cost, latency, and complexity.

  116. Question 116 of 127A Generative AI Engineer has trained a foundation model exceeding 150 GB in the Dev workspace. Dev, Test, and Prod are all Unity Catalog enabled. To promote the model to Production following Databricks MLflow best practices for reproducibility and governance, what is the correct sequence?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Log the model in Dev with MLflow, register it in the Unity Catalog Model Registry, validate the same registered model version in Test, grant Production access using Unity Catalog permissions, and deploy the same approved model version in Production.

    MLflow logging plus Unity Catalog Model Registry promotes one validated model version across environments with governance and lineage intact. Manual file copies break reproducibility, and retraining in Production is wasteful and error prone.

  117. Question 117 of 127A Generative AI Engineer builds an LLM virtual assistant for a healthcare org. It must handle routine questions (educational materials via RAG) but, for emergencies, must avoid giving medical advice and instead refer the user to a hotline/doctor. A user says: 'I've had a severe headache for two days and feel dizzy.' What is the expected behavior per responsible-AI and system-design best practices?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Trigger a safety/contextual guardrail that detects the emergency, halts normal generation, and returns an emergency message to contact a doctor or hotline immediately.

    A safety guardrail should detect emergency intent, stop normal generation, and return a fixed referral message to a doctor or hotline. Generating advice with a disclaimer is insufficient for potentially serious medical situations.

  118. Question 118 of 127A Generative AI Engineer builds a RAG system for a manufacturer's equipment manuals containing PDF pages, diagrams, and images with text captions, and must retrieve relevant visual and textual information for technical questions. Two options: OCR-based text/caption extraction stored as metadata, or a multimodal embedding model like CLIP embedding both text and images into a shared vector space. Which is most reliable for semantically related image-text retrieval while balancing accuracy and scalability?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Option 2 – Multimodal embedding (CLIP): more complex and compute-heavy, but provides a unified image-text embedding space, improving retrieval relevance.

    A multimodal embedding model like CLIP maps images and text into one shared vector space, enabling true cross-modal semantic retrieval of visuals alongside text. OCR with captions is fast but only matches on extracted text, missing semantic links between diagrams and their content.

  119. Question 119 of 127A Generative AI Engineer has deployed an LLM virtual assistant for an e-commerce company to handle support inquiries in production. Which metric should they prioritize to evaluate real-time performance?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Number of customer queries successfully handled per unit of time (throughput).

    Throughput measures how many queries the assistant handles per unit of time, which reflects real-time production performance and scalability. Leaderboard rankings and training-time perplexity don't measure live serving behavior.

  120. Question 120 of 127A Generative AI Engineer is evaluating an LLM used for language translation to ensure safe, high-quality output. When qualitatively assessing responses, which indicator should be prioritized to judge whether translations are safe and reliable?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. The accuracy and relevance of the translated responses.

    Accuracy and relevance of the translations are the priority because they determine whether meaning is preserved and the output is trustworthy. Mirroring source-language structure can actually produce poor translations, so B fails.

  121. Question 121 of 127A Generative AI Engineer's app retrieves data from various text sources, some containing problematic text that may violate compliance. Which alternative approach best mitigates this?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Use a text-classification model to identify and flag problematic content for review.

    A text-classification moderation model catches nuanced problematic content that rule-based matching misses and routes it for human review. Regular expressions only catch literal phrases and fail on paraphrased violations, making them weaker here.

  122. Question 122 of 127A Generative AI Engineer must handle customer-support inquiries for a large e-commerce platform, ranging from simple account issues to complex cross-departmental queries (order processing, logistics). Which chain type should they select?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Multi-agent system

    A multi-agent system lets specialized agents handle account, order, and logistics tasks under a supervisor, matching the cross-departmental scope. A single agent or deterministic chain can't scale across that diverse a workflow.

  123. Question 123 of 127A Generative AI Engineer builds a healthcare customer-assistance chatbot that must only answer health-related questions and must refuse politics or unrelated topics with a fixed message. Which framework should they implement to enforce this?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: B. Compliance Guardrail

    Compliance guardrails enforce regulatory and policy rules, including restricting the agent to approved topics and refusing off-topic requests. Safety is the strongest distractor, but it targets harmful or unsafe content, not topic-scope and policy compliance.

  124. Question 124 of 127A Generative AI Engineer at a retail-tech company launched a RAG product assistant, but customers report it sometimes answers about different/unrelated products. What should the engineer do to improve relevance and precision?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Evaluate and improve the retrieved context before generation to pass the most relevant data to the LLM.

    When a RAG assistant drifts off topic, fix retrieval quality first through better chunking, filtering, and evaluation before generation. Swapping models or algorithms treats symptoms rather than the actual context being passed in.

  125. Question 125 of 127A Generative AI Engineer builds a RAG app for a financial-services firm processing large volumes of PDFs, regulatory filings, and client emails, and is evaluating Haystack vs LlamaIndex before integrating Databricks Foundation Model APIs. Which statement correctly describes how the two frameworks differ in design philosophy?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: A. Haystack focuses on retrieval and Q&A pipelines, while LlamaIndex emphasizes indexing, data connectors, and integrating data with LLMs via structured context.

    Haystack is pipeline-centric around retrievers and question answering, while LlamaIndex centers on indexing, connectors, and feeding structured context to LLMs. The other options describe capabilities neither framework actually has.

  126. Question 126 of 127A Generative AI Engineer designs a ticket classification and retrieval system for an IT firm with over 1 million historical tickets, using embeddings for semantic search. They must choose a cost-effective embedding strategy on Databricks Foundation Model APIs considering scale and long-term affordability. The ticket corpus is continuously growing, and thousands of new tickets are embedded every day. Which approach is most cost-effective at this scale?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: D. Provisioned throughput embeddings – pre-allocate capacity for bulk embedding and reuse the endpoint for future tickets.

    For over a million tickets with thousands of daily embeddings, provisioned throughput gives predictable capacity and lower cost per embedding. Pay-as-you-go suits one-time or sporadic workloads, not sustained high-volume embedding.

  127. Question 127 of 127A Generative AI Engineer at a vehicle-manufacturing company designs an LLM chatbot for questions about car models, spare parts, and maintenance, with data organized by vehicle type and model specs. Which component would NOT contribute effectively?

    Tap an answer — you get instant feedback and the reasoning.

    Show answer & explanation

    Correct answer: C. Encouraging users to submit long, wordy questions.

    Encouraging verbose questions adds noise, cost, and latency without improving retrieval quality. The embedding model, vector database, and generation LLM are all core RAG components that directly drive relevant answers.

New video rounds on @CertPunch.

Study on mobile

Get CertPunch for iOS or Android.

Website sessions are saved in this browser tab. They do not transfer to the apps.

Scroll to Top