Skip to content

Generative AI Engineer Associate · Domain 3: Application Development · 30% of the exam

Task 3.2: Augment a prompt with additional context from a user's input based on key fields, terms, and intents; Create a prompt that adjusts an LLM's response from a baseline to a desired output

Pulling key fields and intents into retrieval filters and prompt context, and refining instructions, examples and output formats to move a baseline response to the one the business wants.

Study it

Sample questions

Try each one before opening the answer. Every option is explained, with the Databricks documentation page that proves it.

Question 1 · choose 1

A Genie Agent answers "revenue by account owner" by joining the orders and accounts tables on the wrong columns. The tables declare no primary or foreign keys, and the correct link is accounts.id = orders.account_id. How should the author move the answers to the desired output?

  1. ADefine a join relationship with that condition in the knowledge store
  2. BAdd a column synonym "account" to the orders.account_id column
  3. CHide the orders table so that Genie answers from the accounts table alone
  4. DRaise the SQL warehouse size so Genie can try more join paths
Show the answer and why
  • ADefine a join relationship with that condition in the knowledge store

    Correct

    Join relationships tell Genie how tables relate so that it writes accurate JOIN statements; for complicated conditions a SQL expression can record the join.

  • BAdd a column synonym "account" to the orders.account_id column

    Incorrect

    Synonyms help match user wording to a column; they do not tell Genie which columns link two tables.

  • CHide the orders table so that Genie answers from the accounts table alone

    Incorrect

    Revenue lives in orders, so hiding it removes the data the question needs instead of fixing the join.

  • DRaise the SQL warehouse size so Genie can try more join paths

    Incorrect

    Warehouse size changes query speed and concurrency, not which join condition Genie writes.

The Genie knowledge store holds agent-scoped metadata, synonyms, SQL expressions and join relationships. Primary and foreign keys declared in Unity Catalog are saved as join relationships automatically; without them, the author defines the relationship so that Genie joins the tables the approved way.

Question 2 · choose 1

An ai_extract job on vendor invoices returns invoice_date in mixed formats such as "3 Feb 2026" and "02/03/26", and vendor_name as trading names instead of legal names. The schema lists only field names and types. Which change moves the output to the desired form?

  1. APin ai_extract to version 1.0 in the options map for stable output
  2. BRun ai_fix_grammar on the extracted values afterwards
  3. CRun ai_summarize on each invoice before extracting the fields
  4. DAdd property descriptions, e.g. "Date in YYYY-MM-DD format"
Show the answer and why
  • APin ai_extract to version 1.0 in the options map for stable output

    Incorrect

    Version 1.0 is a legacy interface that does not support field descriptions or rich schemas.

  • BRun ai_fix_grammar on the extracted values afterwards

    Incorrect

    ai_fix_grammar corrects grammatical errors in text; it does not reformat dates or look up legal names.

  • CRun ai_summarize on each invoice before extracting the fields

    Incorrect

    A summary can drop the fields the job needs, and it does not tell the model which format to use.

  • DAdd property descriptions, e.g. "Date in YYYY-MM-DD format"

    Correct

    Each property in an ai_extract JSON schema can carry an optional description that guides extraction, which is where a format or a meaning such as legal name belongs.

ai_extract version 2.0 and later accepts a JSON schema with types and an optional description per property. Descriptions are the lever for steering what a field means and how its value is written.

Question 3 · choose 1

Store managers ask a Genie Agent questions such as "weekly sales for store 1047" and "weekly sales for store 2210". The analytics team has an approved query and wants Genie to reuse it with the store number from each question and mark those answers as verified. What should the author add?

  1. AA text instruction that contains the approved query
  2. BA parameterized example SQL query with :store_id
  3. CA column synonym that maps "store" to store_id
  4. DA benchmark question for each store number
Show the answer and why
  • AA text instruction that contains the approved query

    Incorrect

    Instructions guide how Genie writes SQL, but they are not trusted assets, so answers are not marked as verified.

  • BA parameterized example SQL query with :store_id

    Correct

    Parameterized example queries take a value from the user's question at runtime and reuse the approved structure; in chat mode, using one gives a verified answer.

  • CA column synonym that maps "store" to store_id

    Incorrect

    Synonyms help Genie pick the right column; they do not reuse an approved query or produce verified answers.

  • DA benchmark question for each store number

    Incorrect

    Benchmarks are for evaluating the agent; Genie does not use them to answer users.

A parameterized example SQL query gives a verified answer when Genie uses it. A parameter turns the values users type, such as a store number, into inputs of the approved query.

Question 4 · choose 1

An author adds an example SQL query to a Genie Agent for a common question about open pipeline by region. What should the example's title be?

  1. AThe name of the table that the query reads
  2. BA summary of the SQL logic, written for reviewers
  3. CThe most typical phrasing of the user's question
  4. DA unique ID such as EX-001
Show the answer and why
  • AThe name of the table that the query reads

    Incorrect

    A table name does not help Genie match how users ask questions.

  • BA summary of the SQL logic, written for reviewers

    Incorrect

    Logic belongs in SQL comments; the title should mirror the user's question.

  • CThe most typical phrasing of the user's question

    Correct

    Using the way users usually ask the question as the title improves Genie's ability to match prompts to the example.

  • DA unique ID such as EX-001

    Incorrect

    An ID carries no wording for Genie to match against.

Give each example query its SQL and a title in the users' own words. Genie can use a matching example directly, or learn from it to structure SQL for similar questions.

Question 5 · choose 1

A team swaps the chat model behind its RAG chain for a cheaper one and keeps the prompt template unchanged. Answers get worse. What guidance applies?

  1. APrompts often do not transfer across models
  2. BCheaper models ignore system prompts
  3. CPrompt templates must be retrained together with the new model
  4. DThe index must be rebuilt for each model
Show the answer and why
  • APrompts often do not transfer across models

    Correct

    Each model responds differently, so prompts should be re-tested and adapted when the model changes.

  • BCheaper models ignore system prompts

    Incorrect

    Price does not decide whether a model follows system prompts.

  • CPrompt templates must be retrained together with the new model

    Incorrect

    Prompt templates are text, not trained artifacts.

  • DThe index must be rebuilt for each model

    Incorrect

    The chat model change does not affect the retrieval index.

Prompts that work well for one model may not for another; experiment with prompt formats and lengths and be ready to refine prompts when switching models.

Question 6 · choose 1

Users ask about "car maintenance" while manuals say "vehicle servicing" and "auto repair". Retrieval misses many relevant sections. Which query-side technique addresses this?

  1. AShorten the query to its first keyword before searching
  2. BExpand the query into synonym variations, searching each
  3. CLower num_results to 1 so that only the top hit is kept
  4. DRewrite the manuals so that they use only one wording
Show the answer and why
  • AShorten the query to its first keyword before searching

    Incorrect

    Dropping words loses meaning and does not add the missing terms.

  • BExpand the query into synonym variations, searching each

    Correct

    Query expansion generates variations of the query to find documents that use different terminology, improving recall.

  • CLower num_results to 1 so that only the top hit is kept

    Incorrect

    Fewer results lower recall further.

  • DRewrite the manuals so that they use only one wording

    Incorrect

    Changing the source text to match one wording is impractical and loses content.

Query optimization techniques include expansion (multiple variations, deduplicated results) and reformulation (breaking down or rephrasing complex queries).

Question 7 · choose 1

While testing a Genie Agent, the author edits the SQL that Genie generated for "open pipeline by region" until the result is right. The author wants Genie to answer similar questions the same way from now on. What should the author do with the corrected response?

  1. AAdd the question as a benchmark so that Genie learns from it
  2. BPaste the corrected SQL into the general text instructions
  3. CRename the columns in the table to match the user's words
  4. DClick Add as instruction to save it as an example SQL query
Show the answer and why
  • AAdd the question as a benchmark so that Genie learns from it

    Incorrect

    Benchmarks score the agent's accuracy; they do not teach Genie how to answer.

  • BPaste the corrected SQL into the general text instructions

    Incorrect

    Text instructions are for global guidance; SQL for one kind of question belongs in an example query.

  • CRename the columns in the table to match the user's words

    Incorrect

    Renaming source columns is not needed; synonyms and descriptions handle wording, and the SQL logic still has to be taught.

  • DClick Add as instruction to save it as an example SQL query

    Correct

    Add as instruction opens the example SQL editor filled with the question and the corrected SQL, so Genie can reuse it for related questions.

Authors with CAN EDIT can correct generated SQL, run it and save it with Add as instruction. Example SQL queries let Genie match user prompts to verified SQL and learn from them for related questions, while benchmarks only measure accuracy.

Practice domain 3 →Practice all domains →