Cheat sheetGCP-03

Prompting, Grounding & RAG

GCP GenAI Leader / Prompting, Grounding & RAG

Quality comes from technique: prompt first, then ground / RAG, and fine-tune only if a gap remains -- cheaper levers before retraining.

Prompt design
First leverClear instructions, context, examples, and constraints -- cheapest way to lift quality.
Grounding
Trusted sourcesBase answers on your data or verified references; enables citations and cuts hallucination.
RAG
Retrieve then answerFetch relevant docs via embeddings and insert into the prompt so the model answers from them.
Fine-tuning
Last resortRetrain on domain data only when prompting and grounding cannot close the gap.

Instruct grounded models to answer only from retrieved context and to say when they do not know, then re-index sources when content changes.

RAG winSupport bot cites current KB articles; re-index on edit -- no retraining, less stale.
Anti-patternFine-tuning a model on today's docs, then watching answers go stale next month.
Order: prompt -> ground/RAG -> fine-tune (only if needed).
RAG = embeddings + vector search retrieve context into the prompt.
Grounding reduces, not eliminates, hallucination; constrain to context.
promptinggroundingragfine-tuninghallucination
review in 6d