Browse the study library +
← All practice questions

In an agentic loop, what should determine whether your code runs another tool or presents the final answer?

Show answer and explanation

Answer: B

Loop control keys off stop_reason: continue while it's tool_use, terminate on end_turn. Parsing assistant text, using an iteration cap as the primary stop, or reading tool emptiness are all anti-patterns.

لوپ کا فیصلہ `stop_reason` سے ہوتا ہے: جب تک `tool_use` آئے کام چلاتے رہیں، `end_turn` آنے پر رُک جائیں۔ جواب کا متن پڑھ کر، گنتی کی حد پر، یا خالی نتیجے پر رُکنا — سب غلط طریقے ہیں۔

One practice question a week

Get a new exam-style question with a clear explanation in your inbox. Free, no spam, unsubscribe any time.

We only use your email for these updates. See our privacy policy.