Files
langchain4j-demo/agentic/output/05-supervisor.txt
T

45 lines
1.7 KiB
Plaintext

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)