NavyDevilDoc commited on
Commit
e9fa08c
·
verified ·
1 Parent(s): 6fa9fd5

Update src/core/QuizEngine.py

Browse files

updated the system input prompt

Files changed (1) hide show
  1. src/core/QuizEngine.py +35 -7
src/core/QuizEngine.py CHANGED
@@ -113,19 +113,47 @@ class QuizEngine:
113
 
114
  return None
115
 
116
- def construct_question_generation_prompt(self, context_text):
 
 
 
 
117
  return (
118
  f"Act as a Navy Board Examiner.\n"
119
  f"Here is a raw text excerpt from Navy documentation:\n"
120
  f"'''{context_text}'''\n\n"
121
  f"TASK: Generate a single question based on this text.\n\n"
122
- f"RULES:\n"
123
- f"1. If the text contains ANY facts (dates, definitions, locations, process steps, responsibilities), you MUST generate a question.\n"
124
- f"2. Do not judge the 'quality' of the fact. If the text says 'The NSWC is in Maryland', ask 'Where is the NSWC located?'.\n"
125
- f"3. Only output 'UNABLE' if the text is completely meaningless (e.g., a string of page numbers, a blank page, or garbled characters).\n\n"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
126
  f"OUTPUT FORMAT:\n"
127
- f"- If valid: Just the question text.\n"
128
- f"- If invalid: The word 'UNABLE'."
129
  )
130
 
131
  def construct_grading_prompt(self, question, answer, context_text):
 
113
 
114
  return None
115
 
116
+ def construct_question_generation_prompt(self, context_text):
117
+ """
118
+ REVISED PROMPT: Few-Shot Pattern Matching.
119
+ Includes specific examples to guide the model towards 'Board-Style' complexity.
120
+ """
121
  return (
122
  f"Act as a Navy Board Examiner.\n"
123
  f"Here is a raw text excerpt from Navy documentation:\n"
124
  f"'''{context_text}'''\n\n"
125
  f"TASK: Generate a single question based on this text.\n\n"
126
+
127
+ f"EXAMPLES OF DESIRED QUALITY:\n"
128
+ f"1. [Simple Fact] \n"
129
+ f" Text: 'The NSWC is in Maryland.'\n"
130
+ f" Good Question: 'Where are the Naval Surface Warfare Centers located?'\n"
131
+ f"2. [Process/Order]\n"
132
+ f" Text: 'There are five acquisition phases.'\n"
133
+ f" Good Question: 'What are the five acquisition phases?'\n"
134
+ f"3. [Scenario/Application]\n"
135
+ f" Text: 'A significant Nunn-McCurdy Unit Cost Breach is defined as cost growth of 15% over current baseline or 30% over original baseline.'\n"
136
+ f" Good Question: 'What conditions trigger a significant Nunn-McCurdy Unit Cost Breach?'\n\n"
137
+
138
+ f"EXAMPLES OF POOR QUALITY (AVOID THIS):\n"
139
+ f"1. [Lazy/Meta-Reference]\n"
140
+ f" Bad Question: 'What does the text say about the budget?'\n"
141
+ f" Critique: Do not reference 'the text'. Ask about the subject matter directly.\n"
142
+ f"2. [Yes/No or True/False]\n"
143
+ f" Bad Question: 'Is the budget cycle annual?'\n"
144
+ f" Critique: Too easy. Ask 'What is the duration of the budget cycle?' instead.\n"
145
+ f"3. [Administrative Trivia]\n"
146
+ f" Bad Question: 'What document number is listed in the header?'\n"
147
+ f" Critique: Irrelevant to professional qualification.\n\n"
148
+
149
+ f"STRICT RULES:\n"
150
+ f"1. You must base your question on a SPECIFIC SENTENCE in the text.\n"
151
+ f"2. Output the exact quote you used to form the question.\n"
152
+ f"3. If the text is meaningless or 'Intentionally Left Blank', output 'UNABLE'.\n\n"
153
+
154
  f"OUTPUT FORMAT:\n"
155
+ f"QUESTION: [Your Question]\n"
156
+ f"QUOTE: [The exact text snippet used]"
157
  )
158
 
159
  def construct_grading_prompt(self, question, answer, context_text):