AI Systems Field Note: Agentic Workflows
Traditional LLM usage often follows a "Zero-Shot" pattern: you provide a prompt, and the model provides a single, immediate response. Agentic Workflows, however

AI Systems Field Note: Agentic Workflows
English
Concept: Agentic Workflows
Traditional LLM usage often follows a "Zero-Shot" pattern: you provide a prompt, and the model provides a single, immediate response. **Agentic Workflows**, however, shift the paradigm from "one-shot generation" to "iterative reasoning and action."
In an agentic workflow, the LLM is not just a text generator but a controller in a loop. It can plan steps, use tools (like searching the web or running code), observe the results, and then refine its next move based on those observations.
Practical Tradeoffs
| Feature | Zero-Shot Prompting | Agentic Workflows |
| :--- | :--- | :--- |
| **Latency** | Low (Single pass) | High (Multiple loops/tool calls) |
| **Reliability** | Variable (Prone to hallucinations) | Higher (Self-correction via feedback) |
| **Complexity** | Low (Simple prompt) | High (Requires state management & tool definitions) |
| **Cost** | Low (Minimal tokens) | Higher (Cumulative token usage per task) |
Example Scenario
**Task:** "Write a Python script to scrape news from a specific URL and summarize it."
* **Zero-Shot:** The model writes the code based on its training data. If the website structure has changed or the library version is different, the code fails, and the user must manually fix it.
* **Agentic Workflow:**
1. **Plan:** The agent decides to first inspect the URL structure.
2. **Act:** It writes and executes a small script to fetch HTML.
3. **Observe:** It sees the HTML structure and realizes it needs `BeautifulSoup`.
4. **Refine:** It updates the script with correct selectors and runs it again.
5. **Finalize:** Once successful, it summarizes the content.
---
Simplified Chinese (zh-cn)
概念:智能体工作流 (Agentic Workflows)
傳統的 LLM 使用模式通常遵循「零樣本 (Zero-Shot)」模式:你提供一個提示詞,模型給出一個即時的響應。而**智能体工作流**將範式從「單次生成」轉變為「迭代推理與行動」。
在智能体工作流中,LLM 不僅僅是一個文本生成器,更是循環中的控制器。它可以規劃步驟、使用工具(如搜索網絡或運行代碼)、觀察結果,並根據這些觀察結果來優化下一步行動。
實際權衡
| 特性 | 零樣本提示 (Zero-Shot) | 智能体工作流 (Agentic Workflows) |
| :--- | :--- | :--- |
| **延遲** | 低(單次處理) | 高(多次循環/工具調用) |
| **可靠性** | 不穩定(易產生幻覺) | 更高(通過反饋進行自我修正) |
| **複雜度** | 低(簡單的提示詞) | 高(需要狀態管理和工具定義) |
| **成本** | 低(Token 使用量極少) | 較高(每個任務的累計 Token 使用量大) |
應用場景示例
**任務:** 「編寫一個 Python 腳本來抓取特定 URL 的新聞並進行總結。」
* **零樣本模式:** 模型根據訓練數據編寫代碼。如果網站結構發生了變化或庫版本不同,代碼會運行失敗,用戶必須手動修復。
* **智能体工作流模式:**
1. **規劃:** 智能體決定首先檢查 URL 的結構。
2. **行動:** 它編寫並執行一個小腳本來獲取 HTML。
3. **觀察:** 它觀察到 HTML 結構,意識到需要使用 `BeautifulSoup`。
4. **優化:** 它使用正確的選擇器更新腳本並再次運行。
5. **完成:** 在成功後,它對內容進行總結。
---
Traditional Chinese (zh-tw)
概念:代理工作流 (Agentic Workflows)
傳統的 LLM 使用模式通常遵循「零樣本 (Zero-Shot)」模式:你提供一個提示詞,模型給出一個即時的響應。而**代理工作流 (Agentic Workflows)** 將範式從「單次生成」轉變為「迭代推理與行動」。
在代理工作流中,LLM 不僅僅是一個文本生成器,更是循環中的控制器。它可以規劃步驟、使用工具(例如搜尋網路或執行程式碼)、觀察結果,並根據這些觀察結果來優化下一步行動。
實際權衡
| 特性 | 零樣本提示 (Zero-Shot) | 代理工作流 (Agentic Workflows) |
| :--- | :--- | :--- |
| **延遲** | 低(單次處理) | 高(多次循環/工具調用) |
| **可靠性** | 不穩定(易產生幻覺) | 更高(透過回饋進行自我修正)|
| **複雜度** | 低(簡單的提示詞)| 高(需要狀態管理與工具定義)|
| **成本** | 低(Token 使用量極少)| 較高(每個任務的累積 Token 使用量大)|
應用場景範例
**任務:** 「編寫一個 Python 腳本來抓取特定 URL 的新聞並進行總結。」
* **零樣本模式:** 模型根據訓練數據編寫程式碼。如果網站結構發生了變化或函式庫版本不同,程式碼會執行失敗,使用者必須手動修復。
* **代理工作流模式:**
1. **規劃:** 代理決定首先檢查 URL 的結構。
2. **行動:** 它編寫並執行一個小腳本來獲取 HTML。
3. **觀察:** 它觀察到 HTML 結構,意識到需要使用 `BeautifulSoup`。
4. **優化:** 它使用正確的選擇器更新腳本並再次執行。
5. **完成:** 在成功後,它對內容進行總結。
Comments
Share your thoughts!
Loading comments…