Owen Wang commited on
Commit
1d76822
·
1 Parent(s): 83af9fd

better prompt

Browse files
Files changed (1) hide show
  1. app.py +7 -9
app.py CHANGED
@@ -128,13 +128,15 @@ def generate_application(metadata, interests):
128
  prompt = f"""
129
  You are now writing a description for the lesson titled \"{metadata['title']}\".
130
  This description comes after the title so you don't have to mention the title explicitly.
131
- Don't repeat the same sentence structures if you've used it for a previous lesson.
132
  Sound like you're naturally explaining the lesson in person.
133
  Describe the lesson and its outcome in one sentence objectively.
134
- Next, in one concise sentence, explore possible personal growth outcomes that combine their previously listed interests with this lesson.
135
- The sentence should implicitly help the student to feel inspired to connect with the lesson.
136
- It should not explicitly use the words \"{interests}\" and instead provide as an example one of the previously described ambitious projects that's relevant to this lesson.
 
137
  Don't repeat an example of a project if you've used it for a previous lesson.
 
138
  """
139
  response = query_openai(prompt)
140
  return response
@@ -180,11 +182,7 @@ if submit_button:
180
 
181
  status.empty()
182
  st.markdown(f"""
183
- \n\n## Your personalized learning playlist\n\n
184
- *Your student could work on the following projects:*\n\n
185
- {ideas}\n\n
186
- *The following lesson plan will help with those projects:*\n\n
187
- {lesson_text}
188
  """)
189
  else:
190
  status.text("The Wheel of Education spun out of control! Care to give it another whirl? Click 'Generate curriculum' again")
 
128
  prompt = f"""
129
  You are now writing a description for the lesson titled \"{metadata['title']}\".
130
  This description comes after the title so you don't have to mention the title explicitly.
131
+ Vary your sentence structures compared to previous lessons.
132
  Sound like you're naturally explaining the lesson in person.
133
  Describe the lesson and its outcome in one sentence objectively.
134
+ Next, in one concise sentence, explain what the student can now do after learning this lesson.
135
+ Use one of the previously described ambitious projects that's relevant to this lesson.
136
+ Explain the project in full, this is the first time you're talking to the student about it.
137
+ Don't put the project in quotes.
138
  Don't repeat an example of a project if you've used it for a previous lesson.
139
+ The sentence should implicitly help the student to feel inspired to connect with the lesson.
140
  """
141
  response = query_openai(prompt)
142
  return response
 
182
 
183
  status.empty()
184
  st.markdown(f"""
185
+ \n\n## Your personalized learning playlist\n\n{lesson_text}
 
 
 
 
186
  """)
187
  else:
188
  status.text("The Wheel of Education spun out of control! Care to give it another whirl? Click 'Generate curriculum' again")