🌐 فراتر از مرزها؛ مسیر بین‌المللی CardDev

Agent reasoning and evaluation

Chapters
12 Flashcards
11 Gallery cards
35 Audio
12 Prompts
12 Glossary

Imagine giving a model a time-travel puzzle: "Alex jumps back a hundred years, stays a few days, then jumps again…" and the model confidently gives a wrong number. The error is not inability; it is that you did not make it think. The shortest road from "asking" to "reasoning" runs through a handful of techniques. 🪜 The ladder of techniques | Technique | Idea | |---|---| | 🎯 Direct solution | Simple question and answer; the basis of everything | | 🎨 Few-shot | A few input-output examples in the prompt | | 🎲 Zero-shot | Only instructions and rules, relying on the model's general knowledge | | 🔗 Chain of thought (CoT) | Make the model write its reasoning steps | | ✨ Zero-shot CoT | Add a phrase like "let's think step by step" | | ⛓️ Prompt chaining | Split work into steps; each output feeds the next | 🗳️ Evaluation for stable answers 💡 Instead of one answer, generate several reasoning paths and choose the most frequent (self-consistency), or, as in tree of thought (ToT), generate options at each step, evaluate them and continue only promising paths. ⚙️ In Prompt Flow All of these are built as runnable flows and measured with batch processing and metric files (metrics.json). The difference between "guessing" and "reasoning" lives in these tools. 🧭 The cost you must count Each higher technique on this ladder eats more tokens and time. Self-consistency means running a problem several times, and tree of thought means expanding paths at every step. So solve simple problems with a direct prompt and save heavy reasoning for where mistakes are expensive, such as financial or medical decisions. 🔍 A design note Separate generation from evaluation. When everything is in one prompt the model judges itself and no one can tell where an error came from; with separate flows, every stage can be measured.

Chapter

1

Cover of AI Agents in Action
Manning Publications

Chapter 10 of AI Agents in Action: Agent reasoning and evaluation

Book release

Published

Chapter 10 progress
Book progress

Reading time

00:35

Gallery

Yes

Audio status

Preview

Analysis

AI