CCA Prep

Урок 1.1Урок 1 з 30

Агентний цикл

Design and implement agentic loops for autonomous task execution

Агентний циклНадіслати повідомлення+ інструментиПрочитатиstop_reasonend_turnПовернути фінальнувідповідьtool_useВиконати запитаніінструментиДодати tool_result вісторіюЛіміт ітерацій — лише запобіжник

Головне

  1. 1Кожна ітерація влаштована однаково: надсилаємо повідомлення й інструменти, читаємо stop_reason і діємо відповідно до нього.
  2. 2stop_reason = tool_use: виконуємо інструменти, які запросила модель, додаємо кожен tool_result в історію й знову викликаємо модель.
  3. 3stop_reason = end_turn: модель закінчила роботу. Це єдиний штатний вихід із циклу.
  4. 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 запитань