Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS-76 Update agent selection prompt #45

Merged
merged 2 commits into from
Dec 6, 2024
Merged

Conversation

evpearce
Copy link
Collaborator

@evpearce evpearce commented Dec 5, 2024

Description

https://scottlogic.atlassian.net/browse/FS-76
Previously the WebAgent was being selected when the DatastoreAgent should have been and vice versa. I have tried to fix it and added prompt foo tests to assert this.

Some of my changes are formatting, I don't think the previous team had consistent formatting but I think that we are all using the same formatter now? Hence I have kept the changes

Changelog

  • remove unused agents (FileAgent and MathsAgent)
  • update description of WebAgent to improve prompt
  • update description of DatastoreAgent to improve prompt
  • refactor best-next-steps prompt into agent-selection prompts

@evpearce evpearce self-assigned this Dec 5, 2024
@evpearce evpearce changed the title Update agent selection prompt FS-76 Update agent selection prompt Dec 5, 2024
@@ -0,0 +1,85 @@
description: "Agent selection"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

async def build_plan(task, llm: LLM, scratchpad, model):
best_next_step_prompt = build_best_next_step_prompt(task, scratchpad)
agent_selection_system_prompt = build_agent_selection_system_prompt(task, scratchpad)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could bring the creation of the system prompt back in here, we don't often extract it out like this. If you are looking to keep the print stuff in, then keeping it in a separate function like pretty_log and update the prints to log.infos

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ha! I thought I had left some print statements in but did a codewide search for console.log and nothing came up - I'll take them out and change this too

@evpearce evpearce merged commit 2c8654f into main Dec 6, 2024
4 checks passed
@evpearce evpearce deleted the FS-76/improve-agent-selection branch December 6, 2024 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants