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

Empowering agents with actions

Chapters
15 Flashcards
9 Gallery cards
39 Audio
15 Prompts
15 Glossary

Imagine your model is a brilliant strategist locked in a closed room: it reasons about everything but cannot change even the smallest thing in the world. When a user asks "Are there 50 units of product X in stock?", the model must be able to look into the warehouse. Those doors and windows are agent actions. 🔄 The path of an action 1. 🗣️ The user makes a request 2. 🧠 The model recognizes intent and extracts the parameters 3. 🔌 The parameters reach a tool or plugin 4. 📬 The result returns and the model builds the final reply 💡 The model's reasoning is probabilistic and the system's execution deterministic; defining actions well is the bridge between them. 🧩 Two ways to implement | Route | Notes | |---|---| | 🧾 OpenAI functions | Define a function with its parameters; the model's output is a parsable JSON and it can return several calls at once | | 🧩 Semantic Kernel (SK) | A framework that organizes functions as plugins | 🔀 Function types in SK 🧠 Semantic functions: prompts with context variables filled at runtime 💻 Native functions: real code the model cannot do itself 🤝 Combine both inside one prompt 🎬 A closing example A GPT interface layered over a movie API turns it into a "semantic service". A subtle point: design the service to return rich data, not just a simple answer; that data is what makes the model smarter. 🧭 A shift in perspective Until now we wrote services for humans and programs; now there is a third reader: the language model. A service that returns only "rainy" gives the model little; if it also returns humidity, wind speed and chance of rain, the model can say "with this wind the umbrella might break". Designing for this reader is semantic thinking. 🧪 Do not forget testing The semantic layer over an API is only half the job. Scripts that call each function separately and check outputs tell you whether the model understands the parameters, and flag the moment the underlying API changes.

Chapter

1

Cover of AI Agents in Action
Manning Publications

Chapter 5 of AI Agents in Action: Empowering agents with actions

Book release

Published

Chapter 5 progress
Book progress

Reading time

00:41

Gallery

Yes

Audio status

Preview

Analysis

AI