search_field
Browse files- app/ui/prompts_tab.py +0 -2
- app/ui/test_set_tab.py +2 -4
- config/system_prompt_texts.py +6 -6
- main.py +1 -0
app/ui/prompts_tab.py
CHANGED
|
@@ -1,6 +1,4 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
from chains.learning_objectives_generator.runner import run_learning_objectives_generator
|
| 3 |
-
from config.llm_config import llms
|
| 4 |
|
| 5 |
def build_prompts_tab():
|
| 6 |
with gr.TabItem("ππ§οΈ See Prompts"):
|
|
|
|
| 1 |
import gradio as gr
|
|
|
|
|
|
|
| 2 |
|
| 3 |
def build_prompts_tab():
|
| 4 |
with gr.TabItem("ππ§οΈ See Prompts"):
|
app/ui/test_set_tab.py
CHANGED
|
@@ -1,6 +1,4 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
from chains.learning_objectives_generator.runner import run_learning_objectives_generator
|
| 3 |
-
from config.llm_config import llms
|
| 4 |
|
| 5 |
def build_test_set_tab():
|
| 6 |
with gr.TabItem("β Test Set"):
|
|
@@ -24,7 +22,7 @@ def build_test_set_tab():
|
|
| 24 |
with gr.Column(scale=2):
|
| 25 |
pass # only here to keep the first column in check: force narrower dropdown
|
| 26 |
|
| 27 |
-
|
| 28 |
|
| 29 |
with open("test_samples.md", "r", encoding="utf-8") as file:
|
| 30 |
markdown_content = file.read()
|
|
@@ -33,4 +31,4 @@ def build_test_set_tab():
|
|
| 33 |
|
| 34 |
|
| 35 |
# Return references
|
| 36 |
-
return (subset_choice, )
|
|
|
|
| 1 |
import gradio as gr
|
|
|
|
|
|
|
| 2 |
|
| 3 |
def build_test_set_tab():
|
| 4 |
with gr.TabItem("β Test Set"):
|
|
|
|
| 22 |
with gr.Column(scale=2):
|
| 23 |
pass # only here to keep the first column in check: force narrower dropdown
|
| 24 |
|
| 25 |
+
search_field = gr.Textbox(label="Text Search π§", placeholder="Dummy placeholder element, doesn't work")
|
| 26 |
|
| 27 |
with open("test_samples.md", "r", encoding="utf-8") as file:
|
| 28 |
markdown_content = file.read()
|
|
|
|
| 31 |
|
| 32 |
|
| 33 |
# Return references
|
| 34 |
+
return (subset_choice, search_field, )
|
config/system_prompt_texts.py
CHANGED
|
@@ -179,13 +179,13 @@ Do some reasoning first, and give your diagnosis then.
|
|
| 179 |
|
| 180 |
template_diagnose_distractor_clearly_wrong_text = """
|
| 181 |
<task_definition>
|
| 182 |
-
You assess multiple-choice exercise distractors (incorrect answer options) to identify any that are completely ineffective due to being too obviously wrong.
|
| 183 |
</task_definition>
|
| 184 |
|
| 185 |
<key_concepts>
|
| 186 |
<effectiveness_criterion>
|
| 187 |
A distractor is considered effective if it sounds plausible to at least some students. It's acceptable if most students would dismiss it, as long as not all of them would.
|
| 188 |
-
The given exercise is
|
| 189 |
</effectiveness_criterion>
|
| 190 |
|
| 191 |
<failure_threshold>
|
|
@@ -198,16 +198,16 @@ template_diagnose_distractor_clearly_wrong_text = """
|
|
| 198 |
</key_concepts>
|
| 199 |
|
| 200 |
<analysis_guidance>
|
| 201 |
-
Your analysis should engage deeply with understanding the student perspective. Really try to vividly imagine
|
| 202 |
|
| 203 |
-
Explore multiple angles in your reasoning. Consider edge cases, alternative interpretations, and different ways different students might approach the exercise. Document your thought process thoroughly, showing the nuance in your considerations.
|
| 204 |
</analysis_guidance>
|
| 205 |
|
| 206 |
<output_requirements>
|
| 207 |
-
1. Focus solely on diagnosing the issue for the distractors
|
| 208 |
2. Show detailed reasoning throughout your analysis
|
| 209 |
3. Maintain nuance and depth in your exploration
|
| 210 |
-
4. Finally (and only then, in your very last sentence) conclude with a clear,
|
| 211 |
</output_requirements>
|
| 212 |
"""
|
| 213 |
|
|
|
|
| 179 |
|
| 180 |
template_diagnose_distractor_clearly_wrong_text = """
|
| 181 |
<task_definition>
|
| 182 |
+
You assess multiple-choice exercise distractors (incorrect answer options) of a given exercise, to identify any distractors that are completely ineffective due to being too obviously wrong. Your final goal is to state your assessment of whether the exercise as a whole is acceptable or not.
|
| 183 |
</task_definition>
|
| 184 |
|
| 185 |
<key_concepts>
|
| 186 |
<effectiveness_criterion>
|
| 187 |
A distractor is considered effective if it sounds plausible to at least some students. It's acceptable if most students would dismiss it, as long as not all of them would.
|
| 188 |
+
The given exercise is acceptable only if ALL of its distractors are considered effective.
|
| 189 |
</effectiveness_criterion>
|
| 190 |
|
| 191 |
<failure_threshold>
|
|
|
|
| 198 |
</key_concepts>
|
| 199 |
|
| 200 |
<analysis_guidance>
|
| 201 |
+
Your analysis should engage deeply with understanding the student perspective in the context of this particular exercise. Really try to vividly imagine the hypothetical Dumb Student, in line with the test's likely target demographic. They are bottom of their class. What would be their likely interpretations, their thought patterns? Really inhabit this perspective as you carefully examine each distractor one by one.
|
| 202 |
|
| 203 |
+
Explore multiple angles in your reasoning. Consider edge cases, alternative interpretations, and different ways different students might approach the exercise. Take the exact phrasing of the exercise seriously. Document your thought process thoroughly, showing the nuance in your considerations.
|
| 204 |
</analysis_guidance>
|
| 205 |
|
| 206 |
<output_requirements>
|
| 207 |
+
1. Focus solely on diagnosing the issue for the given distractors (no need to suggest improvements)
|
| 208 |
2. Show detailed reasoning throughout your analysis
|
| 209 |
3. Maintain nuance and depth in your exploration
|
| 210 |
+
4. Finally (and only then, in your very last sentence) conclude with a clear, binary verdict about your diagnosis
|
| 211 |
</output_requirements>
|
| 212 |
"""
|
| 213 |
|
main.py
CHANGED
|
@@ -92,6 +92,7 @@ with gr.Blocks() as interface:
|
|
| 92 |
|
| 93 |
# Build unfinished tab
|
| 94 |
(subset_choice,
|
|
|
|
| 95 |
) = build_test_set_tab()
|
| 96 |
|
| 97 |
# -------------------------------
|
|
|
|
| 92 |
|
| 93 |
# Build unfinished tab
|
| 94 |
(subset_choice,
|
| 95 |
+
search_field,
|
| 96 |
) = build_test_set_tab()
|
| 97 |
|
| 98 |
# -------------------------------
|