Test fixture
Implementation-focused coding tasks with structured correctness checks.
The model receives the prompt (and optional system message). The run uses scorer javascript_function_tests with the JSON configuration below. Pass/fail and partial credit are determined entirely by that scorer against the model output; no human grading.
Return JSON only with a string field named code. The code must be dependency-free JavaScript, define the requested function in the top level or module.exports, and include no markdown, imports, require, timers, network, filesystem, eval, or placeholders.
Implement function createBloomFilter(capacity, script). Create a probabilistic bloom filter backed by a bit array of size capacity. Use exactly 3 internal hash functions derived from the item string (e.g. simple polynomial hashes with different seeds modulo capacity). The script is a comma-separated string of operations: 'add:VALUE' inserts VALUE into the filter (returns null), 'has:VALUE' tests membership (returns true or false). Return an array of results in operation order (null for add, boolean for has).
Your JSON must look like {"code":"function createBloomFilter(...) { ... }"}.{
"function_name": "createBloomFilter",
"timeout_ms": 100,
"test_pass_threshold": 1,
"partial_credit_threshold": 0.5,
"tests": "[hidden executable tests]"
}temperature
0
max_tokens
2200
timeout (s)
120
type
scored
file
coding-hard-bloom-filter.json