-
Notifications
You must be signed in to change notification settings - Fork 45
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
Add agent feedback policy #404
Merged
amirfz
merged 5 commits into
Aggregate-Intellect:main
from
20001LastOrder:agent_feedback_policy
Aug 28, 2024
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
631f501
Add task and context to the prompt
20001LastOrder 1f52af8
Fix question format and add ability for followup question
20001LastOrder 0c21401
Merge main
20001LastOrder c196683
Change package for nltk
20001LastOrder 90e8fdc
Merge branch 'main' into agent_feedback_policy
amirfz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
7 changes: 7 additions & 0 deletions
7
src/tests/data/test_feedback_policy_in_qa_test_feedback_policy_in_qa_complete_0.jsonl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{"input": [{"text": "You are an intelligent assistant helping the user to complete their task. You have the following task to complete:\\nWhat is the biggest?, Jupyter, Mars or Earth?\\n\\nContext of you work is as follows:\\nWhat is the biggest?, Jupyter, Mars or Earth?\\n\\n\\nYou have the following options to continue completing the this task:\\n\\n1. Google Search\\n\\nUse polite and engaging language, and ask the user what they want you to help them next. Not need to greet and keep it short and concise. \\n\\nIf you think the context is not enough to choose an action. Ask the user for more information.\\n", "agent": "human"}], "output": "To clarify, are you asking about the size of Jupiter, Mars, and Earth in terms of diameter, volume, or mass? Let me know how you'd like to proceed!", "llm_name": "gpt-4o-mini"} | ||
{"input": [{"text": "\\n\\n\\n\\n**Task Description**: What is the biggest?, Jupyter, Mars or Earth?\\n\\n**Possible Actions**:\\n{\\n \"name\": \"Google Search\",\\n \"args\": {\\n \"query\": \"string\"\\n },\\n \"usage\": \"Get answers from Google Search\"\\n}\\n\\n**Task Context**:\\nWhat is the biggest?, Jupyter, Mars or Earth?\\nGoogle search the question\\n\\n\\n**History of Previous Actions**:\\n\\n\\nYou should only respond in JSON format as described below without any extra text.\\nResponse Format:\\n{\\n \"command\": {\\n \"name\": \"tool/command name you choose\",\\n \"args\": {\\n \"arg name\": \"value\"\\n }\\n }\\n}\\nEnsure the response can be parsed by Python json.loads\\n\\nFollow the described format strictly.\\n\\n", "agent": "human"}], "output": "{\\n \"command\": {\\n \"name\": \"Google Search\",\\n \"args\": {\\n \"query\": \"What is the biggest planet Jupiter Mars or Earth?\"\\n }\\n }\\n}", "llm_name": "gpt-4o-mini"} | ||
{"input": [{"text": "You are an intelligent assistant helping the user to complete their task. You have the following task to complete:\\nWhat is the biggest?, Jupyter, Mars or Earth?\\n\\nContext of you work is as follows:\\nWhat is the biggest?, Jupyter, Mars or Earth?\\nGoogle search the question\\n\\n\\nYou have the following options to continue completing the this task:\\n\\n1. Google Search\\n\\nUse polite and engaging language, and ask the user what they want you to help them next. Not need to greet and keep it short and concise. \\n\\nIf you think the context is not enough to choose an action. Ask the user for more information.\\n", "agent": "human"}], "output": "Would you like me to perform a Google search to find out which is the biggest: Jupiter, Mars, or Earth?", "llm_name": "gpt-4o-mini"} | ||
{"input": [{"text": "\\n\\n\\n\\n**Task Description**: What is the biggest?, Jupyter, Mars or Earth?\\n\\n**Possible Actions**:\\n{\\n \"name\": \"Google Search\",\\n \"args\": {\\n \"query\": \"string\"\\n },\\n \"usage\": \"Get answers from Google Search\"\\n}\\n\\n**Task Context**:\\nWhat is the biggest?, Jupyter, Mars or Earth?\\nGoogle search the question\\nGoogle search the question\\n\\n\\n**History of Previous Actions**:\\nGoogle Search{'query': 'What is the biggest planet Jupiter Mars or Earth?'}\\nJupiter is the biggest planet\\n\\nYou should only respond in JSON format as described below without any extra text.\\nResponse Format:\\n{\\n \"command\": {\\n \"name\": \"tool/command name you choose\",\\n \"args\": {\\n \"arg name\": \"value\"\\n }\\n }\\n}\\nEnsure the response can be parsed by Python json.loads\\n\\nFollow the described format strictly.\\n\\n", "agent": "human"}], "output": "{\\n \"command\": {\\n \"name\": \"Google Search\",\\n \"args\": {\\n \"query\": \"What is the biggest planet Jupiter Mars or Earth?\"\\n }\\n }\\n}", "llm_name": "gpt-4o-mini"} | ||
{"input": [{"text": "You are an intelligent assistant helping the user to complete their task. You have the following task to complete:\\nWhat is the biggest?, Jupyter, Mars or Earth?\\n\\nContext of you work is as follows:\\nWhat is the biggest?, Jupyter, Mars or Earth?\\nGoogle search the question\\nGoogle search the question\\n\\n\\nYou have the following options to continue completing the this task:\\n\\n1. Google Search\\n\\nUse polite and engaging language, and ask the user what they want you to help them next. Not need to greet and keep it short and concise. \\n\\nIf you think the context is not enough to choose an action. Ask the user for more information.\\n", "agent": "human"}], "output": "Would you like me to perform a Google search to find out which is the biggest: Jupiter, Mars, or Earth?", "llm_name": "gpt-4o-mini"} | ||
{"input": [{"text": "\\n\\n\\n\\n**Task Description**: What is the biggest?, Jupyter, Mars or Earth?\\n\\n**Possible Actions**:\\n{\\n \"name\": \"Google Search\",\\n \"args\": {\\n \"query\": \"string\"\\n },\\n \"usage\": \"Get answers from Google Search\"\\n}\\n\\n**Task Context**:\\nWhat is the biggest?, Jupyter, Mars or Earth?\\nGoogle search the question\\nGoogle search the question\\nGoogle search the question\\n\\n\\n**History of Previous Actions**:\\nGoogle Search{'query': 'What is the biggest planet Jupiter Mars or Earth?'}\\nJupiter is the biggest planet\\nGoogle Search{'query': 'What is the biggest planet Jupiter Mars or Earth?'}\\nJupiter is the biggest planet\\n\\nYou should only respond in JSON format as described below without any extra text.\\nResponse Format:\\n{\\n \"command\": {\\n \"name\": \"tool/command name you choose\",\\n \"args\": {\\n \"arg name\": \"value\"\\n }\\n }\\n}\\nEnsure the response can be parsed by Python json.loads\\n\\nFollow the described format strictly.\\n\\n", "agent": "human"}], "output": "{\\n \"command\": {\\n \"name\": \"Google Search\",\\n \"args\": {\\n \"query\": \"What is the biggest planet Jupiter Mars or Earth?\"\\n }\\n }\\n}", "llm_name": "gpt-4o-mini"} | ||
{"input": [{"text": "You are a **question answering assistant** who solves user questions and offers a detailed solution.\\n\\nYour name is QA Agent.\\n\\nContext: What is the biggest?, Jupyter, Mars or Earth?\\nGoogle search the question\\nGoogle search the question\\nGoogle search the question\\n\\n\\nAction - Result History:\\nGoogle Search{'query': 'What is the biggest planet Jupiter Mars or Earth?'}\\nJupiter is the biggest planet\\nGoogle Search{'query': 'What is the biggest planet Jupiter Mars or Earth?'}\\nJupiter is the biggest planet\\nGoogle Search{'query': 'What is the biggest planet Jupiter Mars or Earth?'}\\nJupiter is the biggest planet\\n\\nGiven the context and the action-result history, please complete the task mentioned. Include any links you used from the context and history in the result.\\nTask: What is the biggest?, Jupyter, Mars or Earth?\\nResult:\\n", "agent": "human"}], "output": "The biggest among Jupiter, Mars, and Earth is **Jupiter**. \\n\\nJupiter is the largest planet in our solar system, significantly larger than both Mars and Earth. To provide some context:\\n\\n- **Jupiter** has a diameter of about 86,881 miles (139,822 kilometers) and is primarily composed of gas, making it a gas giant.\\n- **Earth** has a diameter of about 7,918 miles (12,742 kilometers).\\n- **Mars** has a diameter of about 4,221 miles (6,779 kilometers).\\n\\nThus, in terms of size, Jupiter is the clear winner. \\n\\nFor further information, you can refer to the following links:\\n- [NASA - Jupiter](https://solarsystem.nasa.gov/planets/jupiter/overview/)\\n- [NASA - Mars](https://solarsystem.nasa.gov/planets/mars/overview/)\\n- [NASA - Earth](https://solarsystem.nasa.gov/planets/earth/overview/) \\n\\nIf you have any more questions or need further clarification, feel free to ask!", "llm_name": "gpt-4o-mini"} |
7 changes: 7 additions & 0 deletions
7
src/tests/data/test_feedback_policy_in_qa_test_feedback_policy_in_qa_incomplete_0.jsonl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{"input": [{"text": "You are an intelligent assistant helping the user to complete their task. You have the following task to complete:\\nWhat is the biggest ?\\n\\nContext of you work is as follows:\\nWhat is the biggest ?\\n\\n\\nYou have the following options to continue completing the this task:\\n\\n1. Google Search\\n\\nUse polite and engaging language, and ask the user what they want you to help them next. Not need to greet and keep it short and concise. \\n\\nIf you think the context is not enough to choose an action. Ask the user for more information.\\n", "agent": "human"}], "output": "Could you please provide more details about what you're looking for? What specific topic or item do you want to know the biggest of?", "llm_name": "gpt-4o-mini"} | ||
{"input": [{"text": "\\n\\n\\n\\n**Task Description**: What is the biggest ?\\n\\n**Possible Actions**:\\n{\\n \"name\": \"Google Search\",\\n \"args\": {\\n \"query\": \"string\"\\n },\\n \"usage\": \"Get answers from Google Search\"\\n}\\n\\n**Task Context**:\\nWhat is the biggest ?\\nWhich planet is biggest, Earth, Mars or Jupiter?\\n\\n\\n**History of Previous Actions**:\\n\\n\\nYou should only respond in JSON format as described below without any extra text.\\nResponse Format:\\n{\\n \"command\": {\\n \"name\": \"tool/command name you choose\",\\n \"args\": {\\n \"arg name\": \"value\"\\n }\\n }\\n}\\nEnsure the response can be parsed by Python json.loads\\n\\nFollow the described format strictly.\\n\\n", "agent": "human"}], "output": "{\\n \"command\": {\\n \"name\": \"Google Search\",\\n \"args\": {\\n \"query\": \"Which planet is the biggest: Earth, Mars, or Jupiter?\"\\n }\\n }\\n}", "llm_name": "gpt-4o-mini"} | ||
{"input": [{"text": "You are an intelligent assistant helping the user to complete their task. You have the following task to complete:\\nWhat is the biggest ?\\n\\nContext of you work is as follows:\\nWhat is the biggest ?\\nWhich planet is biggest, Earth, Mars or Jupiter?\\n\\n\\nYou have the following options to continue completing the this task:\\n\\n1. Google Search\\n\\nUse polite and engaging language, and ask the user what they want you to help them next. Not need to greet and keep it short and concise. \\n\\nIf you think the context is not enough to choose an action. Ask the user for more information.\\n", "agent": "human"}], "output": "Jupiter is the biggest planet among Earth, Mars, and itself. Would you like to know more about the planets or anything else?", "llm_name": "gpt-4o-mini"} | ||
{"input": [{"text": "\\n\\n\\n\\n**Task Description**: What is the biggest ?\\n\\n**Possible Actions**:\\n{\\n \"name\": \"Google Search\",\\n \"args\": {\\n \"query\": \"string\"\\n },\\n \"usage\": \"Get answers from Google Search\"\\n}\\n\\n**Task Context**:\\nWhat is the biggest ?\\nWhich planet is biggest, Earth, Mars or Jupiter?\\nWhich planet is biggest, Earth, Mars or Jupiter?\\n\\n\\n**History of Previous Actions**:\\nGoogle Search{'query': 'Which planet is the biggest: Earth, Mars, or Jupiter?'}\\nJupiter is the biggest planet\\n\\nYou should only respond in JSON format as described below without any extra text.\\nResponse Format:\\n{\\n \"command\": {\\n \"name\": \"tool/command name you choose\",\\n \"args\": {\\n \"arg name\": \"value\"\\n }\\n }\\n}\\nEnsure the response can be parsed by Python json.loads\\n\\nFollow the described format strictly.\\n\\n", "agent": "human"}], "output": "{\\n \"command\": {\\n \"name\": \"Google Search\",\\n \"args\": {\\n \"query\": \"Which planet is the biggest: Earth, Mars, or Jupiter?\"\\n }\\n }\\n}", "llm_name": "gpt-4o-mini"} | ||
{"input": [{"text": "You are an intelligent assistant helping the user to complete their task. You have the following task to complete:\\nWhat is the biggest ?\\n\\nContext of you work is as follows:\\nWhat is the biggest ?\\nWhich planet is biggest, Earth, Mars or Jupiter?\\nWhich planet is biggest, Earth, Mars or Jupiter?\\n\\n\\nYou have the following options to continue completing the this task:\\n\\n1. Google Search\\n\\nUse polite and engaging language, and ask the user what they want you to help them next. Not need to greet and keep it short and concise. \\n\\nIf you think the context is not enough to choose an action. Ask the user for more information.\\n", "agent": "human"}], "output": "Jupiter is the biggest planet among Earth, Mars, and Jupiter. How can I assist you further?", "llm_name": "gpt-4o-mini"} | ||
{"input": [{"text": "\\n\\n\\n\\n**Task Description**: What is the biggest ?\\n\\n**Possible Actions**:\\n{\\n \"name\": \"Google Search\",\\n \"args\": {\\n \"query\": \"string\"\\n },\\n \"usage\": \"Get answers from Google Search\"\\n}\\n\\n**Task Context**:\\nWhat is the biggest ?\\nWhich planet is biggest, Earth, Mars or Jupiter?\\nWhich planet is biggest, Earth, Mars or Jupiter?\\nWhich planet is biggest, Earth, Mars or Jupiter?\\n\\n\\n**History of Previous Actions**:\\nGoogle Search{'query': 'Which planet is the biggest: Earth, Mars, or Jupiter?'}\\nJupiter is the biggest planet\\nGoogle Search{'query': 'Which planet is the biggest: Earth, Mars, or Jupiter?'}\\nJupiter is the biggest planet\\n\\nYou should only respond in JSON format as described below without any extra text.\\nResponse Format:\\n{\\n \"command\": {\\n \"name\": \"tool/command name you choose\",\\n \"args\": {\\n \"arg name\": \"value\"\\n }\\n }\\n}\\nEnsure the response can be parsed by Python json.loads\\n\\nFollow the described format strictly.\\n\\n", "agent": "human"}], "output": "{\\n \"command\": {\\n \"name\": \"Google Search\",\\n \"args\": {\\n \"query\": \"Which planet is the biggest: Earth, Mars, or Jupiter?\"\\n }\\n }\\n}", "llm_name": "gpt-4o-mini"} | ||
{"input": [{"text": "You are a **question answering assistant** who solves user questions and offers a detailed solution.\\n\\nYour name is QA Agent.\\n\\nContext: What is the biggest ?\\nWhich planet is biggest, Earth, Mars or Jupiter?\\nWhich planet is biggest, Earth, Mars or Jupiter?\\nWhich planet is biggest, Earth, Mars or Jupiter?\\n\\n\\nAction - Result History:\\nGoogle Search{'query': 'Which planet is the biggest: Earth, Mars, or Jupiter?'}\\nJupiter is the biggest planet\\nGoogle Search{'query': 'Which planet is the biggest: Earth, Mars, or Jupiter?'}\\nJupiter is the biggest planet\\nGoogle Search{'query': 'Which planet is the biggest: Earth, Mars, or Jupiter?'}\\nJupiter is the biggest planet\\n\\nGiven the context and the action-result history, please complete the task mentioned. Include any links you used from the context and history in the result.\\nTask: What is the biggest ?\\nResult:\\n", "agent": "human"}], "output": "The biggest planet among Earth, Mars, and Jupiter is Jupiter. \\n\\nJupiter is the largest planet in our solar system, significantly larger than both Earth and Mars. To provide some context:\\n\\n- **Jupiter**: It has a diameter of about 86,881 miles (139,822 kilometers) and is primarily composed of gas, making it a gas giant.\\n- **Earth**: The diameter of Earth is about 7,917.5 miles (12,742 kilometers).\\n- **Mars**: Mars has a diameter of about 4,212 miles (6,779 kilometers).\\n\\nIn summary, Jupiter is the largest of the three planets mentioned. \\n\\nFor further information, you can refer to resources like NASA's planetary fact sheets or educational websites about the solar system.", "llm_name": "gpt-4o-mini"} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we don’t have any context for the question, how can the generated question be useful? For example, if I ask ‘What is the biggest?’ the question should specify ‘biggest what?’ or something similar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Eyobyb I added the current task and context to the prompt. Could you check with the test case you have and also commit your test case to the test suite?