Prompting, grounding and RAG for the Generative AI Leader exam: fixing hallucinations and picking the right technique

5 min read

"Techniques to improve gen AI model output" is about 20% of the Generative AI Leader exam, but the same knowledge shows up in product and strategy questions. Questions usually describe a problem (a chatbot gets a new policy wrong, a model invents citations, answers vary every time) and ask for the most appropriate fix. This article organizes foundation model limitations, the fixes and when to choose each, prompting techniques with examples, sampling parameters, and Google Cloud's grounding/RAG offerings.

Key takeaways

  • Improving model output is about 20% of the Generative AI Leader exam, and this knowledge also appears in product and strategy questions.
  • Five fixes: prompt engineering, grounding, RAG, fine-tuning, human in the loop; if the problem is information, think grounding or RAG; if it is how the model answers, try prompt engineering first.
  • Fine-tuning doesn't solve outdated information, and raising temperature makes answers more random, not more accurate.
  • RAG lowers hallucination risk but doesn't guarantee zero; high-risk decisions still need a human in the loop.

Foundation model limitations: name the problem correctly

The first step in each question is recognizing which limitation it describes. The exam guide lists data dependency, knowledge cutoff, bias, fairness, hallucinations and edge cases.

LimitationHow it appears in questionsMain fix
HallucinationThe model presents wrong or invented information as fact (practice question #8)Grounding, RAG, citing sources, human review
Knowledge cutoffUnaware of events, products or policies after trainingGrounding with Google Search or enterprise data
Data dependencyPoor results for users, languages or phrasing missing from training data (question #11)More representative data, fine-tuning
Bias and fairnessSkewed results by gender, region or ageBalanced data, per-group evaluation, human in the loop, transparency
Edge casesRare situations, unusual inputsTesting, fallback rules, hand-off to humans

Five fixes and when to choose each

FixWhat it doesChoose whenTrade-off
Prompt engineeringClearer instructions, examples, roles, output formatsAlways the first step; the problem is how you askCheap and fast; adds no new knowledge
GroundingTies answers to verifiable data sourcesFresh or enterprise information is needed; reduce hallucinationsNeeds quality data sources
RAGRetrieves relevant passages and adds them to the promptLarge, frequently updated internal document setsNeeds search infrastructure; quality depends on retrieval
Fine-tuningFurther trains the model on specialized dataA stable style, format or domain vocabulary prompting can't achieveEffort, labeled data, retraining when data changes
Human in the loopPeople review or correct output before useHigh-stakes decisions: health, lending, legalSlower, needs staff

Reading rule: if the problem is information (new, internal, must be accurate), think grounding/RAG. If the problem is how the model answers (tone, format, a repeated specialized task), think prompt engineering first, fine-tuning second.

Grounding: three kinds of data

The exam guide distinguishes grounding with first-party enterprise data, third-party data and world data.

  • Enterprise data: internal documents, product catalogs, policies, support tickets. For internal chatbots and customer care assistants.
  • Third-party data: specialized data from partners or providers.
  • World data: public, up-to-date web information via Grounding with Google Search.

Google Cloud offerings listed in the guide: pre-built RAG with Agent Search (formerly Vertex AI Search), RAG APIs for teams that want control over each step, and Grounding with Google Search. Example: an e-commerce company with a large, constantly updated catalog that wants more accurate search for customers and support staff uses pre-built RAG with Agent Search (question #T2-23). An agent that must check real inventory needs live data from a database rather than the model's built-in knowledge (question #T2-21).

How RAG works (enough for a leader)

  1. Prepare: documents are split into chunks and turned into embeddings (vectors representing meaning) stored in a search index.
  2. Retrieve: when a user asks, the system finds the chunks closest in meaning to the question.
  3. Augment: those chunks go into the prompt with an instruction like "answer only from the following documents".
  4. Generate: the model answers, optionally with citations.

Business benefits: no retraining when documents change, verifiable answers, control over what data the model sees. Risk: if the documents are wrong or outdated, so are the answers; data quality is still the foundation.

Prompting techniques with examples

TechniqueIdeaShort example
Zero-shotState the task, no examples"Classify this review as positive, negative or neutral: …"
One-shot / few-shotOne or a few examples for the model to imitateThree labeled reviews, then the review to classify
Role promptingAssign a role to steer tone and perspective"You are a bank's customer service specialist…"
Prompt chainingSplit a big task into a chain; each output feeds the next promptSummarize feedback → group by theme → write a report
Chain-of-thoughtAsk the model to reason step by step before concluding"Explain each step, then give the answer"
ReActInterleave reasoning and actions such as tool calls or lookupsThe agent decides it needs inventory data, calls the API, then answers

ReAct bridges to agents: an agent loops through observing, reasoning, planning and acting, and uses tools (extensions, functions, data stores, plugins) to interact with the outside world.

Sampling parameters

ParameterEffectGuidance
TemperatureRandomness when choosing the next tokenLow for consistent answers and extraction; higher for creative writing
Top-p (nucleus sampling)Sample only from tokens whose cumulative probability reaches pLower p for more focused answers
Token count / output lengthCaps answer lengthControls cost and verbosity
Safety settingsThresholds for blocking harmful contentStricter for public-facing apps

A question like "the chatbot gives a different answer each time to the same policy question" usually points to lowering temperature; "the chatbot gets the new policy wrong" points to grounding, not parameter tweaks.

Choosing models and monitoring after launch

  • Choose a foundation model by modality (text, image, video), context window, security, availability, cost, performance and customization. For very long documents, pick a model with a large context window such as Gemini (question #T2-22).
  • Continuous monitoring: regular quality evaluation, KPIs, versioning, drift tracking, security updates. Automatically upgraded models can change behavior, so keep a fixed evaluation set for comparison.

Common traps

  • Choosing fine-tuning for outdated information: costly, and it goes stale again when data changes.
  • Raising temperature "for more accurate answers": higher temperature increases randomness.
  • Skipping human in the loop for high-stakes decisions: Google's exams weigh accountability heavily.
  • Assuming RAG eliminates hallucinations: it reduces the risk, it doesn't guarantee correctness.

Start practicing

Try the 60 free Generative AI Leader questions, watching for hallucination, grounding and prompting questions; then take a timed exam (Pro). For the big picture, read the Generative AI Leader study guide.

Official sources