思维链提示示例10个

2026-08-01 约 6 分钟阅读

2022年Wei等人的论文证明思维链大幅提升推理。

Chain of Thought Prompting Examples 2026: 10 Prompts That Improve LLM Reasoning

Chain of thought (CoT) prompting asks the model to reason step by step before answering. The technique comes from the 2022 paper "Chain-of-Thought Prompting Elicits Reasoning in Large Language Models" (Wei et al., Google Research), which showed large gains on math and logic benchmarks. In 2026 it is still the highest-leverage prompting skill.

Why It Works

Models trained to predict the next token produce better final answers when they generate intermediate reasoning. The paper reported gains of up to +18% accuracy on GSM8K math problems simply by adding "Let's think step by step."

10 Copy-Paste Examples

1. Arithmetic

A store sells apples at $2 each and offers 15% off for 12 or more. If I buy 15 apples, how much do I pay? Let's think step by step.

2. Logic

All roses are flowers. Some flowers fade quickly. Is it guaranteed that some roses fade quickly? Think through this carefully before answering.

3. Coding

Write a function that checks if a string is a palindrome. First explain the algorithm, then write the code.

4. Math word problem

A train leaves at 9:00 traveling 80 km/h. Another leaves at 10:00 at 100 km/h. When does the second catch up? Show your work.

5. Decision making

I have $500/month to invest. Compare index funds, bonds, and CDs step by step, then recommend one.

6. Data analysis

Here is a sales table by quarter. Walk through the trend analysis step by step before concluding.

7. Translation with constraints

Translate this paragraph to French, keeping technical terms in English. Reason about the tricky terms first.

8. Fact-checking

Verify this claim about battery technology. Break it into sub-claims and assess each.

9. Planning

Plan a 3-day trip to Tokyo on a $400 budget. Reason about costs in order.

10. Debugging

This Python code throws a KeyError. Trace through the execution line by line and find the bug.

Advanced Variant: CoT + Few-Shot

Combine with examples for best results:

Example: "Q: 1724? A: 1720=340, 174=68, 340+68=408. Answer: 408." Now solve: 2337?

FAQ

Does CoT work on small local models? Partially - models under 7B often cannot sustain long reasoning chains. Use it mainly with capable models.

Is "think step by step" enough? It helps, but explicit structure (numbered steps, "show your work") works better than the magic phrase alone.

What about tree of thought? ToT (Yao et al. 2023) explores multiple reasoning branches - better for open-ended problems but needs more tokens and often an agent framework.

相关文章
2026-06-29
高收益主线龙头策略——不花钱的数据,也能抓到龙头
2026-06-29
你笔记本里,藏着一个AI
2026-07-14
免费AI编程助手 2026 配置指南:VS Code 5分钟装 Continue、Copilot、Windsurf

💬 评论 (0)

暂无评论,来说两句吧~

登录后评论