-
Notifications
You must be signed in to change notification settings - Fork 16
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
fix: supervisor not producing desired output #121
Changes from 7 commits
65d5b63
71ec062
d17a101
9e6aa74
226a71b
82183d2
8e91728
160ee0c
57c4106
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,17 +32,15 @@ const wrapupRedactor = agent({ | |
const wrapUpTrending = workflow({ | ||
team: { githubResearcher, wrapupRedactor }, | ||
description: ` | ||
Research the URL "https://github.com/trending/typescript" page using firecrawl tool | ||
Summarize information about 3 top projects into a comprehensive report markdown output. | ||
|
||
Here are some ground rules to follow: | ||
- Include one sentence summary for each project. | ||
Research the "https://github.com/trending/typescript" page. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed "using fire crawl tool", as the how is handled by responsible agent. |
||
Summarize information about 3 top projects into a comprehensive markdown report. | ||
Include one sentence summary for each project. | ||
`, | ||
knowledge: ` | ||
We are preparing a report for the Typescript community. | ||
We are preparing a report for the TypeScript community. | ||
`, | ||
output: ` | ||
Comprehensive markdown report with the top trending typescript projects. | ||
Comprehensive markdown report with the top trending TypeScript projects. | ||
`, | ||
snapshot: logger, | ||
}) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ const { firecrawl } = createFireCrawlTool({ | |
const webCrawler = agent({ | ||
description: ` | ||
You are skilled at browsing Web pages. | ||
You are saving the documents to vector store for later usage. | ||
You can save the documents to Vector store for later usage. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changed to expressing capabilities instead of orders |
||
`, | ||
tools: { | ||
firecrawl, | ||
|
@@ -39,9 +39,8 @@ const human = agent({ | |
|
||
const reportCompiler = agent({ | ||
description: ` | ||
You can search Vector Store to find relevant informations and create reports based on it | ||
Based on the information from Vector Store you can compile a comprehensive report. | ||
You're famous of beautiful Markdown formatting. | ||
You can create a comprehensive report based on the information from Vector store. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Combined lines 42 and 43 into one, as they were very close to each other |
||
You're famous for beautiful Markdown formatting. | ||
`, | ||
tools: { | ||
searchInVectorStore, | ||
|
@@ -51,26 +50,20 @@ const reportCompiler = agent({ | |
const wrapUpTrending = workflow({ | ||
team: { webCrawler, human, reportCompiler }, | ||
description: ` | ||
Research the URL "https://github.com/trending/typescript" page. | ||
Select 3 top projects. Browse details about these projects on their subpages. | ||
Store each page in Vector Store for further usage. | ||
After you store the information you don't need to browse the page again | ||
because everything is stored in Vector Store. | ||
|
||
Ask user about which project he wants to learn more. Ask user only once. | ||
`, | ||
Research the "https://github.com/trending/typescript" page. | ||
Select 3 top projects. | ||
For each project, browse details about it on their subpages. | ||
Store each page in Vector store for later usage. | ||
|
||
Ask user about which project he wants to learn more. | ||
`, | ||
knowledge: ` | ||
Create a comprehensive markdown report using information from Vector Store, based on user selection: | ||
- create a one, two sentence summary about every project. | ||
- include detailed summary about the project selected by the user. | ||
|
||
Here are some ground rules to follow: | ||
- Use Vector Store if you need information about the project. | ||
Each document in Vector store is a page from the website. | ||
`, | ||
output: ` | ||
Comprehensive markdown report including: | ||
- summary on top trending Typescript projects. | ||
- detailed info about the project selected by the user. | ||
Create a comprehensive markdown report: | ||
- create a one, two sentences summary about every project. | ||
- include detailed summary about the project selected by the user. | ||
`, | ||
snapshot: logger, | ||
}) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,10 +6,12 @@ import { askUser } from '../tools/askUser.js' | |
const nurse = agent({ | ||
description: ` | ||
You are skilled nurse / doctor assistant. | ||
You role is to cooperate with reporter to create a pre-visit note for a patient that is about to come for a visit. | ||
Ask user questions about the patient's health and symptoms. | ||
Ask one question at time up to 5 questions. | ||
Analyze the answer and ask another question based on the answer and context. | ||
You are proffesional and kind. | ||
|
||
You can ask patient questions about their health and symptoms by running "askPatient" tool. | ||
You can only ask one question at a time. | ||
|
||
You never ask for personal data that could be used to identify the patient. | ||
`, | ||
tools: { | ||
askPatient: askUser, | ||
|
@@ -27,29 +29,16 @@ const reporter = agent({ | |
export const preVisitNoteWorkflow = workflow({ | ||
team: { nurse, reporter }, | ||
description: ` | ||
Create a pre-visit note for a patient that is about to come for a visit. | ||
The note should include the patient's health and symptoms. | ||
`, | ||
knowledge: ` | ||
Behaviour: | ||
- be professional and kind, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Moved this to agent description, as it describes nurse capabilities more than universal knowledge to all agents |
||
- ask questions one at a time, | ||
- listen and analyze the answer before asking another question, | ||
- be inquisitive and ask for details. | ||
Interview a patient that is about to come for a visit. | ||
|
||
Include: | ||
You can only ask up to 5 questions in total. | ||
You analyze the answer and ask another question based on the answer and context. | ||
`, | ||
output: ` | ||
Comprehensive markdown pre-visit report that covers: | ||
- symptoms, | ||
- health issues, | ||
- medications, | ||
- allergies, | ||
- surgeries | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed number of things to focus on. Previously, due to how this workflow was structured, it would ask up to 5 questions FOR EACH area, making it hard to complete this without having to answer ~10-15 questions. Decreasing number of areas of focus and increasing number of questions allows the system to both ask comprehensive set of questions, and also do follow-ups. |
||
|
||
Never ask fo: | ||
- personal data, | ||
- sensitive data, | ||
- any data that can be used to identify the patient. | ||
`, | ||
output: ` | ||
A markdown report for the patient's pre-visit note. | ||
- any other relevant information. | ||
`, | ||
}) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,15 +9,15 @@ const personalizedActivityPlanner = agent({ | |
description: ` | ||
You are skilled at creating personalized itineraries that cater to | ||
the specific preferences and demographics of travelers. | ||
Your goal is to research and find cool things to do at the destination, | ||
Your research and find cool things to do at the destination, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed |
||
including activities and events that match the traveler's interests and age group. | ||
`, | ||
}) | ||
|
||
const landmarkScout = agent({ | ||
description: ` | ||
You are skilled at researching and finding interesting landmarks at the destination. | ||
Your goal is to find historical landmarks, museums, and other interesting places. | ||
Your find historical landmarks, museums, and other interesting places. | ||
`, | ||
tools: { | ||
lookupWikipedia, | ||
|
@@ -28,16 +28,14 @@ const restaurantScout = agent({ | |
description: ` | ||
As a food lover, you know the best spots in town for a delightful culinary experience. | ||
You also have a knack for finding picturesque and entertaining locations. | ||
Your goal is to find highly-rated restaurants and dining experiences at the destination, | ||
Your find highly-rated restaurants and dining experiences at the destination, | ||
and recommend scenic locations and fun activities. | ||
`, | ||
}) | ||
|
||
const itineraryCompiler = agent({ | ||
description: ` | ||
With an eye for detail, you organize all the information into a coherent and enjoyable travel plan. | ||
Your goal is to compile all researched information into a comprehensive day-by-day itinerary, | ||
ensuring the integration of flights and hotel information. | ||
`, | ||
}) | ||
|
||
|
@@ -65,10 +63,12 @@ const researchTripWorkflow = workflow({ | |
- Hotel location: Main Square, Wrocław | ||
- Flight information: Flight AA123, arriving on 2023-12-15 | ||
- How long is the trip: 7 days | ||
`, | ||
|
||
Consider flights confirmed. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To make comprehensive report, it wants to confirm flights, which it doesn't have APIs. So to avoid erroring from time to time, we make this explicit. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, replaced word literary with plan. |
||
`, | ||
output: ` | ||
Comprehensive day-by-day itinerary for the trip to Wrocław, Poland. | ||
Ensure the itinerary includes flights, hotel information, and all planned activities and dining experiences. | ||
Comprehensive day-by-day plan for the trip to Wrocław, Poland. | ||
Ensure the plan includes flights, hotel information, and all planned activities and dining experiences. | ||
`, | ||
}) | ||
|
||
|
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.
Agent doesn't know who provides the input, so I rephrased it a bit.
I also moved "requirements" from workflow description to agent, as this is "how" that applies to that one specifically