Download evaluation/prompts.py from chowderai/bool-bench: direct link, hf CLI and curl.
- Browser
- Download file 1.16 kB
-
https://huggingface.co/datasets/chowderai/bool-bench/resolve/main/evaluation/prompts.py
- Command line
-
hf download hf://datasets/chowderai/bool-bench/evaluation/prompts.py
-
curl -L -o prompts.py https://huggingface.co/datasets/chowderai/bool-bench/resolve/main/evaluation/prompts.py
1.16 kB
| """Render the recorded Bool-Bench `bench` user-message template. | |
| No model calls, credentials, or model-specific chat formatting are included. | |
| """ | |
| BENCH_INSTRUCTIONS = {'question': 'Read the passage. Answer the question using only the passage: true (yes), false (no), or unknown if the passage does not contain enough information to decide. Do not use outside knowledge, even if you know the answer.', 'statement': 'Read the passage. Using only the passage, is the statement true, false, or unknown (the passage neither supports nor contradicts it)? Do not use outside knowledge.'} | |
| CLAIM_HEADING = {'question': '## Question:', 'statement': '## Statement:'} | |
| ANSWER_FORMAT = 'Answer with exactly one word - true, false, or unknown.' | |
| def format_prompt(row): | |
| """Preserve the complete passage and claim, including supplied ShARC context.""" | |
| form = row["form"] | |
| if form not in BENCH_INSTRUCTIONS: | |
| raise ValueError("form must be 'question' or 'statement'") | |
| return ( | |
| f"{BENCH_INSTRUCTIONS[form]}\n\n" | |
| f"## Passage:\n{row['passage']}\n\n" | |
| f"{CLAIM_HEADING[form]}\n{row['question']}\n\n" | |
| f"{ANSWER_FORMAT}\n" | |
| ) | |