Prompting, grounding and RAG for the Generative AI Leader exam: fixing hallucinations and picking the right technique
"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.
| Limitation | How it appears in questions | Main fix |
|---|---|---|
| Hallucination | The model presents wrong or invented information as fact (practice question #8) | Grounding, RAG, citing sources, human review |
| Knowledge cutoff | Unaware of events, products or policies after training | Grounding with Google Search or enterprise data |
| Data dependency | Poor results for users, languages or phrasing missing from training data (question #11) | More representative data, fine-tuning |
| Bias and fairness | Skewed results by gender, region or age | Balanced data, per-group evaluation, human in the loop, transparency |
| Edge cases | Rare situations, unusual inputs | Testing, fallback rules, hand-off to humans |
Five fixes and when to choose each
| Fix | What it does | Choose when | Trade-off |
|---|---|---|---|
| Prompt engineering | Clearer instructions, examples, roles, output formats | Always the first step; the problem is how you ask | Cheap and fast; adds no new knowledge |
| Grounding | Ties answers to verifiable data sources | Fresh or enterprise information is needed; reduce hallucinations | Needs quality data sources |
| RAG | Retrieves relevant passages and adds them to the prompt | Large, frequently updated internal document sets | Needs search infrastructure; quality depends on retrieval |
| Fine-tuning | Further trains the model on specialized data | A stable style, format or domain vocabulary prompting can't achieve | Effort, labeled data, retraining when data changes |
| Human in the loop | People review or correct output before use | High-stakes decisions: health, lending, legal | Slower, 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)
- Prepare: documents are split into chunks and turned into embeddings (vectors representing meaning) stored in a search index.
- Retrieve: when a user asks, the system finds the chunks closest in meaning to the question.
- Augment: those chunks go into the prompt with an instruction like "answer only from the following documents".
- 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
| Technique | Idea | Short example |
|---|---|---|
| Zero-shot | State the task, no examples | "Classify this review as positive, negative or neutral: …" |
| One-shot / few-shot | One or a few examples for the model to imitate | Three labeled reviews, then the review to classify |
| Role prompting | Assign a role to steer tone and perspective | "You are a bank's customer service specialist…" |
| Prompt chaining | Split a big task into a chain; each output feeds the next prompt | Summarize feedback → group by theme → write a report |
| Chain-of-thought | Ask the model to reason step by step before concluding | "Explain each step, then give the answer" |
| ReAct | Interleave reasoning and actions such as tool calls or lookups | The 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
| Parameter | Effect | Guidance |
|---|---|---|
| Temperature | Randomness when choosing the next token | Low for consistent answers and extraction; higher for creative writing |
| Top-p (nucleus sampling) | Sample only from tokens whose cumulative probability reaches p | Lower p for more focused answers |
| Token count / output length | Caps answer length | Controls cost and verbosity |
| Safety settings | Thresholds for blocking harmful content | Stricter 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.