Google Prompting Essentials Notes
Prompt Framework: Your AI Communication Cheat Sheet
π₯ Important to Remember: The core idea is to provide clear and specific directions to any generative AI tool. This framework is designed to help you do just that!
I. Introduction: What is a Prompt?
- Prompt: Any input you give to a generative AI model to get a desired output.
- Goal: To understand how to give clear and specific directions to AI.
- The Framework’s Acronym:T.C.R.E.I. (Thoughtfully Create Really Excellent Inputs)
- Task
- Context
- References
- Evaluate
- Iterate
II. Components of a Great Prompt
A. Specify the Task
- What it is: The core request; what you want the AI to do.
- Why it’s important: It’s the foundation of your prompt. Vague tasks lead to irrelevant/incorrect outputs.
- π₯ Key Details to Include in Your Task:
- Persona: The expertise or perspective you want the AI to adopt (e.g., “You’re a movie critic…”). Or the target audience for the output.
- Format: The desired structure for the output (e.g., “Create a table,” “bulleted list”).
- Example: “Youβre a movie critic that specializes in Italian film. Create a table that contains the greatest Italian films of the 1970s…”
B. Include Necessary Context
- What it is: Background information, goals, reasons for the task, or what you’ve already tried. The more relevant details, the better.
- Why it’s important: Rounds out the AI’s understanding of your needs. Context can be the longest part of your prompt.
- π₯ Important Tool: Delimiters
- What they are: Special symbols used to keep prompts tidy and differentiate parts of your input (like labels or guard rails).
- Why they’re important: They increase the likelihood of getting a useful output.
- Examples:
- Triple quotes (“””): Clearly separate blocks of text.
- XML tags (<task>, </task>): Label different sections for complex prompts.
- Markdown tags (_, **): Preserve formatting in your input text.
- Example: (Context added to a DNA discovery prompt, explaining the audience and previous feedback.)
C. Provide References
- What it is: Examples or additional resources that show the AI what you want its output to resemble.
- Why it’s important: It’s like giving a hairstylist a picture; it helps the AI emulate a specific style or content.
- Details: Can include text, images, or audio. Clearly identify how they fit your objective.
- π₯ Number of References: Two to five examples are usually enough.
- Example: (Providing sample product descriptions to guide the AI’s writing style for a new product.)
III. The Iterative Process
A. Evaluate Your Output
- What it is: Critically checking the AI’s generated response.
- Why it’s important: Different AI models produce different results. Even the same prompt can yield varied outputs. Always check for accuracy, bias, relevance, and consistency before using AI-generated content.
- π₯ Key Action: If the output isn’t what you need, move to the next step: Iterate!
B. Take an Iterative Approach
- What it is: Continuously clarifying and refining your prompt until you get the desired output.
- π₯ Key Mantra: A.B.I. – Always Be Iterating.
- Why it’s important: It’s rare to get the perfect output on the first try. Refining helps you zero in on what works.
Conclusion: By consistently applying the T.C.R.E.I. framework (Task, Context, References, Evaluate, Iterate), you’ll be able to give generative AI tools the precise information they need to produce useful and relevant outputs, maximizing their potential for you.
…
Tips on Iteration
When iterating on prompts to get better results from AI, think of it like a conversation where you’re constantly clarifying and guiding. Here are 5 tips to iterate better:
- Pinpoint the Mismatch: Don’t just re-roll or rewrite randomly. When an output isn’t right, first analyze exactly where and why it fell short. Did it miss context? Was the tone off? Did it fail to follow a specific instruction? Identifying the precise problem helps you make targeted adjustments to your next prompt version instead of guessing.
- Add Specificity Incrementally: Start with a reasonably clear prompt, but if the output is too generic or misses nuances, don’t overwhelm the AI with a huge block of new text. Instead, add specific details or constraints one or two at a time. For example, if it’s too broad, add a time period. If it lacks detail, add a persona. This allows you to see the impact of each refinement.
- Refine Constraints and Format: If the output’s structure, length, or style isn’t right, directly address those aspects in your next iteration. Experiment with explicit instructions on format (e.g., “bulleted list,” “500 words,” “in a conversational tone”) or add specific requirements (e.g., “include three examples,” “focus only on economic impacts”). Small tweaks to these constraints can drastically alter the output.
- Clarify Ambiguity or Misinterpretation: If the AI seems to have misunderstood a word, phrase, or concept in your prompt, rephrase that specific part using simpler, more direct language or provide an example. Sometimes, a seemingly clear instruction might have multiple interpretations for an AI; rephrasing with clearer context can resolve this.
- Break Down Complex Requests (Chaining): For very intricate or multi-step tasks, if iterating on one long prompt isn’t working, break the task into smaller, sequential prompts. Guide the AI through step one, then use its output as input or context for step two, and so on. This allows you to refine each sub-task individually, leading to a better overall result.
