Skip to content

These days, AI is like a ubiquitous little helper: chatting, writing articles, coding, and even helping you study and work. But have you ever encountered these awkward situations?

  • AI's answers are completely off-topic?
  • The content it gives you is disorganized?
  • The generated stuff is too general and useless?

Don't worry, these problems are often not the AI's fault, but rather that your "prompt" is not strong enough.


What Exactly is a Prompt?

Simply put, a prompt is what you say to the AI, telling it "what to do" and "how to do it." A great prompt usually has four "secrets":

  • Instruction: What do you want the AI to do?
  • Context: What background information does the AI need?
  • Output Format: What kind of result do you want?
  • Role: What role should the AI play?

Master these four tricks, and you can easily control AI like conducting an orchestra!


I. Instruction: Be Clear, Not Vague!

What is an Instruction?

An instruction is the task you give to the AI, such as:

  • "Summarize the key points of this article for me."
  • "Write a popular science article about the history of artificial intelligence."

But here's the problem, you can't just say anything!

What Kind of Instruction is Good?

❌ Bad instructions look like this:

  • "Write an article."
  • "Make a small game."
  • "Come up with a good name."

These are too vague, and the AI will be confused, with no idea what you want.

✅ Good instructions look like this:

  • "Write a 1000-word article explaining how artificial intelligence helps doctors diagnose diseases, targeted at middle school students, using simple and interesting language."
  • "Create a 3D snake game that can run on a web page, with smooth graphics and playable with a keyboard."
  • "Come up with 3 names for my AI writing tool that are creative, memorable, and highlight the theme."

See, with clear instructions, the AI can immediately do a great job!


II. Context: Give More Information, AI Understands You Better

What is Context?

Context is the "inside information" that AI needs when working, such as your draft paper, company data, or reference materials related to the task.

For example:

  • "Here are the company's sales data for the past three years, analyze how to increase sales."
  • "I wrote a draft of an AI paper, help me polish it and add some academic citations."

Context can be provided by you, or it can be content that the AI has discussed before.

Why is Context so Important?

AI is not a mind reader, without background information it can only guess blindly, and the results will naturally be off-topic. For example, if you say: "Help me write a resume." AI doesn't know if you are a programmer or a chef, how can it not write randomly? But if you tell it:

  • Your experience (education, work projects)
  • What kind of job you are looking for (e.g., programmer, aiming for a big company) AI can customize a great resume for you!

How to Make Context More Effective?

  • Think about what information the task needs and tell AI everything.
  • Ask AI: "What other information do you need to write this?"
  • Throw in a sample or example so that AI understands your taste.

III. Output Format: Tell AI How to Submit the Assignment

Output format is what you want the result to look like. For example:

  • "List this information in a table, divided into three columns: date, event, and impact."
  • "Write a 500-word summary, divided into three paragraphs: introduction, key points, and conclusion."
  • "Write in Markdown format, with level 1 headings, level 2 headings, and numbered lists."

What are Some Common and Useful Formats?

  • Text: Markdown, CSV, JSON
  • Charts: Flowcharts, mind maps
  • Code: Python, JavaScript, etc.
  • Formulas: LaTeX mathematical format

How to Say it More Clearly?

  • Give an example: Directly show the template you want.
  • Explain in detail how to write each part.
  • Use a simple structure (like pseudo-code) to tell AI how to format.

For example, if you want JSON: "Generate JSON like this:

{
  "title": "Article Title",
  "content": [
    {
      "heading": "Level 1 Heading",
      "paragraph": "Content Paragraph"
    }
  ]
}

AI will understand at a glance and do it perfectly for you!


IV. Role: Give AI Some "Acting"

Role is the identity of the AI when it works. You can choose not to set it, but adding a role can make AI more professional and considerate.

For example:

  • "You are a senior programmer, help me optimize this code."
  • "You are a psychological counselor, analyze my problem in a gentle tone."
  • "You are a Socratic teacher, use questions to help me understand AI."

What are the Benefits of Roles?

  • Let AI know from what perspective to think.
  • Let it play its "special skills" in a specific field.

Comprehensive Demonstration: Four Tricks Together, Full Score Effect!

Let's look at a complete prompt:

Task: Write a summary of the application of AI in the medical field.
"You are a popular science writer who loves to explain technology in plain language (role).
Use the following two abstract papers as material (context),
Write an article of less than 500 words that middle school students can understand (output format),
It should be simple and interesting, and give at least two examples of how AI helps doctors diagnose faster (instruction)."

Say it like this, and AI can immediately turn in the "assignment" you want!


Remember these four tricks, and you will be invincible:

  • ✅ Instructions should be clear and specific
  • ✅ Provide enough context
  • ✅ Explain the output format clearly
  • ✅ Define the role accurately

@宝玉