Question triage classifies an incoming question by topic and complexity, then routes it to the smallest specialist retrieval path. Instead of querying every data source, a lightweight classifier activates only the relevant agent chain, reducing latency, token use, and pointless searches. section 4.8 section 1.1
A production-oriented triage workflow typically:
- Receives a validated user question and considers its topic, complexity, and available context. section 1.1
- Assigns a category such as PRODUCT or ORDER, or returns CLARIFY when the request lacks enough information. section 4.8 section 4.8.1
- Activates the matching agent chain, which may search several related databases in parallel. section 4.8
- Passes clarification text back to the user when classification is ambiguous rather than forcing an unreliable retrieval route. section 4.8.1
A minimal semantic switchboard
A triage prompt asks the language model to return *PRODUCT for product questions, *ORDER for order questions, or *CLARIFY with a bracketed request for more information. A small function sends the prompt with chat history, checks the returned marker, strips clarification brackets, and returns a normalized category plus message. For example, “What is the warranty on my X24 blender?” follows the product path, while an order number follows the order path. section 4.8.1 section 1.1
Figure 4.14 The architecture of a triage function. The triage function helps to classify what kind of question the user is asking, and which agents should be activated. The user will ask a question, and an LLM is asked to output the category to which the question belongs: Product, Customer Order, or Clarify (if more information is needed from the user)
Shows the user question entering an LLM classifier and branching into Product, Customer Order, or Clarify agent paths. section 4.8


