
Answer-first summary for fast verification
Answer: Write a system prompt for the agent listing available tools and bundle it into an agent system that runs a number of calls to solve a query.
Option B is the optimal choice because it directly implements an agent-based system with tool calling capabilities, which aligns perfectly with the requirements. The system needs to handle three distinct capabilities: answering text-based questions, making API calls for event dates, and querying database tables for standings. An agent system with defined tools allows the LLM to intelligently select and execute the appropriate tool based on the query context. This approach provides flexibility, scalability, and maintains the agent-based architecture specified in the question. Option A only addresses the text-based questions via RAG but ignores the API and database query requirements. Option C relies on text parsing and conditional statements, which is less robust and more error-prone than proper tool calling. Option D mixes RAG with hardcoded system prompt information, which is inefficient and doesn't properly leverage the agent architecture for dynamic API and database queries.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
A Generative AI Engineer is building an agent-based LLM system for a monster truck team. The system needs to handle text-based questions about the team, perform API calls to look up event dates, and query database tables for the latest standings.
What is the optimal design approach for integrating these capabilities into the system?
A
Ingest PDF documents about the monster truck team into a vector store and query it in a RAG architecture.
B
Write a system prompt for the agent listing available tools and bundle it into an agent system that runs a number of calls to solve a query.
C
Instruct the LLM to respond with “RAG”, “API”, or “TABLE” depending on the query, then use text parsing and conditional statements to resolve the query.
D
Build a system prompt with all possible event dates and table information in the system prompt. Use a RAG architecture to lookup generic text questions and otherwise leverage the information in the system prompt.
No comments yet.