Spaces:
Sleeping
Sleeping
Update src/core/QuizEngine.py
Browse filesrevised prompt for question asking
- src/core/QuizEngine.py +24 -15
src/core/QuizEngine.py
CHANGED
|
@@ -83,21 +83,30 @@ class QuizEngine:
|
|
| 83 |
return None
|
| 84 |
|
| 85 |
def construct_question_generation_prompt(self, context_text):
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 101 |
|
| 102 |
def construct_grading_prompt(self, question, answer, context_text):
|
| 103 |
"""Grades the deep dive answer."""
|
|
|
|
| 83 |
return None
|
| 84 |
|
| 85 |
def construct_question_generation_prompt(self, context_text):
|
| 86 |
+
"""
|
| 87 |
+
REVISED DEFENSE 2:
|
| 88 |
+
Broadens 'valid' topics to include Budgeting/Acquisition while keeping
|
| 89 |
+
the filter for true noise (formatting/headers).
|
| 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 (Hull, Mechanical, Electrical, Combat Systems)\n"
|
| 98 |
+
f"- Program Management & Acquisition (Milestones, Contracts)\n"
|
| 99 |
+
f"- Financial Management (PPBE, Funding Types, Colors of Money)\n"
|
| 100 |
+
f"- Maintenance & Modernization (Availabilities, Shipyards)\n"
|
| 101 |
+
f"- Statutory & Regulatory Responsibilities\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, List of Effective Pages, blank pages, or purely formatting instructions).\n"
|
| 104 |
+
f"- Do NOT skip procedural descriptions (e.g., 'Step 1 of the Budget Process')—those are valid questions.\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 |
"""Grades the deep dive answer."""
|