CodeQuest101AI Agents & Tool CallingChapter Studio
AI Agents & Tool Calling

7 chapters

Advanced RAG

Chapter 03 / 07

Ask. Execute. Observe. Choose again.

Trace a complete return task and see when the next step is another call, a question, or an answer.

Request, execute, observe, decide

A useful tool result often answers only part of a task. An order lookup tells us what was bought and when; a policy search tells us which conditions apply. A later call may prepare a return draft.

After every observation, the decision process runs again with the updated context. If a required order number is missing, ask for it. If the task cannot be completed with the available tools or evidence, stop and explain the limit.