Skip to content

Commit

Permalink
FS-76 Fix no agent being selected when the webagent should be being u…
Browse files Browse the repository at this point in the history
…sed (#47)
  • Loading branch information
evpearce authored Dec 9, 2024
1 parent 2c8654f commit 777b3b8
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 4 deletions.
36 changes: 36 additions & 0 deletions backend/promptfoo/agent_selection_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,42 @@ tests:
- type: javascript
value: JSON.parse(output).agent_name === "WebAgent"

- description: "Test the WebAgent is selected for queries about todays weather"
vars:
user_prompt_template: "agent-selection-user-prompt"
user_prompt_args:
task: "what is todays weather in dublin?"
system_prompt_template: "agent-selection-system-prompt"
system_prompt_args:
list_of_agents: *list_of_agents
assert:
- type: javascript
value: JSON.parse(output).agent_name === "WebAgent"

- description: "Test the WebAgent is selected for a website query"
vars:
user_prompt_template: "agent-selection-user-prompt"
user_prompt_args:
task: "What are Ryanair saying they are doing to combat climate change on their website?"
system_prompt_template: "agent-selection-system-prompt"
system_prompt_args:
list_of_agents: *list_of_agents
assert:
- type: javascript
value: JSON.parse(output).agent_name === "WebAgent"

- description: "Test the WebAgent is selected for conversational matters"
vars:
user_prompt_template: "agent-selection-user-prompt"
user_prompt_args:
task: "Hello how are you?"
system_prompt_template: "agent-selection-system-prompt"
system_prompt_args:
list_of_agents: *list_of_agents
assert:
- type: javascript
value: JSON.parse(output).agent_name === "WebAgent"

- description: "Test the DatastoreAgent is selected for a data query related to the bloomberg dataset"
vars:
user_prompt_template: "agent-selection-user-prompt"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ You job is to assign a task to an agent. You know that an Agent is a digital ass

{{ list_of_agents }}


Choose an agent from the list unless the task is 'personal' or a 'greeting', if this is the case say the agent is 'none'.

Give a reasoning for your choice.
You must choose an agent from the list and give a reasoning for your choice.

Reply only in json with the following format:

Expand Down

0 comments on commit 777b3b8

Please sign in to comment.