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

create intent agent to determine intent of question #62

Conversation

harry-bedford
Copy link
Collaborator

Description

This PR introduces an intent agent to better breakdown a user's question. It does not wire it up to the supervisor or router, that will come in a future PR

Changelog

  • Create intent_agent.py
  • Create intent-format jinga template to define the response shape for the agent
  • Create intent jinga template to break down the user's utterance into intent and questions

Copy link
Collaborator

@hsauve-scottlogic hsauve-scottlogic left a comment

Choose a reason for hiding this comment

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

Looks great Harry! Just a few tiny comments

backend/src/prompts/templates/intent-format.j2 Outdated Show resolved Hide resolved
backend/src/prompts/templates/intent.j2 Outdated Show resolved Hide resolved
backend/src/prompts/templates/intent.j2 Outdated Show resolved Hide resolved
backend/src/prompts/templates/intent.j2 Outdated Show resolved Hide resolved
backend/src/prompts/templates/intent.j2 Outdated Show resolved Hide resolved
Copy link
Collaborator

@bheyman-scottlogic bheyman-scottlogic left a comment

Choose a reason for hiding this comment

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

Great stuff Harry, just a few little minor thing I have mentioned and to gain further clarity on! Got it working on my local and does a pretty good job!

"Parameter",
"tool",
"validator_agent",
]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should the datastore and maths agent be here too?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think they should. We're exposing agents here which is the list of the maths and datastore agent. We should then only be accessing these agents via the agents list

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ok makes sense, I wonder then if we need to differentiate between "agents" that are being used for tasks and ones that are always going to be a part of the flow ie validator. Are they still agents? The age old debate!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah a good question. I think they are still agents but like you say I think the name of the variable agents should be changed

backend/src/prompts/templates/intent.j2 Show resolved Hide resolved
backend/src/prompts/templates/intent.j2 Outdated Show resolved Hide resolved
backend/src/prompts/templates/intent.j2 Outdated Show resolved Hide resolved
backend/src/prompts/templates/intent.j2 Show resolved Hide resolved
backend/src/director.py Show resolved Hide resolved
backend/src/director.py Show resolved Hide resolved
@harry-bedford harry-bedford merged commit 9e4af93 into release/sum-my-subscriptions May 30, 2024
3 checks passed
@harry-bedford harry-bedford deleted the intent-prompting-better-utterance-breakdown branch May 30, 2024 09:32
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.

3 participants