NavyDevilDoc commited on
Commit
50e3883
·
verified ·
1 Parent(s): ff72774

Update src/core/QuizEngine.py

Browse files
Files changed (1) hide show
  1. src/core/QuizEngine.py +18 -22
src/core/QuizEngine.py CHANGED
@@ -85,28 +85,24 @@ class QuizEngine:
85
  return None
86
 
87
  def construct_question_generation_prompt(self, context_text):
88
- """
89
- REVISED PROMPT: Focuses on Professional Knowledge.
90
- """
91
- return (
92
- f"Act as a US Navy Engineering Duty Officer Board Examiner.\n"
93
- f"Review the following source text for suitability:\n"
94
- f"'''{context_text}'''\n\n"
95
- f"EVALUATION CRITERIA:\n"
96
- f"You are looking for **Examinable Professional Knowledge** in ANY of these domains:\n"
97
- f"- Technical Engineering (HM&E, Combat Systems)\n"
98
- f"- Program Management & Acquisition (Milestones, Contracts)\n"
99
- f"- Financial Management (PPBE, Funding Types)\n"
100
- f"- Maintenance & Modernization (Availabilities, Shipyards)\n"
101
- f"- Statutory & Regulatory Responsibilities (Goldwater-Nichols, Title 10)\n\n"
102
- f"SKIP LOGIC:\n"
103
- f"- Output 'SKIP' ONLY if the text is structural noise (e.g., Table of Contents, Page Headers, purely formatting instructions).\n"
104
- f"- Do NOT skip lists, definitions, or procedural descriptions.\n\n"
105
- f"TASK:\n"
106
- f"If the text contains ANY examinable material, generate a difficult, scenario-based question.\n"
107
- f"Do not ask 'What does the text say?'. Ask 'How would you apply this regulation...' or 'What are the implications of...'\n"
108
- f"OUTPUT: Just the question text."
109
- )
110
 
111
  def construct_grading_prompt(self, question, answer, context_text):
112
  return (
 
85
  return None
86
 
87
  def construct_question_generation_prompt(self, context_text):
88
+ """
89
+ REVISED PROMPT: 'Action-Based' Generation.
90
+ Forces the model to generate a question for ANY valid information,
91
+ lowering the bar for what constitutes 'examinable'.
92
+ """
93
+ return (
94
+ f"Act as a Navy Board Examiner.\n"
95
+ f"Here is a raw text excerpt from Navy documentation:\n"
96
+ f"'''{context_text}'''\n\n"
97
+ f"TASK: Generate a single question based on this text.\n\n"
98
+ f"RULES:\n"
99
+ f"1. If the text contains ANY facts (dates, definitions, locations, process steps, responsibilities), you MUST generate a question.\n"
100
+ 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"
101
+ 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"
102
+ f"OUTPUT FORMAT:\n"
103
+ f"- If valid: Just the question text.\n"
104
+ f"- If invalid: The word 'UNABLE'."
105
+ )
 
 
 
 
106
 
107
  def construct_grading_prompt(self, question, answer, context_text):
108
  return (