Runoob Tutorial ArchiveEnglish

Introduction to AI Prompts

Introduction to AI Prompts: Learn to ask questions so AI can truly help you work.

When first using AI, many people encounter a problem: even when asking the same question, the content generated by others is professional and practical, while what you get is a pile of correct nonsense.

For example, if you ask AI to help write a weekly report:

Help me write a summary of this week's work.

The AI wrote a long passage like "actively advancing project progress, continuously improving work efficiency, strengthening team collaboration," which sounds quite professional, but upon closer inspection, it seems to say nothing.

The problem might not be with the AI, but with us not telling it specifically what was done, who it is for, or how we want it to be expressed.

This involves a very important concept in AI usage:Prompt.

This chapter starts with the simplest work report, learning how to turn a vague requirement into a clear, specific, and directly executable AI instruction.

If you don't know how to write a prompt for now, you can also use our online tool, which organizes various common prompt examples and can also use AI to automatically generate and optimize prompts:

** Online AI Prompt Tool and Template Library


I. What is an AI Prompt?

Prompt is simply the task description we send to the AI.

It can be a single sentence:

Translate this English text into Chinese.

It can also be a detailed set of requirements, including background information, writing style, output format, and notes.

You can imagine the AI as a colleague who has just joined the team, is very capable, but is unfamiliar with your specific business.

If you only tell him, "Help me make a report," he might not know what data to use, who it's for, or what content you care about most.

But if you tell him, "Based on this sales sheet, calculate the sales for the last three months, find the top three selling products, and finally summarize them in a table," things become much clearer.

The purpose of the prompt is to convey our requirements to the AI as accurately as possible.

A practical prompt formula

For beginners, you can first remember four elements:

Task goal + background material + constraints + output format

Four elements of AI prompts: task objective, background material, constraints, and output format

Elements Function Simple example
** Task goal Tell the AI what to do Organize a weekly work report
** Background materials Provide information required to complete the task Record of work completed this week
** Constraints Clarify limitations and notes Within 200 words, do not fabricate data
** Output format Specify how the final result should be presented Segment by completed items, issues, and plans

Note that this is not a fixed formula that must be strictly followed.

Simple questions can be asked directly; provide more information for complex tasks.Prompts are not better the longer they are, but the clearer they are.


II. First, look at an example: how much difference there is in writing the same weekly report

Assume you are a product developer who completed some page modifications this week and needs to submit a weekly report to the supervisor.

Method one: Let the AI write it directly

Example: Vague prompts

Write me a weekly work report for this week.

AI does not know what you actually did this week, so it might generate content like this:

This week, I actively promoted product project construction, continuously optimized system functions, promptly solved problems encountered during development, and further improved project quality and team collaboration efficiency.

It looks fine, but it lacks specific completed items or verifiable work records.

If you submit a weekly report like this, the manager might ask again:"So what exactly did you do this week?"

Second type: Tell the AI exactly what you did

We will supplement the actual work content and clarify the writing requirements:

Example: Improved prompt

Please organize a weekly report based on the following work records.

This week's work:

Completed product requirement review on Monday, and determined three pages to be modified.

Fixed issues on two of those pages on Wednesday.

The third page is still awaiting product confirmation.

Submitted for testing on Friday, and the test results have not yet been returned.

Next week's plan:

Complete remaining page modifications.

Arrange subsequent launch work based on test feedback.

Requirements:

Write to the direct supervisor.

Language should be concise, objective, and natural.

Do not fabricate completion rates or business data.

The main body should be under 250 words.

Organize content by completed this week, issues to resolve, and next week's plan.

This time, the AI has clear factual basis.

Example output:

AI-generated weekly report

I. Completed This Week

  1. 1. Completed product requirement review, clarifying three pages to be modified. 2. Fixed issues on two of those pages. 3. Submitted for testing on Friday and awaiting test feedback.

II. Issues to Resolve

  1. 1. One page still awaits product confirmation. 2. Test results have not been returned.

III. Next Week's Plan

  1. Complete remaining page modifications. 2. Arrange subsequent launch work based on test feedback.

This weekly report lacks elaborate phrasing, but every point can be found in the original work records.

The difference between the two writing styles is: the first only tells the AI "I need a weekly report," while the second tells the AI "what to write based on, who it's for, how to write it, and what not to write."


III. Practical Application: Writing Effective Prompts Step by Step

Next, we will take the work weekly report as a complete case study to see how to build a prompt from scratch.

Open DeepSeek, Qwen, or other common AI chat tools to follow the operations.

Step 1: Clarify the Task Goal

First, tell the AI what task needs to be completed.

Clarify the goal

Please help me organize this week's work report.

This sentence already has a clear task, but it hasn't told the AI the specific content.

Step 2: Supplement background materials

Add the actual work completed this week.

Supplement background information

I am a product developer and need to report to my direct supervisor.

This week's records:

Monday: Complete product requirement review and determine three pages to be modified.

Wednesday: Fix issues on two pages; one remains pending product confirmation.

Friday: Submit for testing; test results have not been returned yet.

Next week's plan:

Complete modifications for the remaining pages,

Schedule subsequent release based on test feedback.

For tasks involving actual work results like this,background materials are more important than elaborate prompts.

AI does not know what you have actually accomplished, so you should provide reliable original records as much as possible.

Step 3: Add constraints

Next, clarify what content can be written and what content cannot be written.

Set constraints

Writing requirements:

Only use the factual information I provide.

Do not fabricate project progress, completion rates, or business data.

The tone should be objective and natural, avoiding empty platitudes.

Do not write "test passed" for submitted tests.

Keep unconfirmed items as they are.

The total word count should not exceed 250 words.

These constraints can help the AI better understand our requirements, but they do not guarantee it will not make mistakes; manual verification is still required.

Step four: Specify the output format

Finally, tell the AI what format you want the results in.

Specify the output format

Please output in the following structure:

I. Completed this week

II. Issues to resolve

III. Next week's plan

Use a brief list for each section.

Do not add unnecessary introductory statements.

Directly output the usable weekly report body.

This completes a prompt containing four basic elements.

When actually using it, you do not need to send each step separately. You can merge the above requirements into one complete instruction and give it to the AI at once.


IV. Advanced Techniques: Helping AI Understand Your Needs More Accurately

After mastering the four elements, you can also use some simple techniques to make it easier for AI to generate content that meets your expectations.

Technique 1: Give AI a Clear Role

For example, when writing a product introduction, you can tell the AI:

Example: Specifying the Writing Role

You are an experienced technology product editor.

Please introduce a new office software to readers without a technical background.

Introduce a new office software.

The language should be simple and natural,

Try to explain the functions using everyday examples.

Do not overload with technical jargon.

Role setting can help the AI understand the expected style of expression, but it is not mandatory, nor should it allow the model to automatically acquire some professional qualification.

In most cases, instead of just saying "You are a top expert," it is better to directly state the target audience, the task content, and the quality requirements.

Tip Two: Provide a reference example

If you want the AI to imitate a certain article structure or style of expression, the most direct method is to give it a reference piece of content.

For example:

Example: Provide a reference style

Please introduce an AI tool following the style below.

Reference expression:

"Before, making a promotional image required finding materials, adjusting fonts,

changing color schemes, and taking half a day to fiddle with it.

Now, you just need to tell the AI what you want to do,

and it can generate a first draft for us."

Requirements:

The language should be colloquial and immersive.

Use specific examples to illustrate the functionality.

Avoid vague promotional slogans.

Do not copy the reference material verbatim.

Do not fabricate product features.

Please introduce:

[Fill in the tool name and functional information here]

This method is also called Few-shot Prompting. By providing one or more examples, it makes it easier for the model to understand the desired expression format.

In addition to article writing, it is also applicable to tasks such as data classification, information extraction, and format conversion.

Tip 3: Request the AI to output in a specified format

If the results need to be copied to Excel, a webpage, or a program, it is best to specify the format in advance.

For example, we want to organize a to-do list:

Example: Output Markdown table

Please organize the following tasks into a Markdown table.

Fields:

Task Name

|

Person in charge

|

Deadline

|

Status

Original content:

Zhang San is responsible for the homepage design, to be completed on Friday.

Li Si is responsible for testing, the deadline is not yet determined.

Wang Wu has completed the login function development.

Requirements:

Do not add non-existent information.

Fill in "To be confirmed" for fields that are not provided.

Do not change the task owner.

Only output a Markdown table.

If the result needs to be processed by a program, you can also request JSON output, but field and data type validation is still required in the program; do not assume the AI output will conform to the standard.

Technique Four: Let AI ask questions before answering

Sometimes we haven't clearly thought out the specific requirements ourselves, so there's no need to rush into writing a long prompt.

You can first let the AI help us clarify the task by asking questions.

Example: Let AI help you refine the requirements

I plan to create a product promotional copy,

but I haven't clearly thought out the specific requirements yet.

Please do not write the copy directly yet.

You can ask me up to 5 key questions,

Help me clarify:

What is the product?

Who is the target user?

What are the main selling points?

What channels will the copy be used for?

What style do you want to adopt?

Please help me generate the copy after I answer.

This method is suitable for scenarios where the requirements are not yet clear, such as designing a webpage, planning an event, creating images, or developing an application.


V. Multi-turn Conversation: What to do if the first attempt is unsatisfactory

You do not need to aim for success in a single prompt.

In actual use, a common situation is that the AI's first generated content is basically correct, but the tone, length, or structure does not meet the requirements.

At this time, there is no need to rewrite a large section of the prompt; you only need to point out the specific problem and ask the AI to revise it.

Multi-turn optimization and iteration process for AI prompts

Round 1: Adjusting the Tone

Example: Adjusting the tone of a weekly report

The facts in the previous version are basically correct,

but the tone is a bit formal.

Please change it to a natural and direct work report tone.

Retain the original facts and work progress.

Do not add new data.

Do not modify unconfirmed items.

Only output the revised weekly report.

Second round: Condense the length.

Example: Compress the weekly report content.

Please keep the previous version of the weekly report within 150 characters.

Remove redundant expressions and unnecessary pleasantries.

Must retain:

Completed work

Unresolved issues

Next week's work plan

Do not change facts.

Round 3: Check final results

Example: Check the weekly report for factual errors

Please refer to the initial work records,

and check the current weekly report for the following issues:

Fabricating work achievements.

Omitting important matters.

Writing unfinished tasks as completed.

Modifying original figures or times.

Presenting unsubstantiated conclusions.

Please list the issues found,

And output the final revised version.

If a piece of information cannot be confirmed,

please clearly mark it as "To be confirmed".

The key to multi-turn dialogue is not to keep asking the AI to "optimize it again," but toclearly state what needs to be modified each time and specify what content must remain unchanged.


VI. How to write prompts for different work scenarios

The four-element approach can be used in many scenarios, but different tasks require different supplementary information.

For example, when writing an email, you need to focus on the recipient and tone; when generating an image, you need to focus on composition and style; and when writing code, you need to specify the running environment and technical requirements.

Application Scenarios Key Information to Specify
** Email and Notifications Recipient, event, time, tone, word count
** Meeting Minutes Meeting records, resolutions, responsible person, deadline
** Data Analysis Data source, field meaning, statistical scope, output metrics
Image Generation Subject, scene, art style, aspect ratio, composition, constraints
Video Production Storyboarding, duration, shots, subtitles, animation style
Programming Development Functional requirements, technical environment, input/output, testing standards
Promotional Copywriting Product features, target users, release platform, expression style

Example: AI image generation prompts

If you only input "draw a cat," the AI can generate an image, but the cat's appearance, background, and art style may be completely different from what you expect.

You can change it to:

Example: Generating a cartoon cat image

Please generate a cute cartoon cat illustration.

Subject:

A small orange cat, round face, big eyes,

sitting by the window basking in the sun.

Background:

A warm room with blue sky and green trees outside the window.

Art style:

Japanese fresh cartoon illustration,

soft colors, clean lines.

Composition:

1:1 square, cat centered,

fully showing head and body.

Limitations:

No text, logos, or watermarks.

This also includes tasks, backgrounds, constraints, and output requirements, but the final deliverable is an image instead of text.


VII. Common Prompt Errors

Often, when the AI response is not ideal, it is not due to a lack of some magical keyword, but rather the task description itself is not clear enough.

Not recommended phrasing Better expression
Write it more sophisticatedly Explain to a general audience using natural language and concrete examples, avoiding technical jargon
Help me analyze the data Aggregate sales by month, list the top three products, and mark missing data
Write a good article Write an 800-word introductory article for beginners, including concepts, case studies, and operational steps
Give me the most accurate answer Verify key facts and provide sources, clearly marking any unconfirmed parts
Make the image look nicer Use simple linear illustrations, with a gray-blue background and warm orange accents, with the main subject centered and no text.
Fix the code. First locate the error, only modify the relevant files, retain the original functionality, and run tests after modification.
Organize all the files. First formulate a classification plan, and after confirmation, only process the specified directory, output new files, and keep the originals.

As you can see, the focus of optimizing prompts is not adding more adjectives, but convertingabstract requirements into concrete, verifiable standards..


VIII. Don't know how to write prompts? Let AI help you generate them

When you first start using AI, you might not be familiar with these methods.

There's no need to write prompts from scratch every time. You can start by finding a similar template and then modifying it according to your task.

We provide an online prompt tool that organizes prompts for different uses and supports generating and optimizing prompts with AI help.

** Open the online prompt tool

For example, if you are preparing to create an event poster but don't know how to describe the image, you can directly use the general instruction below:

Example: Let AI automatically generate prompts

You are an AI prompt design assistant.

I want to complete the following task:

{Enter your requirements here}

Please generate a complete prompt suitable for AI based on my requirements.

Requirements:

Clearly define the task objective.

Supplement necessary background information.

Organize reasonable constraints.

Organize reasonable constraints.

Specify a clear output format.

Do not fabricate facts that I have not provided.

If key information is missing, ask me first.

Please output a prompt that can be copied and used directly.

This allows the AI to first help us organize the requirements, and then pass the generated prompt to the corresponding tool for execution.

However, the automatically generated prompt also needs to be checked, especially the assumptions, technical conditions, and output requirements that it supplements itself with, to ensure they match the actual requirements before use.


Nine. Prompts also need to pay attention to safety boundaries.

Besides telling the AI what to do, the prompt should also specify what content cannot be arbitrarily manipulated.

Especially when using Agents with file or tool operation capabilities such as Codex, WorkBuddy, and DuMate, they may not only generate text but also execute code, read/write files, or call external services based on permissions.

Therefore, attention should be paid to the following types of information:

For example, when involving batch file processing, you can add to the prompt:

Example: Restrict file operation scope

Please only process the runoob_data directory of the current project.

Operation requirements:

Do not modify files in other directories.

Do not delete or overwrite original files.

Save all results to the output directory.

State the situation when an abnormal file is found.

Do not upload original data to external services.

List the newly created or modified files after completion.

Operations involving deletion, overwriting, or sending data,

must first obtain my explicit confirmation.

Note that prompt constraints cannot replace tool permission management. For important files and sensitive data, independent working directories, file backups, and necessary permission restrictions should also be used.


X. Hands-on Practice

Practice 1: Optimizing the Weekly Work Report Prompt

Using the work log from this chapter, try two methods separately:

Compare the two results to see which version is easier to use directly and whether any fabricated work achievements have occurred.

Exercise Two: Generate a leave request email

Assume you need to request a day off from your supervisor. Prepare the leave date, reason for leave, and work handover arrangements, then have the AI generate a concise and polite email.

Require the AI not to add the reason for leave itself, nor to fabricate work handover situations for you.

Exercise Three: Have the AI help you design prompts

Open the online prompt tool, select a scenario for image generation, copywriting, or data organization, and have the AI help you organize a complete prompt.

Check if the generated results include the task objective, background materials, constraints, and output format.