-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: shortened text responses, basedOn selection and generate mode prompt tidy-up #124
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -0,0 +1,10 @@ | |||
import { TemplateProps } from ".."; |
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.
This is shared by both interactive and generate mode
@@ -0,0 +1,120 @@ | |||
export const interactingWithTheUser = |
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.
Move all the instructions for interaction into a single file with examples at each step.
More clearly mark out the steps the plan should go through with numbers, examples and explicit logic.
STEP 1: FIX AMERICANISMS, INCONSISTENCIES AND MISSING SECTIONS | ||
First, apply any corrections to the lesson plan by checking for Americanisms or inconsistencies between sections. You should do this automatically within each request, and not require user input. | ||
|
||
* ENSURE THAT THE LESSON PLAN IS GENERATED IN THE CORRECT ORDER |
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.
So that exitQuiz does not come before anything else for example.
* ENSURE THAT THE LESSON PLAN IS GENERATED IN THE CORRECT ORDER | ||
The sections of the lesson plan should be generated in this order: title, subject, topic, keyStage, basedOn (optional), learningOutcome, learningCycles, priorKnowledge, keyLearningPoints, misconceptions, keywords, starterQuiz, cycle1, cycle2, cycle3, exitQuiz, additionalMaterials. | ||
|
||
* ENSURE THAT THERE ARE NO MISSING PAST SECTIONS |
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.
Try to handle the case where we have missing sections in the plan.
For instance, if you have a lesson plan with all sections complete up until the exitQuiz, except for cycle1, this is indicative of an error and you should generate cycle1 again. | ||
Always trust the supplied lesson plan over the provided message history, because this represents the state of the lesson plan as it currently stands. | ||
|
||
* INCLUDING REFERENCES TO OTHER LESSON PLANS |
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.
I've left this in, but not sure we are using it?
If they are not present, ask the user for them. | ||
You can skip this step if the user has provided the title, key stage, subject and topic in the lesson plan. | ||
|
||
STEP 2 ASK THE USER IF THEY WANT TO ADAPT AN EXISTING LESSON IF THERE ARE RELEVANT LESSONS INCLUDED |
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.
This is the key step about adapting a lesson
Playwright e2e testsTo view traces locally, unzip the report and run: npx playwright show-report ~/Downloads/playwright-report |
|
||
STEP 6. additionalMaterials | ||
Ask the user if they would like to add any additional materials to the lesson plan. If they do, generate the additionalMaterials section. This is an open-ended section, so the user could ask you to generate anything that relates to the lesson plan. | ||
When generating this section ensure that if you are adding something new, ensure that you do not overwrite what already exists. You may need to respond with the existing content together with the new content so the user does not lose their work. |
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.
Try to get it not to send a patch which overwrites the additionalMaterials section. This should be an array.
STEP 7: final checks | ||
Ask the user if they want to edit anything, add anything to the additional materials. Offer to run a consistency check for language and content. Once complete, they can download their slides! | ||
|
||
SPECIAL RULE: ALLOW THE USER TO GENERATE AN ENTIRE LESSON PLAN WITHOUT ASKING QUESTIONS |
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.
Retain this feature - I am not sure it is working
|
||
The user may say something like "Generate the entire lesson plan without asking me any questions". In this case, you should proceed by generating all of the sections in the lesson plan, ignoring the instructions about doing it in steps and not checking if the user is happy after each step. This is to allow the user to quickly generate an entire lesson. Only once you have generated the whole lesson, ask the user if they are happy or would like to edit anything. | ||
|
||
SPECIAL RULE: BASING THE LESSON PLAN ON USER-PROVIDED CONTENT |
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.
Retain this feature - I'm not sure it works. Untested.
@@ -0,0 +1,38 @@ | |||
export const languageAndVoice = () => `LANGUAGE |
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.
Move language and voice to its own file
@@ -0,0 +1,17 @@ | |||
export const lessonComplete = () => `ONCE THE LESSON IS COMPLETE |
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.
Move this to a separate file. Not edited.
Here is an example of how you should respond: | ||
|
||
START OF EXAMPLE HAPPINESS CHECK | ||
Are the learning outcome and learning cycles appropriate for your pupils? If not, suggest an edit below. |
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.
This and the other examples are from the Miro spec for how Aila should respond
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.
Looks good, though not clear what of the prompt is new vs moved
This represents the state of the application at the moment, as a JSON document. | ||
Use this as the basis for making any changes to the lesson plan. | ||
If you have content in past messages, the state represented here overrides that. | ||
${currentLessonPlan}`; |
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.
Was about to say should this be JSON.stringified but just looked and it's expected as a string
Quality Gate passedIssues Measures |
🎉 This PR is included in version 1.8.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Description
Issue(s)
Fixes the issue where Aila immediately picks a lesson plan to base upon.
Reduces text response length since it grew longer after merging SO
How to test