WorkflowとAgentsの使い分け
LLM応用において,予測可能性(predictability)に応じたワークフローとエージェントの使い分けは重要である.
ワークフローとは,簡単にはプログラムにLLMを組み込むアプローチである(例:Cosenseのinfobox,Difyのworkflow)
エージェントとは,簡単にはLLMに思考とツール実行を交互に繰り返して目的達成させるアプローチである(例:Cursor,OpenAI deep research)
つまり,予測可能性の高い定型作業はプログラム言語で明瞭に記述する方策が有効であり,取り掛かるまで予測が困難な課題はその都度AI自身に次の行動を思考させる方策が有効である.
図1:ワークフロー(左)とエージェント(右)の概念図
code:mermaid
graph TD
classDef box fill:#f9f9f9,stroke:#333,stroke-width:1px;
class E,F,G,H,I,J box;
C --新情報--> B
classDef box fill:#f9f9f9,stroke:#333,stroke-width:1px;
class A,B,C,D box;
参考情報
When (and when not) to use agents
When building applications with LLMs, we recommend finding the simplest solution possible, and only increasing complexity when needed. This might mean not building agentic systems at all. Agentic systems often trade latency and cost for better task performance, and you should consider when this tradeoff makes sense.
When more complexity is warranted, workflows offer predictability and consistency for well-defined tasks, whereas agents are the better option when flexibility and model-driven decision-making are needed at scale. For many applications, however, optimizing single LLM calls with retrieval and in-context examples is usually enough.
ーーー
2025/4/23 15:06