AK1239 commited on
Commit
3078283
·
1 Parent(s): b2a3132

feat: updated prompt with better instructions

Browse files
Files changed (1) hide show
  1. app/main.py +4 -5
app/main.py CHANGED
@@ -277,8 +277,8 @@ def generate_response_with_rag(prompt, index, embedding_model, documents, settin
277
  logger.info("-" * 50)
278
 
279
  style_instructions = {
280
- "simple": "Toa majibu rahisi na yanayoeleweka kwa urahisi, ukitumia maneno ya kawaida na sentensi fupi. Eleza dhana kama vile unazungumza na mwanafunzi mdogo.",
281
- "creative": "Toa majibu ya kubunifu na yanayovutia, ukitumia mifano halisi na michoro ili kufanya maudhui yawe ya kuvutia na kukumbukika zaidi.",
282
  "normal": ""
283
  }
284
 
@@ -289,10 +289,9 @@ def generate_response_with_rag(prompt, index, embedding_model, documents, settin
289
  Explain the topic of "{settings['topic']}" in detail following this structure:
290
  1. Summary: Briefly explain what the student will learn in this topic (5-6 sentences).
291
  2. Introduction to the topic: Provide background information about the topic before breaking it down into subtopics.
292
- 3. Subtopics: Explain each subtopic in detail, providing real-life examples where necessary.
293
  4. Activities: After each subtopic, provide small exercises or activities that the student can do to enhance understanding (Activities).
294
- 5. Image descriptions: Describe images that could help explain the topic in detail using text instead of actual images. Use this format: [Picture: Image description].
295
- 6. Practice questions: Provide 6-8 questions related to the topic to reinforce the student's understanding.
296
 
297
  **Respond to all questions and instructions in Swahili.**
298
 
 
277
  logger.info("-" * 50)
278
 
279
  style_instructions = {
280
+ "simple": "Provide clear and easy-to-understand answers using common words and short sentences. Explain concepts as if talking to a young student.",
281
+ "creative": "Give creative and engaging answers, using real-life examples and illustrations to make the content interesting and memorable.",
282
  "normal": ""
283
  }
284
 
 
289
  Explain the topic of "{settings['topic']}" in detail following this structure:
290
  1. Summary: Briefly explain what the student will learn in this topic (5-6 sentences).
291
  2. Introduction to the topic: Provide background information about the topic before breaking it down into subtopics.
292
+ 3. Subtopics: Explain each subtopic in detail, providing real-life examples where necessary. For each subtopic, Describe images that could help explain the topic in detail using text instead of actual images. Use this format: [Picture: Image description]. The total number of images should not exceed 3.
293
  4. Activities: After each subtopic, provide small exercises or activities that the student can do to enhance understanding (Activities).
294
+ 5. Practice questions: Provide 6-8 questions related to the topic to reinforce the student's understanding.
 
295
 
296
  **Respond to all questions and instructions in Swahili.**
297