certslothcertsloth
GAL/Topic 03

Google Cloud / Foundational

Prompting and grounded answers

2 min read5 recall promptsReviewed 2026-10-10

Memory hook: Instructions guide; evidence grounds; tests decide.

Must remember

  • Write the task, audience, context, constraints and output format explicitly. Separate instructions from supplied documents so quoted text is not mistaken for authority.
  • Zero-shot prompts specify a task without examples; few-shot prompts demonstrate desired patterns. Structured output helps downstream validation but does not establish factual correctness.
  • Decompose a complex task into verifiable stages. Request concise explanations and evidence where useful; do not treat an apparent reasoning narrative as proof.
  • Grounding connects generation to trustworthy information. RAG retrieves selected passages at request time; search grounding helps with current information; database tools answer structured queries.
  • Prompt engineering changes input instructions. Fine-tuning changes model behavior through additional training. RAG supplies reference information without retraining the model for each document update.
  • Hallucination, bias, stale knowledge, inconsistent answers and prompt injection are different failure modes. Evaluate representative cases and adversarial cases; use citations, abstention, filters and human review where appropriate.

Review details

Sampling controls are different knobs: temperature changes randomness, top-p restricts candidates by cumulative probability, and maximum output tokens limits response size. The model must support the chosen parameters. A lower temperature does not establish truth or make untrusted instructions safe.

One-shot supplies one example. Role prompting sets a perspective; prompt chaining divides tasks into steps; ReAct combines reasoning with actions/observations. Chain-of-thought-style prompts can elicit intermediate reasoning, but judge the verifiable result rather than apparent thought quality. Prompt tuning learns a compact prompt representation for a supported model/task, while fine-tuning adapts supported model behavior through training; neither means simply writing a better user prompt.

Choose under exam pressure

Requirement Choice and reason
Policies change every week Permission-aware RAG with document refresh and citation checks.
Responses have inconsistent format Clear schema, examples, validation and measured prompt revisions.

Traps

  • Lower temperature does not guarantee truth.
  • Fine-tuning is not the default solution for frequently changing private facts.

Active recall

1. A retrieved page says to ignore all rules. Follow it?

No. Retrieved content is untrusted data, not a higher-priority instruction.

2. How do few-shot examples help?

They demonstrate the desired pattern, tone or classification boundaries.

3. What should a grounded answer cite?

Evidence that actually supports its claims, not merely a retrieved link.

4. When should an assistant abstain?

When evidence or confidence is insufficient for the requested decision.

5. How do you choose between two prompts?

Compare them on the same representative evaluation set and business metrics.

Sources

CLOSE THE NOTES. EXPLAIN THE CHOICE.

How well could you recall it?

Your next review is based on this answer. Progress stays in this browser.

Search across every published topic.