Урок 1.1Урок 1 з 30
Агентний цикл
Design and implement agentic loops for autonomous task execution
Головне
- 1Кожна ітерація влаштована однаково: надсилаємо повідомлення й інструменти, читаємо
stop_reasonі діємо відповідно до нього. - 2
stop_reason=tool_use: виконуємо інструменти, які запросила модель, додаємо коженtool_resultв історію й знову викликаємо модель. - 3
stop_reason=end_turn: модель закінчила роботу. Це єдиний штатний вихід із циклу. - 4Саме завдяки результатам інструментів в історії модель сама вирішує, яким буде наступний крок, а не йде за жорстко заданою послідовністю.
Що перевіряє іспит із цієї теми
Формулювання з програми іспиту (англійською).
- 1.1.K1Agentic loop lifecycle: send request, inspect stop_reason (tool_use vs end_turn), execute requested tools, return results for the next iteration
- 1.1.K2Tool results are appended to conversation history so the model can reason about the next action
- 1.1.K3Model-driven decision-making vs pre-configured decision trees or fixed tool sequences
- 1.1.S1Loop continues while stop_reason is tool_use and terminates on end_turn
- 1.1.S2Add tool results to context between iterations
- 1.1.S3Avoid anti-patterns: parsing natural language to stop, iteration caps as the primary stop, assistant text as completion signal
Закріпіть тему
Дайте відповідь на запитання за сценаріями з цієї теми. До кожного варіанта є розбір.
Тренування 1.1 · 20 запитань