Update prompts.py
Browse files- prompts.py +6 -14
prompts.py
CHANGED
|
@@ -2,24 +2,16 @@
|
|
| 2 |
# All LLM prompt templates live here — easy to tune without touching logic.
|
| 3 |
|
| 4 |
def evaluate_doc_prompt(question: str, doc: str) -> str:
|
| 5 |
-
return f"""
|
| 6 |
-
You are a precision document classifier. Evaluate if the provided Document contains sufficient factual evidence to answer the Question.
|
| 7 |
|
| 8 |
-
### Scoring Rubric
|
| 9 |
-
1. DIRECT: The document provides specific facts, roles, or actions that answer the core of the question.
|
| 10 |
-
2. PARTIAL: The document mentions the subject but only in passing or provides non-specific context.
|
| 11 |
-
3. IRRELEVANT: The document is about someone else or a different topic.
|
| 12 |
-
|
| 13 |
-
### Evaluation Steps
|
| 14 |
-
- Identify the primary subject of the question.
|
| 15 |
-
- Check if the document attributes specific historical actions or titles to this subject.
|
| 16 |
-
- If the document provides enough info to form a basic identity (e.g., "He was a [Role] who did [Action]"), it is CORRECT.
|
| 17 |
-
|
| 18 |
-
### Input Data
|
| 19 |
Question: {question}
|
| 20 |
Document: {doc}
|
| 21 |
|
| 22 |
-
###
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
Label: [CORRECT, AMBIGUOUS, or INCORRECT]"""
|
| 24 |
|
| 25 |
|
|
|
|
| 2 |
# All LLM prompt templates live here — easy to tune without touching logic.
|
| 3 |
|
| 4 |
def evaluate_doc_prompt(question: str, doc: str) -> str:
|
| 5 |
+
return f"""You are a document classifier. Respond only with the label line, nothing else.
|
|
|
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
Question: {question}
|
| 8 |
Document: {doc}
|
| 9 |
|
| 10 |
+
### Scoring Rules
|
| 11 |
+
- CORRECT: Document contains specific facts that directly answer the question.
|
| 12 |
+
- AMBIGUOUS: Document mentions the subject but only vaguely or partially.
|
| 13 |
+
- INCORRECT: Document is about a different topic or person entirely.
|
| 14 |
+
|
| 15 |
Label: [CORRECT, AMBIGUOUS, or INCORRECT]"""
|
| 16 |
|
| 17 |
|