GENERATIVE-AI-ENGINEER-ASSOCIATE practice question 7 of 15

A Generative AI Engineer is creating an agent-based LLM system for their favorite monster truck team. The system can answer text based questions about the monster truck team, lookup event dates via an API call, or query tables on the team’s latest standings. How could the Generative AI Engineer best design these capabilities into their system?

Full set: 61 questions
Answer options
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. Correct answer
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.
Correct Answer:
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.
Explanation

The most effective and standard design for a system with multiple, distinct capabilities (knowledge retrieval, API calls, database queries) is an agent-based architecture. This approach involves defining each capability as a "tool" and providing the LLM with a system prompt that describes these tools. The agent then uses its reasoning capabilities to understand the user's query, select the appropriate tool or sequence of tools, and execute them to generate a comprehensive answer. This design is flexible, scalable, and leverages the core strengths of modern LLMs in planning and tool use, which is superior to rigid, hard-coded logic.

Why Incorrect

A. This is an incomplete solution. A RAG architecture only addresses the text-based question capability and ignores the required API calls and table queries.
C. This method is brittle and not robust. Relying on simple text parsing of LLM output is less reliable than structured methods like function calling used by agents.
D. This design is not scalable. Placing large, dynamic datasets like event dates and standings into the system prompt is inefficient and will quickly exceed context window limits.

References

1. Official Vendor Documentation (Databricks): The Databricks documentation on Function Calling with Foundation Model APIs explains this pattern. The model is given a user query and a list of available tools (functions), and it intelligently chooses which function to call. This is the core mechanism of the agent described in option B.

Source: Databricks Documentation, "Function calling on Databricks," Section: "How does function calling work?".

2. Official Vendor Documentation (Databricks): A Databricks blog post on building agents details this architecture. It states, "An agent has access to a suite of tools... Based on the user input, the agent has to decide which, if any, of these tools to call." This directly supports the design in option B.

Source: Databricks Blog, "Building LLM-powered bots and agents with Databricks," May 22, 2024, Section: "What are LLM-powered agents?".

3. Academic Publication: The paper "ReAct: Synergizing Reasoning and Acting in Language Models" is a foundational work for LLM agents. It demonstrates how LLMs can generate both reasoning traces and task-specific actions (like using a tool) to solve problems, which is the principle behind the agent system in option B.

Source: Yao, S., et al. (2022). "ReAct: Synergizing Reasoning and Acting in Language Models." arXiv preprint arXiv:2210.03629. Section 2: "ReAct: Reasoning and Acting". DOI: https://doi.org/10.48550/arXiv.2210.03629

Scroll to Top