
Answer-first summary for fast verification
Answer: The chatbot should be implemented as a multi-step LLM workflow. First, identify the type of question asked, then route the question to the appropriate model. If it’s a historical failure rate question, send the query to a text-to-SQL model. If it’s a troubleshooting question, then send the query to another model that summarizes the equipment-specific document and generates the response.
Option B is the optimal choice because it implements a multi-step LLM workflow that first classifies the question type and then routes it to specialized models - a text-to-SQL model for querying the structured failure rate data in the database table, and a document summarization model for extracting troubleshooting information from the PDF manuals. This approach leverages the strengths of different models for different data types and question types, providing accurate and efficient responses. Option A is suboptimal because converting PDF manuals to Q&A pairs loses the rich contextual information needed for troubleshooting. Option C creates unnecessary complexity with separate chatbots. Option D is inefficient because converting structured database tables to text documents loses the benefits of SQL querying for numerical/statistical questions about failure rates.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
A Generative AI Engineer is developing an internal chatbot that must classify user questions and route them to the appropriate models. For instance, a user might inquire about the historical failure rates of a specific electrical part, while another might ask for troubleshooting steps for a piece of electrical equipment. The available data sources are a database of PDF manuals for electrical equipment and a table containing failure records for electrical parts.
Which workflow should be implemented to support this chatbot?
A
Parse the electrical equipment PDF manuals into a table of question and response pairs. That way, the same chatbot can query tables easily to answer questions about both historical failure rates and equipment troubleshooting.
B
The chatbot should be implemented as a multi-step LLM workflow. First, identify the type of question asked, then route the question to the appropriate model. If it’s a historical failure rate question, send the query to a text-to-SQL model. If it’s a troubleshooting question, then send the query to another model that summarizes the equipment-specific document and generates the response.
C
There should be two different chatbots handling different types of user queries.
D
The table with electrical part failures should be converted into a text document first. That way, the same chatbot can use the same document retrieval process to generate answers regardless of question types.