Stop talking to AI at cross purposes! After reading Google's internal "Guidelines for Prompt Words", I realized...

Go deep into Google and master the secrets of efficient dialogue with AI.
Core content:
1. Understand the working principle of AI model and optimize communication methods
2. The core skills and practical applications of prompt word engineering
3. The golden rule of becoming a prompt word master to comprehensively improve the efficiency of AI interaction
Do you often feel that when you ask ChatGPT, Wenxinyiyan, or any other popular AI, it either replies with a bunch of… uh, incomprehensible stuff, or just speaks nonsense? You clearly want it to write a poem, but it gives you a report; you clearly ask for a code, but it tells you a joke...
Stop! ✋ This may not be entirely the fault of AI.
Oftentimes, the problem lies with ourselves - the "language of communication" between us and AI, that is, the "prompt", is not given properly!
Recently, I got a copy of a guide leaked from Google, a white paper called Prompt Engineering, written by Lee Boonstra . This guide breaks down the art of efficient conversation with AI and teaches you everything you need to know!
Today, we will use the most down-to-earth vernacular to take you to deeply "disassemble" this Google guide so that you can fully understand:
Why do you have to learn "prompt word engineering"? Wouldn't it be better to just ask directly? What are the core skills summarized by Google bosses (from entry to advanced, all useful!) What are the golden rules for becoming a “prompt word master” (follow them and you can do it too!)
Are you ready to catch up and unlock the full potential of AI together! ?
? 1. Why do we need to carry out the "prompt word project"? Isn't AI smart enough?
First, let’s take a look at the “underwear” of AI large model (LLM). Google’s white paper hits the nail on the head:
“LLM is essentially a "prediction engine". You give it a paragraph (prompt word), and it tries its best to predict the next most likely word (token), then adds this word to the back, and continues to predict the next one... until it feels that it has "said enough".
This means that your prompt words are the "navigation map" and "initial settings" for AI . It directly determines the "thinking" direction of AI and the quality of the final output.
Imagine you are communicating with a super-student (but a little bit weird):
You say, "Do me a favor." —— He may be confused and have no idea what you want to do. But if you say, "Hey, buddy, help me look at this market report, extract 3 core points, and give some suggestions for improvement. Be to the point, don't talk too much." - He will immediately know where to start.
The “prompt word project” is designed to solve this communication efficiency problem!
It is not magic, but a set of methodologies for designing, optimizing, and iterating prompts . The goal is to guide AI to produce the results we want more accurately and efficiently. Google said that everyone can write prompts, but to write efficient prompts, you have to pay attention to "engineering knowledge". A bad prompt can turn a model worth hundreds of millions into a "nonsense generator" in seconds.
? 2. The essence of Google’s white paper: A comprehensive review of the prompt word “nuclear weapon”!
This guide is full of useful information. Let’s pick the most hardcore ones:
⚙️ 1. More than just words: Adjust the parameters of the AI "brain"
Having good prompt words is not enough, you also need to be able to adjust these "parameters", which are like adding "filters" to the AI output effect:
Output Length
(Output length): Control the number of words. Note: Short does not mean concise, it just stops when the number of words is reached.Temperature
(Temperature): Control "imagination".Low T (close to 0): AI turns into an "old scholar" with stable, reliable and factual output. High T (close to 1): AI lets go and becomes an “artist”, becoming more creative and diverse, but also potentially “going off the rails”. Top-K
&Top-P
(Nuclear Sampling): Limits the range of AI word selection. It is also a knob to control "creativity". It works better when used with temperature.
Remember: parameters and prompt words are a "combination punch" and must be used together! Creative tasks increase T, and serious tasks lower T.
✨ 2. A complete collection of word prompting techniques: from “novice” to “expert”
Google has listed a bunch of practical tips, step by step:
Zero-shot
(Zero sample): The most direct way is to give instructions without giving examples. For example: "Summarize this paragraph."✨ One-shot
&Few-shot
(Single/few samples): Super useful! Give the AI one or a few "samples" to learn from. Especially suitable for fixed formats (such as JSON), specific styles or complex tasks. Key: Make the examples precise and diverse!? System
,Contextual
,Role Prompting
(System/Context/Role Tips):System prompt: Give AI a "general direction" or "identity". For example: "You are an experienced Python developer." Contextual prompts: Give information based on the current chat content. For example: "Based on the above discussion, list the action items." Role Tips: Let the AI "act out" and influence the tone and style. For example: "Play the role of a humorous tour guide and recommend three must-see attractions for me." (The examples in the guide are super funny, the AI can really become humorous!) Chain of Thought (CoT)
(Thinking Chain): Highlight the key points! Must learn! Instead of asking the answer directly, add a magic spell: "**Let's think step by step.**" (Let's think step by step). Guiding AI to output the reasoning process can greatly improve the accuracy of math and logic questions. Although it is a bit long-winded, the effect is outstanding, and you can also understand what AI is thinking.Self-consistency
(Self-consistency): CoT enhanced version. Let the AI think more times with CoT (with slightly higher temperature), and then "the minority obeys the majority" and choose the most common answer. Sacrifice speed for stability and accuracy.Tree of Thoughts (ToT)
(Mind Tree): The ultimate evolution of CoT. AI explores multiple "branch of thought" at the same time, like a mind map, suitable for complex problems that require "broad thinking".ReAct (Reason & Act)
(Thinking and Action): Let AI not only "think", but also "do"! It can call external tools (such as search, calculator) to obtain information or execute commands. This allows AI to solve tasks that require real-time information or interaction with the outside world, a big step towards a true "smart assistant"!? Code Prompting
(Code Tips): Good news for programmers! Specialized in code: writing code, interpreting "inherited code", language translation, finding bugs, doing code reviews... The guide covers everything from Bash scripting to Python translation to debugging, a one-stop service with full practicality!? Automatic Prompt Engineering (APE)
(Automatic Prompt Engineering): Good news for lazy people! Let AI write prompts for you! For example, let it come up with 10 ways to ask questions, and then you pick the best one. Use magic to defeat magic!
The table summarizes the main prompt word technologies mentioned in the article, so you can quickly compare their characteristics and applicable scenarios:
Zero-shot | |||
Few-shot | Extremely effective! | ||
Character/System/Contextual Hints | |||
Chain of Thought (CoT) | Significant improvement | ||
Self-consistency | |||
Tree of Thoughts (ToT) | |||
ReAct (Think + Act) | |||
Code Prompting | |||
Automatic Prompt Engineering (APE) |
? 3. Google’s Golden Rule: The secret to becoming a “prompt word master”!
After mastering the weapon, you also need to understand the "art of war". Google teaches you the best practices:
✅ Provide examples: Less sample yyds! A good example is worth a thousand words.
Design with simplicity: Speak clearly, don’t beat around the bush, and avoid nonsense. You’re confused, and AI is even more confused.
Refers to "direction" (Be specific about the output): Be bold and tell us what format, length, and style you want!
Use Instructions over Constraints: It is better to tell AI “what to do” than to tell it “what not to do”. Positive guidance is more effective.
Control the max token length: Use configuration or prompt words to manage the length of the text.
Use variables in prompts: Use the word variables in the program
{your_variable}
Make it alive!Experiment frequently: Try different models, parameters, wording, formats... Be brave! JSON output can sometimes work wonders!
For few-shot classification, mix up classes: for classification with few samples, the order of categories in the examples should be shuffled to prevent AI from "memorizing by rote".
Follow “update” (Adapt to model updates): AI is improving, and your prompts may also need to “keep up with the times”.
Find “partners” (Experiment together): When multiple people work together, ideas collide and sparks fly!
CoT Tips: Write the reasoning process first and the final answer last. To be precise, the temperature (
Temperature
) to 0!
⚠️ [Final! The most important thing! ] Record every attempt in detail! (Document the various prompt attempts)
✨ Conclusion: Use “engineering thinking” to control AI!
After reading this internal guide from Google, I basically confirmed everyone's feelings: if you want AI to do a good job, it not only depends on how powerful the AI itself is, but also depends to a large extent on whether we can "talk nicely" to it.
This is a technical job, just like learning any skill. You need:
Understand the principles (know what AI is thinking) Master the skills (master all kinds of skills) Lots of practice (hands-on! hands-on! hands-on!) Keep detailed records (a good memory is not as good as a bad pen)
But the rewards of this "skill" are absolutely worth it! When you can use a few prompts to let AI accurately produce the content you want, the feeling of "being in tune with each other" will be known to everyone who uses it!
I hope this down-to-earth explanation can help you open the door to the prompt word project. Now, try these methods to polish your own "god-level" prompt words and truly unleash the power of AI!
Remember: be as rigorous as an engineer, be as creative as an artist, and record like a detective! You are the next cue word master! ?