Prompt Engineering by Google - Cheat Sheet - April 2025
Prompt Engineering by Google - Cheat Sheet - April 2025
ern Prompt Example 1 Prompt Example 2 Best For Use case 1 Use case 2 Use case 3
Describe the task you want to complete Perform task X on input Y Summarize the following news article in one Translate to Spanish: Simple tasks, direct questions, common Classifying movie review sentiment Answering a simple factual question Summarizing a short, straightforward text.
sentence: instructions where model has strong directly. ("What is the capital of France?").
Zero-shot Prompting Supply the single input to operate on Input: Where is the nearest pharmacy? prior knowledge.
Input: The city council of Riverton voted 6‑1 on
Tuesday to …
Describe the task. Task X Convert movie titles to emoji. Categorize emails as “Work”, “Personal”, or “Spam” Guiding output format/structure, tasks Parsing pizza orders into a specific Translating sentences using a very Performing a novel classification task
needing specific patterns, improving JSON format (PDF example). specific, less common style based on provided examples.
Provide one or more EXAMPLE input → output EXAMPLE: EXAMPLE: EXAMPLE: accuracy over zero-shot, adapting to demonstrated in examples.
pairs. A₁ → B₁ “Jaws” -> 🦈🌊 “50% off shoes this weekend only!” -> Spam novel tasks.
Few-shot Prompting
End with the Actual Input followed by an EXAMPLE: EXAMPLE: EXAMPLE:
arrow, signalling the model to continue. A₂ → B₂ “Titanic” -> 🚢🧊💔 “Can you send the Q2 budget file?” -> Work
Optionally include constraints (language, style, ```”* ... and returns a pandas DataFrame ready for
performance, libraries) plotting
Code Prompting *“Translate this Bash one‑liner into Windows
PowerShell.”*
---