Table of Contents
1. Introduction
First of all, instructions must be clear, just as important as defining variables in programming. Ambiguous instructions, like ambiguous variable names, can lead to difficulty in understanding and errors.
For example, when we want to chat with AI, I say to it: "Give it to me A little water”.
In conversations, we can not only customize delimiters, but also use LLM's own punctuation to write more concise and clear prompts, such as the sample documents in OpenAI .
If you want AI to render a 3D image of the Mona Lisa, you can divide it into steps. First explain the difference between 2D and 3D, and then explain the Mona Lisa. characteristics, and finally combine the two.
For example, once I said to the AI: "Tell the story of an astronaut in space." It ended up giving me a list of specialized spacecraft terms. It suddenly dawned on me that this was like explaining how to cook to a novice and starting by directly telling him to learn molecular cooking. It was too avant-garde and skipped too many steps.
Use conditional simulation to create foreshadowing of real situations, which can help AI build context and enhance understanding.
For example, if you need AI To help you write a letter, you can give instructions like this: "I am a time traveler and I need to write a letter to myself in 1945, telling me that it will rain heavily tomorrow."
Role Play
5. Close to the example
Inspiration from Mathematics Problems
6. Interactive feedback
Cultivating Intelligent Plants
7. Step-by-step
Take your time, make progress faster
8. Summary
Home Technology peripherals AI Prompts are to AI as menus are to chefs

Prompts are to AI as menus are to chefs

Mar 13, 2024 pm 09:07 PM
ai prompt engineer

1. Introduction

Hello everyone, I am Xiao❤, a 985 non-scientific programmer who has been wandering in the world for many years. I have worked as a backend development engineer in state-owned enterprises, large Internet companies and start-up companies. .

I was at home last weekend and it was raining outside, so I wanted to know the weather conditions in the past few days.

It happened that my phone was charging, so I planned to ask the smart speaker Xiaoyi, but by chance, I opened my mouth and blurted out: "Xiaoyi, Xiaoyi, is the weather nice?"

As a result, it said to me: "Whether it's sunny or rainy, I hope you can have a good life every day!" Similar dilemma. Although these AIs possess higher levels of intelligence, they also require clear instructions to ensure correct operation.

Let’s take a look at some tips for writing prompts so that AI can not only report the weather to us, but also tell us a joke.

2. Clarity and Precision

First of all, instructions must be clear, just as important as defining variables in programming. Ambiguous instructions, like ambiguous variable names, can lead to difficulty in understanding and errors.

PicturePrompts are to AI as menus are to chefsAI is a knowledge base

For example, when we want to chat with AI, I say to it: "Give it to me A little water”.

It immediately replied: "The air is humid, is this just a little water?"

Friends, do you understand? AI may be smart, but it needs clear instructions.

Give “straight AI” some patience

Prompts are to AI as menus are to chefsFor another example, I said to it: “Tell me a joke.” It came back to me: "A programmer went into a bar and... something went wrong". Yes, AI’s logic is linear and it doesn’t know how to beat around the bush.

Therefore, the communication must be clear to the point, for example: "Provide a humorous story where the protagonist is a programmer and a funny encounter in a bar." In this way, AI can give specific results.

Make good use of punctuation marks

In conversations, we can not only customize delimiters, but also use LLM's own punctuation to write more concise and clear prompts, such as the sample documents in OpenAI .

Poor effect ❌:

Summarize the following text to summarize some of the most critical points.

{text input here}

Better effect ✅:

Summarize the following text to summarize a few of the most critical points.

Text: """{text input here}"""

Making good use of the delimiters supported by AI itself can make it easier for the model to understand our intentions.

AI is like a child in the growing stage. It is told that "if you want something, you must state clearly what you want." You do not deny its curiosity, but you must also guide it to understand.

Accuracy is not an optional courtesy, but an indispensable cornerstone of effective communication.

3. Step-by-step construction

If you want AI to render a 3D image of the Mona Lisa, you can divide it into steps. First explain the difference between 2D and 3D, and then explain the Mona Lisa. characteristics, and finally combine the two.

Interacting with AI is like cooking a complicated dish, you have to follow the steps.

An AI that knows too much may not necessarily understand you

For example, once I said to the AI: "Tell the story of an astronaut in space." It ended up giving me a list of specialized spacecraft terms. It suddenly dawned on me that this was like explaining how to cook to a novice and starting by directly telling him to learn molecular cooking. It was too avant-garde and skipped too many steps.

Later I tried to put it another way: "Let's set the scene first. An astronaut is floating outside the space station. The first step is to describe the earth he sees; the second step is to talk about it. His little story of being lost in space.”

This time, it told me an interesting and vivid story about an astronaut looking at the blue planet and accidentally touching the jetpack and drifting.

The step-by-step construction of rules not only allows AI to understand our requirements better, but also makes AI’s answers layered, just like an upgraded version of music, changing from a single note to a rhythmic melody.

Let AI gradually reveal its full picture. The step-by-step construction is not only a guide to it, but also the art of organizing complex information.


4. Situation & Role Simulation

Use conditional simulation to create foreshadowing of real situations, which can help AI build context and enhance understanding.

PicturePrompts are to AI as menus are to chefs


Time Traveler’s Letter

For example, if you need AI To help you write a letter, you can give instructions like this: "I am a time traveler and I need to write a letter to myself in 1945, telling me that it will rain heavily tomorrow."

In this way, AI not only grasps the instructions for writing letters, but also simulates content with a more historical atmosphere and expected scenarios based on the time traveler character you create, making the entire text more relevant. Real world details.

Role Play

Similarly, you can also set a role for the AI. For example, if you need to obtain interview experience at some major Internet companies, you can tell it at the beginning of the prompt:

You are a senior backend developer, proficient in...[Character background]

Now the question is [Input question]

You need to tell me...[ What is the goal]

The requirements are... [What are the requirements].

Scenario and role simulation are not only storytelling techniques, but also a shortcut to efficient communication.

5. Close to the example

Providing AI with a specific case can significantly improve the accuracy of its execution of instructions.

Inspiration from Mathematics Problems

Just like teaching difficult problems to mathematics beginners, a clear mathematical example can make the process of understanding and solving problems twice the result with half the effort.

I once asked AI to help me generate a strategic recommendation about marketing. I started by saying: "Write a marketing strategy."

As a result, everyone must have guessed it. AI gave a very general answer.

Later, I provided a specific competitive product analysis report, and then said: "Based on this analysis report, write a customized marketing strategy for a start-up technology company that wants to increase its market share. ".

As a result, AI used specific examples to output a detailed and creative strategy.

The example-guided method allows AI to be better anchored in specific situations and apply general theories to specific scenarios.

6. Interactive feedback

Interactive feedback is the catalyst for AI learning progress.

Cultivating Intelligent Plants

Just like communicating with a plant, we need to constantly prune and guide it, and the same is true for AI. Initially, I asked the AI ​​to give some suggestions on how to be more productive, and it gave me some basic time management tips.

Although these are useful, they are not comprehensive.

So I started to give feedback and pointed out that I wanted to have a deeper understanding of the psychological impact and so on. After several rounds of feedback, the suggestions given by AI are not only more suitable for my needs, but also incorporate multi-dimensional considerations such as mental health.

Interaction and feedback allow AI to better adjust output and meet user needs more accurately.

7. Step-by-step

Recent AI progress is exciting, but we should also realize that just like human learning, AI also needs to be step-by-step.

Take your time, make progress faster

Expecting AI to give perfect results the first time is as unrealistic as wanting a toddler to run a marathon right away.

When using AI, we can gradually increase the complexity of the task. For example, when writing an article on AI, I will start with simple concepts, then gradually deepen into more complex theories, and finally point to practical applications.

Through continuous practice, AI is like a human mind accustomed to solving complex problems, allowing its capabilities to mature through constant challenges.

8. Summary

There are many articles explaining prompt, and the six principles mentioned in the article are not static.

To provide a strong starting point for collaboration with AI, we need to always remember that good communication and clear instructions are key for large models to realize their powerful potential.

As large models become more mature, more engineers who are proficient in writing prompts may emerge in the future. Their goal is to use these principles to break the boundaries of communication between humans and AI and make complex technical expressions become Be close to the people and be productive.

At present, large models can not only be used as development assistants, but can also be used to edit resumes, write advertisements, and write papers. AIGC in another similar field can already draw beautiful pictures. Judging from sora released last month, AI can also generate 60s process videos, and the quality is quite good.

The birth of these AI tools may bring about earth-shaking changes in many industries.

In cooperation with AI, giving a precise, direct and detailed prompt is like giving a clear order on a detailed menu, allowing the AI, the chef, to do a better job Understand the needs of human beings and prepare a rich intelligent feast for us!

The above is the detailed content of Prompts are to AI as menus are to chefs. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Is there a free XML to PDF tool for mobile phones? Is there a free XML to PDF tool for mobile phones? Apr 02, 2025 pm 09:12 PM

There is no simple and direct free XML to PDF tool on mobile. The required data visualization process involves complex data understanding and rendering, and most of the so-called "free" tools on the market have poor experience. It is recommended to use computer-side tools or use cloud services, or develop apps yourself to obtain more reliable conversion effects.

How to beautify the XML format How to beautify the XML format Apr 02, 2025 pm 09:57 PM

XML beautification is essentially improving its readability, including reasonable indentation, line breaks and tag organization. The principle is to traverse the XML tree, add indentation according to the level, and handle empty tags and tags containing text. Python's xml.etree.ElementTree library provides a convenient pretty_xml() function that can implement the above beautification process.

How to convert XML to image using Java? How to convert XML to image using Java? Apr 02, 2025 pm 08:36 PM

There is no "universal" method: XML to image conversion requires selecting the appropriate strategy based on XML data and target image style. Parsing XML: Use libraries such as DOM, SAX, StAX or JAXB. Image processing: Use java.awt.image package or more advanced libraries such as ImageIO and JavaFX. Data to image mapping: Defines the mapping rules of XML nodes to image parts. Consider complex scenarios: dealing with XML errors, image scaling, and text rendering. Performance optimization: Use SAX parser or multithreading technologies.

How to verify the xml format How to verify the xml format Apr 02, 2025 pm 10:00 PM

XML format validation involves checking its structure and compliance with DTD or Schema. An XML parser is required, such as ElementTree (basic syntax checking) or lxml (more powerful verification, XSD support). The verification process involves parsing the XML file, loading the XSD Schema, and executing the assertValid method to throw an exception when an error is detected. Verifying the XML format also requires handling various exceptions and gaining insight into the XSD Schema language.

How to use char array in C language How to use char array in C language Apr 03, 2025 pm 03:24 PM

The char array stores character sequences in C language and is declared as char array_name[size]. The access element is passed through the subscript operator, and the element ends with the null terminator '\0', which represents the end point of the string. The C language provides a variety of string manipulation functions, such as strlen(), strcpy(), strcat() and strcmp().

How to set the fonts for XML conversion to images? How to set the fonts for XML conversion to images? Apr 02, 2025 pm 08:00 PM

Converting XML to images involves the following steps: Selecting the appropriate image processing library, such as Pillow. Use the parser to parse XML and extract font style attributes (font, font size, color). Use an image library such as Pillow to style the font and render the text. Calculate text size, create canvas, and draw text using the image library. Save the generated image file. Note that font file paths, error handling and performance optimization need further consideration.

Avoid errors caused by default in C switch statements Avoid errors caused by default in C switch statements Apr 03, 2025 pm 03:45 PM

A strategy to avoid errors caused by default in C switch statements: use enums instead of constants, limiting the value of the case statement to a valid member of the enum. Use fallthrough in the last case statement to let the program continue to execute the following code. For switch statements without fallthrough, always add a default statement for error handling or provide default behavior.

How to convert XML to image using C#? How to convert XML to image using C#? Apr 02, 2025 pm 08:30 PM

C# converts XML into images feasible, but requires designing a way to visualize data. For a simple example, for product information XML, data can be parsed and the name and price can be drawn into images using the GDI library. The steps include: parsing XML data. Create images using drawing libraries such as GDI. Set the image size according to the XML structure. Use the text drawing function to draw data onto an image. Save the image.

See all articles