Hello Community,
I am developing a scalable travel assistant based on a Hub & Spoke architecture and am facing a persistent issue where the Base Playbook (the Router) fails to execute the topic-switching logic cleanly.
1. Architecture & Setup
HUB: The Base Playbook acts as the central Router. Its sole job is to delegate and route. SPOKES: Specialized Task Playbooks (e.g., ${PLAYBOOK: A}, ${PLAYBOOK:B}) are the subject matter experts.
2. The Failure Mode (Reproducible)
A user starts a conversation about Travel Operator A and then switches to Travel Operator B.
Input: How many hotels do operator A have?
Action: Base Playbook correctly routes to the A Playbook.
Input: And how many does B have? (Topic Change)
Action: A Playbook exits correctly and silently with the output parameter session_status: topic_change_detected. (The specialist logic works perfectly!)
Expected Router Action: Base Playbook must IMMEDIATELY choose the action pb^B (Tool Invocation).
Actual Router Action (Error): The Base Playbook chooses the respond action and generates text that mentions the old topic again, instead of routing to B.
Example Base Playbook Response: “Since you are asking specifically about A, I will forward you directly to our expert for TUI Cruises…” (It tries to confirm or re-route to the recently exited A session).
3. Implemented Fixes (Failed)
I attempted to override the LLM’s bias toward the old context using extreme instructions:
Instruction A (General): Base Playbook was told to ignore all past context and focus exclusively on the last sentence for the keyword.
Instruction B (Technical): Base Playbook was strictly instructed: “It is STRICTLY FORBIDDEN to execute the respond action (i.e., generate text) when a new keyword is recognized. The next action MUST be a Playbook Invocation (pb^xxx).”
Despite these strict instructions, the Agent ignores the correct routing and always opts for the forbidden respond action, which requires a second input from the user.
Core Question for the Community
How can I reliably and forcefully get the LLM in this architecture to prioritize the Tool Invocation (pb^B) over Text Generation (respond) when a critical routing keyword is present after a specialist has exited?
Is there a configuration way more effectively overrides the LLM’s conversational context/history in this control transfer scenario?