LLM Calls vs Agents #2593
-
Hi there, I'm currently building a chatbot, where the user input goes through multiple stages, each of which involves a call to an LLM, and eventually generates a final response that's being sent back to the user. For the sake of simplicity, let's assume three sequential stages:
I understand that ADK is suitable for building agents, however, would it make sense for the first stage, which is the Intent Classifier, and doesn't really need to be an agent, to use an |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Response from ADK Answering Agent (experimental, answer may be inaccurate) TLDR: Using an ADK Hi @gmyrianthous, that's a great question! You're right that for a single, isolated LLM call, using ADK might seem like overkill compared to a direct API call. However, given your multi-stage chatbot architecture (Intent Classifier -> Handler -> QA), using ADK from the very beginning, even for the seemingly simple Intent Classifier, offers several advantages: 1. Modularity and Composition: Your three stages are a perfect use case for ADK's multi-agent capabilities. You can define each stage as a specialized agent and then compose them into a larger, more complex agent. This "agent team" approach makes your system more modular, easier to test, and simpler to reason about. For example, you could have:
2. State and Session Management: ADK provides built-in session and state management, which is crucial for passing context between your different stages. The 3. Observability: ADK comes with built-in observability and tracing. By using ADK for all stages, you get a unified view of your entire workflow. You can easily trace a request as it flows through the Intent Classifier, Handler, and QA stages, which is invaluable for debugging and performance monitoring. 4. Consistency and Scalability: Starting with ADK establishes a consistent framework for your application. As you add more complexity, new tools, or even more stages to your chatbot, you'll already be using a system designed for that kind of growth. ADK is designed to be code-first and model-agnostic, giving you flexibility and control over your agent's architecture. In summary: While a simple script might be faster for a single LLM call, the benefits of using ADK—modularity, state management, observability, and scalability—make it a strong choice for your multi-stage chatbot. Using an I hope this helps! References: |
Beta Was this translation helpful? Give feedback.
Response from ADK Answering Agent (experimental, answer may be inaccurate)
TLDR: Using an ADK
LLMAgent
for your Intent Classifier, even without tools, is a good idea, especially since you have a multi-stage process. ADK provides benefits like modularity, state management, and observability that you wouldn't get from a simple LLM call. This will make your chatbot more robust and easier to manage as it grows.Hi @gmyrianthous, that's a great question!
You're right that for a single, isolated LLM call, using ADK might seem like overkill compared to a direct API call. However, given your multi-stage chatbot architecture (Intent Classifier -> Handler -> QA), using ADK from the very beginning,…