Full access is free during Beta. A paid subscription will be offered after Beta.

Prompt Engineering Guide — User Guide

Prompt engineering guide (ZH).

Strengths
  • The most comprehensive prompt word engineering resources
  • Support Chinese, informative content
  • Covers basic to advanced techniques
  • Contains numerous practical examples
  • Continuously updated to reflect the latest research
Best for
  • Learn the basics of prompt word engineering
  • Learn about advanced prompting techniques (CoT, Few-shot, etc.)
  • Improving the effectiveness of AI tools
  • Learn Tips and Strategies for LLM Application Development
  • Learn about prompt word safety and alignment

Basic prompting techniques

Mastering basic prompting technology can significantly improve the output quality of AI.

Scenario

Zero-shot and Few-shot tips

Prompt example
Two basic prompting methods:

Zero-shot (zero sample):
Describe the task directly without providing examples
Example:
"Translate the following from English into Chinese:
The weather is nice today."

Few-shot (few samples):
Provide a few examples to let the model understand the format
Example:
"Translate the following from English into Chinese:

English: Hello, how are you?
Chinese: Hello, how are you?

English: The weather is nice today.
Chinese: "

Advantages of Few-shot:
- More consistent formatting
- Specific style of output
- Reduce ambiguity
Output / what to expect
Few-shot usually works better than Zero-shot, Especially tasks that require formatting, Providing 3-5 examples is usually sufficient.
Tips

Quality of examples is more important than quantity, choose the most typical and clear examples.

Scenario

Chain-of-Thought

Prompt example
The CoT prompt lets the model demonstrate the inference process:

General tips (possible errors):
"A farm has 15 chickens and 10 rabbits,
How many legs are there in total? "

CoT Tips (more accurate):
"A farm has 15 chickens and 10 rabbits,
How many legs are there in total?
Please think step by step. "

Zero-shot CoT (universal trick):
Add after the question:
"Let's think about it step by step."
"Let's think step by step."

Applicable scenarios:
- Mathematical calculations
- Logical reasoning
- Complex analysis
Output / what to expect
CoT significantly improves the accuracy of complex reasoning tasks, “Let’s think step by step” is the simplest and most effective technique. Suitable for any problem requiring multi-step reasoning.
Tips

For simple tasks, CoT may be overly complex; only use it on tasks that require reasoning.

Starter & above

The rest of this guide

Additional scenarios and the full comparison table are included with Starter and above. Sign in with an eligible account to load them.

You're on the Free plan. Upgrade to Starter or higher to unlock the rest of this guide—additional scenarios and the full comparison table.

Loading full guide…