TipsMake
Newest

Create prompts based on inference sequences.

Ask the AI ​​to demonstrate its reasoning abilities. Discover why this simple technique significantly improves accuracy in complex tasks.

 

Inference problem

In the previous lesson, we explored the technique of Few-Shot Learning . Now, let's build on that foundation. Here's a puzzle:

Một người nông dân có 15 quả táo. Anh ta cho người hàng xóm 1/3, sau đó ăn 2 quả. Con trai anh ta lấy một nửa số táo còn lại. Hỏi còn lại bao nhiêu quả táo?

If you ask an AI without instructions, it might just say "4 apples" or "5 apples." Sometimes it's right, sometimes it's wrong. You can't know if it's actually reasoning or just guessing.

Now, ask it to demonstrate how it does it:

Hãy thực hiện từng bước một trước khi đưa ra câu trả lời cuối cùng.

 

Suddenly you get the result:

  1. There were initially 15 apples.
  2. 1/3 for the neighbor: 15 × (1/3) = 5 fruits were given away, leaving 10 fruits.
  3. Eat 2 fruits: 10 - 2 = 8 fruits remaining
  4. The son took half: 8 ÷ 2 = 4 fruits were taken, leaving 4 fruits remaining.
  5. Final answer: 4 apples

Same model. Same question. Different levels of reliability.

This is a method of creating prompts based on a thought process – and it's one of the most important discoveries in prompt design.

Why is it helpful to present the steps to solve the problem?

It seems too simple. Just tell the AI ​​to think step by step, and it will become smarter? Yes. And there's a reason.

AI models generate tokens one by one. Each token depends on what already exists. When you simply ask for an answer, the model has to make a huge leap—from a direct question to a conclusion.

When you require reasoning beforehand, each step is built upon the previous one. The model can 'think' through intermediate states. Each step is a smaller, more precise leap.

 

Think of it this way: Jumping from one riverbank to the other is difficult. Jumping from one rock to another is easy.

The phrase "magical"

Researchers at Google have discovered that a simple phrase significantly improves reasoning ability:

'Think one step at a time'

That's all. Simply adding those words increased accuracy in math and logic problems from around 18% to around 79% on some tests.

You can also use:

  1. 'Let's consider it one step at a time.'
  2. Think carefully before you answer.
  3. 'Please describe your reasoning process.'
  4. 'Let's break this problem down step by step.'

The precise wording is less important than clearly stating the step-by-step reasoning process.

When should you use chain thinking?

The chain thinking method is most effective in specific types of tasks:

It's great for:

Mathematics and Calculus

Tính tổng chi phí bao gồm thuế 8,25% cho: 3 mặt hàng với giá 24,99 USD, 2 mặt hàng với giá 15,50 USD và 1 mặt hàng với giá 89,99 USD. Suy nghĩ kỹ từng bước.

Logic problems

Nếu tất cả Bloops đều là Razzles và tất cả Razzles đều là Lazzles, thì tất cả Bloops có phải là Lazzles không? Hãy suy luận cẩn thận.

Multi-step analysis

 

Phân tích xem công ty khởi nghiệp này nên theo đuổi thị trường A hay thị trường B. Cân nhắc quy mô thị trường, khả năng cạnh tranh, điểm mạnh của đội ngũ và thời điểm. Suy nghĩ kỹ từng yếu tố trước khi đưa ra kết luận.

Making decisions with trade-offs

Chúng ta nên tự xây dựng hay mua tính năng này? Xem xét các yếu tố: Chi phí, thời gian, chuyên môn, bảo trì, sự phù hợp chiến lược.

Complex comparison

So sánh React với Vue cho dự án này. Hãy suy nghĩ kỹ: Thời gian làm quen, nhu cầu hiệu suất, kinh nghiệm nhóm, yêu cầu hệ sinh thái.

It is not necessary for:

  1. Simple, practical questions ('What is the capital of France?')
  2. Creativity doesn't need logic ('Write a poem about autumn')
  3. Simple text conversion ('Translate this paragraph into Spanish')
  4. Basic formatting tasks ('Convert this paragraph to bullet points')

Using inference chains for simple tasks only adds unnecessary length.

Models of logical thinking

Model 1: Reasoning requirements at the end

Add the reasoning requirement at the end.

[Câu hỏi hoặc nhiệm vụ của bạn] Hãy suy nghĩ kỹ từng bước trước khi đưa ra câu trả lời cuối cùng.

Model 2: Structured Reasoning

Clearly define the steps in the reasoning process.

Quyết định xem có nên phê duyệt đơn xin vay này hay không. Hãy suy nghĩ về: 1. Đánh giá điểm tín dụng 2. Tỷ lệ thu nhập trên nợ 3. Sự ổn định việc làm 4. Giá trị tài sản thế chấp 5. Xếp hạng rủi ro tổng thể Sau đó đưa ra quyết định phê duyệt kèm lý do.

Model 3: Reasoning Pattern

It provides a format for reasoning.

Quick check : Before we continue, do you remember the main concept we just discussed? Try to explain it in your own words before we move on.

 

Phân tích quyết định kinh doanh này. Hãy định dạng câu trả lời của bạn như sau: CÁC YẾU TỐ CẦN XEM XÉT: - [Liệt kê các yếu tố chính] PHÂN TÍCH: - [Suy nghĩ kỹ về từng yếu tố] SỰ ĐÁNH ĐỔI: - [Những gì bạn được và mất với mỗi lựa chọn] KHUYẾN NGHỊ: - [Kết luận của bạn kèm lý do]

Pattern 4: Few-shot Inference Chain

Combined with illustrative examples to support the reasoning.

Giải bài toán có lời văn bằng cách suy luận từng bước. Ví dụ: Bài toán: Một đoàn tàu rời ga A lúc 9 giờ sáng với tốc độ 60 dặm/giờ. Một đoàn tàu khác rời ga B (cách đó 300 dặm) lúc 10 giờ sáng với tốc độ 90 dặm/giờ hướng về ga A. Hỏi khi nào chúng gặp nhau? Suy luận: - Lúc 10 giờ sáng, chuyến tàu đầu tiên đã đi được 1 giờ × 60 dặm/giờ = 60 dặm - Khoảng cách còn lại: 300 - 60 = 240 dặm - Tốc độ kết hợp: 60 + 90 = 150 dặm/giờ - Thời gian gặp nhau: 240 ÷ 150 = 1,6 giờ sau 10 giờ sáng - Đáp án: 11:36 sáng --- Bây giờ hãy giải: Vấn đề: [Vấn đề của bạn ở đây] Suy luận:

Consistency: Multiple paths of reasoning

For important decisions, you can go even further. Ask the AI ​​to reason about the problem multiple times, then choose the answer that appears most frequently.

Tôi cần quyết định xem nên tung sản phẩm A hay sản phẩm B trước. Hãy suy luận về quyết định này 3 lần riêng biệt, xem xét các góc độ khác nhau: Lần 1: Tập trung vào thời điểm ra thị trường Lần 2: Tập trung vào các hạn chế về nguồn lực Lần 3: Tập trung vào phản ứng của đối thủ cạnh tranh Sau đó xác định kết luận nào xuất hiện trong nhiều lần suy luận nhất.

If two out of three lines of reasoning lead to the same conclusion, then that option is more reliable. If all three disagree, the decision may require more information.

Common mistakes

  1. Error 1: Requiring reasoning for trivial tasks . The reasoning chain wastes extra turns and time. Only use it when reasoning is truly useful.
  2. Error 2: Not reading the reasoning . The main purpose is to verify the logic. If you skip the reasoning and go straight to the answer, you will lose out.
  3. Error 3: The reasoning requirement is vague. 'Think about it' is weaker than 'Think about it step by step'.
  4. Error 4: Failing to provide structure for complex reasoning . For multi-factor decisions, specify which factors need to be considered. Don't leave it too open.

 

Practice exercises

Consider this problem:

A company has a budget of $500,000. They can hire 5 engineers for $80,000 each or 3 engineers plus $200,000 under a contract service. The engineers will need 2 months to become familiar with the job. Contract work can start immediately but requires 10 hours/week of internal management. Which option should they choose if they need to deliver the product within 6 months?

Write a question that requires logical reasoning, specifying the factors to consider.

Let's look at a solution.

Một công ty có ngân sách 500.000 USD cho dự án 6 tháng để tung ra sản phẩm mới. Phương án A: Thuê 5 kỹ sư với giá 80.000 USD/người (tổng cộng 400.000 USD) - Các kỹ sư cần 2 tháng để làm quen công việc - 5 kỹ sư × 4 tháng làm việc hiệu quả = 20 tháng làm việc của kỹ sư Phương án B: Thuê 3 kỹ sư với giá 80.000 USD/người (240.000 USD) + 200.000 USD dịch vụ thuê ngoài (tổng cộng 440.000 USD) - Các nhà thầu có thể bắt đầu ngay lập tức - Các kỹ sư cần 2 tháng để làm quen công việc - Cần 10 giờ/tuần quản lý nội bộ cho các nhà thầu Hãy suy nghĩ kỹ về quyết định này từng bước một: 1. NĂNG LỰC HIỆU QUẢ - Tính toán số tháng làm việc hiệu quả cho mỗi phương án 2. PHÂN TÍCH CHI PHÍ - Tổng chi phí và ngân sách còn lại cho mỗi phương án 3. YẾU TỐ RỦI RO - Điều gì có thể xảy ra sai sót với mỗi phương án? 4. PHÙ HỢP VỚI THỜI HẠN - Phương án nào phù hợp hơn với thời hạn 6 tháng? 5. KHUYẾN NGHỊ - Họ nên chọn phương án nào và tại sao?


Key points to remember

  1. The question, which follows a chain of reasoning, requires the AI ​​to demonstrate reasoning before drawing a conclusion.
  2. Adding 'Think one step at a time' can significantly improve accuracy.
  3. Best suited for: Mathematics, logic, multi-step analysis, complex decisions
  4. Not necessary for: Simple questions, basic transformations, creative tasks
  5. For important decisions, try multiple attempts at reasoning and seek consensus.
Marvin Fry
Share by Marvin Fry
Update 01 March 2026