Why Use Agents?
Although LLMs can understand language and carry out instructions they are limited to the capabilities inherent in their training. Specifically, they face the following issues which can be resolved by agents:
- Multi-step execution: LLMs struggle with tasks that require multiple steps. The accuracy decreases as the number of steps increases, leading to potentially unacceptable failure rates for complex tasks. Agents address this by planning and executing sequences of actions to achieve goals.
- Planning and strategising: LLMs not trained to do reasoning might lack the planning capabilities needed for complex tasks. Even with state-of-the-art LLMs, combining planning and execution in a single pass often diminishes quality since complex tasks can benefit from separation of concerns. Agents address this by explicitly incorporating planning modules to break down tasks, consider options, and choose the most promising path.
- Currency of Knowledge: LLMs have a limited awareness of the real world. The data which they are pretrained on also has a cut-off date, making it hard to answer questions that require new information. Agents use tools like web browsing to access up-to-date information and reduce hallucinations. They can also access internal knowledge sources.
- Precise Tool Calling: LLMs struggle with translating natural language instructions into API calls: Natural language can be ambiguous, and APIs might have poor documentation. Agents can be designed with clear tool documentation and intent classifiers to mitigate these issues.
- Context Window Limitations: LLM-enabled solutions which require a lot of information to be processed can quickly exceed the LLMs’ context-window limits . Agents can use memory systems (both short-term and long-term) to manage context effectively.
We would like to point out that not all LLMs are the same and the challenges differ for models (e.g. OpenAI o3 would have less difficulties with complex tasks, and context window limitations wouldn’t affect Gemini 1.5 Pro as much). However, most LLMs face at least one of these problems and using an agentic framework can help them overcome these difficulties in one way or another.
TL;DR
LLMs' limitations prevent them from completing complex tasks. Instead of getting the LLMs to complete the tasks themselves, agents use LLMs to strategise and make decisions to complete these tasks with the help of tools.