Add agentic module: sequential, parallel, loop, supervisor and error-recovery workflows
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01G8ikz8xdWuTP5yun8DZ1hk
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
Supervisor model was scripted to reply with three JSON decisions.
|
||||
|
||||
Answer: Hotel Alfama
|
||||
|
||||
Worker calls: 2
|
||||
List one flight option to Lisbon for Ankur.
|
||||
List one hotel option in Lisbon for Ankur.
|
||||
|
||||
Supervisor model calls: 3
|
||||
|
||||
First prompt the supervisor saw:
|
||||
The user request is: 'Find me a flight and a hotel for Lisbon'.
|
||||
The last received response is: ''.
|
||||
|
||||
You must answer strictly in the following JSON format: {
|
||||
"agentName": (type: string),
|
||||
"arguments": (type: java.util.Map<java.lang.String, java.lang.Object>)
|
||||
}
|
||||
|
||||
What each responseStrategy returned for the same three decisions:
|
||||
(default) Hotel Alfama
|
||||
SCORED Flight AI-101 and Hotel Alfama booked options found. (supervisor calls: 4)
|
||||
|
||||
The extra SCORED call asked the supervisor model:
|
||||
You are a response evaluator that is provided with two responses to a user request.
|
||||
Your role is to score the two responses based on their relevance for the user request.
|
||||
|
||||
For each of the two responses, response1 and response2, you will return a score, respectively score 1 and score 2,
|
||||
between 0.0 and 1.0, where 0.0 means the response is completely irrelevant to the user request,
|
||||
and 1.0 means the response is perfectly relevant to the user request.
|
||||
|
||||
Return only the score and nothing else, without any additional text or explanation.
|
||||
|
||||
The user request is: 'Find me a flight and a hotel for Lisbon'.
|
||||
The first response is: 'Hotel Alfama'.
|
||||
The second response is: 'Flight AI-101 and Hotel Alfama booked options found.'.
|
||||
|
||||
You must answer strictly in the following JSON format: {
|
||||
"score1": (type: double),
|
||||
"score2": (type: double)
|
||||
}
|
||||
|
||||
SUMMARY Flight AI-101 and Hotel Alfama booked options found. (supervisor calls: 3)
|
||||
LAST Hotel Alfama (supervisor calls: 3)
|
||||
Reference in New Issue
Block a user