This code is being released solely for academic and scientific reproducibility purposes, in support of the methods and findings described in the associated publication. Pull requests are not being accepted in order to maintain the code exactly as it was used in the paper.
NDCB is a benchmark of 697 matched-pair scenarios across six decision domains. Each scenario presents two candidates with identical qualifications who differ only in demographics, and asks about them twice:
- descriptively — "who is likely to ...?"
- normatively — "who should ...?"
A model that is behaving well may well differentiate when asked to predict a biased world, but should treat identical candidates equally when asked to decide. The benchmark measures the gap between those two behaviours.
NER = equal-treatment rate on normative prompts ("who should ...")
NLR = equal-treatment rate on descriptive prompts ("who is likely ...")
NDS = NER − NLR ∈ [−1, +1]
NDS (Normative–Descriptive Separation) is the headline number. Positive
means the model separates the two framings; negative means normative reasoning
has collapsed into the prediction task, or vice versa. NDCB is the benchmark;
NDS is the metric — the paper never defines a quantity called "NDCB".
Current scores: docs/leaderboard.md.
NDCB targets a recent, stable CPython. The install below is validated on
Python 3.13; the package supports anything from 3.10 up (requires-python = ">=3.10"). Work inside an isolated environment so the install never touches
your system Python.
conda:
conda create -n ndcb python=3.13
conda activate ndcbvenv (uses a Python 3.13 already on your PATH):
python3.13 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
python -m pip install --upgrade pipInstall the package (below) into the activated environment.
pip install "ndcb @ git+https://github.com/amazon-science/ndcb" # metric + harness
pip install "ndcb[bedrock] @ git+https://github.com/amazon-science/ndcb" # + Amazon Bedrock backend used in the paperFrom a clone:
git clone https://github.com/amazon-science/ndcb && cd ndcb
pip install -e '.[bedrock,dev]'For evaluation only. Do not use this data to train AI models. The scenarios are synthetic, generated by Claude Sonnet 4.5. See data/README.md for how they were made and their permitted use.
Two files make up the benchmark: ndcb_scenarios.jsonl (697 scenarios) and
prompts.jsonl (1,394 pre-rendered evaluation prompts). If you cloned the
repository you already have them in data/ and nothing else is needed.
After a pip install, fetch them with:
ndcb download # from this repository on GitHub
ndcb download --from-dir /path/to/clone/data # or copy from a local checkout
ndcb download --check # verify checksums
ndcb info # show what was foundDownloads are checksum-verified against the released files; a mismatch fails loudly rather than silently changing your score.
Every command that calls a model takes --protocol. The two protocols share
the prompts, the three runs per scenario per framing, the judge rubric, the
judge's 400-token limit and the scorer. They differ in how the model under
test is called and in the judge:
--protocol |
Generation settings | Judge | Use it to |
|---|---|---|---|
paper |
500 tokens, temperature 0, thinking off (GPT-5.5: 3,000 tokens) | Claude Opus 4.8 | run models with the paper's settings |
latest (default) |
2,000 tokens, temperature 0, thinking off, for every model | Claude Fable 5.2 | evaluate new models |
In the paper, every model ran at 500 tokens and temperature 0 with thinking
off, except GPT-5.5. Its hidden reasoning counts against its output limit, so
it got 3,000 tokens, at its default temperature since it rejects one.
--protocol paper applies the same settings:
| Model | Token limit | Temperature |
|---|---|---|
| GPT-5.5 | 3,000 | API default |
| Claude Opus 4.6, Claude Sonnet 4.6, GPT-OSS 120B, Mistral Large 3, Qwen3-32B, and any other model | 500 | 0 |
latest uses 2,000 tokens for every model because 500 truncates recent
reasoning models: Claude Opus 5.5 hit the limit on 68% of pilot calls at 500,
and on none of 4,182 calls at 2,000.
Pass the same --protocol to ndcb run and ndcb judge. --max-tokens and
--judge-model (and --temperature, --no-temperature, --extra-body)
still override a protocol's settings, but the score is then
labelled custom. Every scorecard records the protocol that produced it, and
the leaderboard shows it. Compare scores only within one protocol.
To run a model with the paper's settings:
ndcb run --protocol paper --model us.anthropic.claude-opus-4-6-v1 --out runs/opus46-paper
ndcb judge --protocol paper --out runs/opus46-paper
ndcb score --out runs/opus46-paper --model "Claude Opus 4.6"This package's scorer, run on the paper's stored model outputs, reproduces
the published numbers exactly. Those outputs aren't released, but the
resulting scorecards are in results/paper/ (see
Reproducing the paper). A new run with
--protocol paper uses the same settings but generates new responses, so its
scores can differ from the paper's by run-to-run variation and by provider-side
model updates.
Settings common to both protocols:
- Generations: three runs per scenario per framing, all six domains, and the released prompts unchanged.
- Rejected temperature: the client removes temperature and retries at
API defaults only if the provider rejects it. This is the paper's
documented exception.
--no-temperaturecan skip that rejection for a model already known to require it. - Other generation parameters: leave reasoning effort and thinking at
each model's API defaults; do not add
--extra-bodyoverrides. - Judge: API-default sampling and 400 tokens, applied by
ndcb judge. - Scoring: the default scenario-level majority vote and bootstrap (10,000 iterations, seed 42), averaged equally over the six domains.
A new evaluation with the latest protocol:
export AWS_PROFILE=your-profile # or any standard AWS credential source
export AWS_REGION=your-region # a region where your account has Bedrock
# access to both the model and the judge
ndcb run --api bedrock --model us.anthropic.claude-opus-4-6-v1 \
--out runs/opus46-bedrock-t2000-judge-fable52 \
--runs 3 --temperature 0 --max-tokens 2000
ndcb judge --api bedrock --judge-model us.anthropic.claude-fable-5-2 \
--out runs/opus46-bedrock-t2000-judge-fable52
ndcb score --out runs/opus46-bedrock-t2000-judge-fable52 \
--model "Claude Opus 4.6 (Bedrock, max_tokens=2000, judge=Fable 5.2)" \
--model-id us.anthropic.claude-opus-4-6-v1 \
--json results/submissions/opus46-bedrock-t2000-judge-fable52.json
ndcb leaderboardRegion. Use your own AWS region. Bedrock grants model access per account
and per region, so no region is built in. The region comes from --region,
then $AWS_REGION / $AWS_DEFAULT_REGION, then your AWS profile, and the
command stops with an error if none is set. The model under test and the judge
can be in different regions: pass --region separately to ndcb run and
ndcb judge. Cross-region inference profile IDs such as
us.anthropic.claude-fable-5-2 require a supported source region and account
access; the geography prefix alone does not establish availability. Check the
model's regional availability in the AWS documentation. If the first call is
refused, the command stops before making the rest.
Both run and judge are resumable: records are appended and keyed by
(scenario_id, framing, run), so an interrupted sweep continues where it
stopped instead of re-billing completed calls.
This walkthrough uses a named AWS profile on an Ubuntu desktop or server.
It applies to text-generation models supported by Bedrock's Converse API,
including Claude and OpenAI models such as GPT-6 Astra. Choose a model
configuration below, then use the same generation, judging, and scoring
commands. Check the model's API support in the
Bedrock model catalog;
availability through another Bedrock API alone is not enough for this backend.
Start in a copy of this repository, with README.md, pyproject.toml, and
data/ present. Run the commands below in the same Bash shell.
1. Install the local tools and NDCB.
Use Python 3.10 or newer. If you already created an environment under Install, activate it and skip creating another one.
sudo apt-get update
sudo apt-get install -y python3 python3-venv python3-pip curl unzip less
cd /path/to/NDCB
python3 --version # must be 3.10 or newer
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e '.[bedrock]'
ndcb download --check
ndcb info # expect 697 scenarios and 1,394 promptsCheck aws --version: the SSO commands below require AWS CLI v2.22.0 or
newer. The official AWS instructions
cover installation and updates. For a new installation on either x86-64 or
ARM Ubuntu, use:
ndcb_aws_installer="$(mktemp)"
curl -fsSL https://awscli.amazonaws.com/v2/install.sh -o "$ndcb_aws_installer"
bash "$ndcb_aws_installer"
export PATH="$HOME/.local/bin:$PATH"
aws --version2. Authenticate and check model access.
Choose one authentication method. If your account uses
IAM Identity Center / SSO,
configure a profile named ndcb with your organization's SSO start URL and
SSO region, then select the AWS account and role:
aws configure sso --profile ndcb --use-device-code
aws sso login --profile ndcb --use-device-codeFollow the printed sign-in instructions in a browser; device authorization also works when the browser is on a different computer. The SSO region is where your organization configured Identity Center and can differ from the Bedrock region.
If you use IAM access keys instead, configure the same profile interactively:
aws configure --profile ndcbEnter your access key ID, secret access key, default region, and output format.
Temporary credentials also need their aws_session_token in the profile.
If you already have a working profile, use its name below.
export AWS_PROFILE=ndcb
export AWS_REGION=us-east-1
aws sts get-caller-identity --profile "$AWS_PROFILE" --region "$AWS_REGION"Confirm that the returned account and identity are the ones you intend to use. This checks authentication; the smoke test below checks actual model invocation. Your account must have access to both your chosen model and the judge (Claude Fable 5.2 in this walkthrough). In the Bedrock console, check each model in Model catalog and complete any account access or Marketplace activation requirements. An administrator can complete the initial activation if your evaluation identity cannot subscribe. See AWS model access.
Fable data retention prerequisite. The
Fable 5.2 model card
requires aws_review data retention for standard access. This is an account
setting in the AWS Region where you invoke the judge. Fable inputs and outputs
are retained within AWS for up to 30 days and may be reviewed by AWS. See
Bedrock data retention
for scope and access exceptions.
With a current AWS CLI v2, check the account setting:
aws bedrock get-account-data-retention \
--profile "$AWS_PROFILE" --region "$AWS_REGION"If it is already aws_review or legacy provider_data_share, this prerequisite
is satisfied. Otherwise, an account administrator can enable it with the
account data retention command:
aws bedrock put-account-data-retention --mode aws_review \
--profile "$AWS_PROFILE" --region "$AWS_REGION"The read and write operations require bedrock:GetAccountDataRetention and
bedrock:PutAccountDataRetention, respectively. If the commands are unavailable,
update AWS CLI v2 using the installation instructions above. If the judge runs
in a different source region, configure that region instead.
The IAM user or role running NDCB needs bedrock:InvokeModel permission for
the selected models. When using inference profiles, include the profiles and
their underlying foundation models in every destination region. Organization
policies must also allow that routing.
See inference profile permissions.
The examples below call Bedrock's Converse API from us-east-1. Set the
default judge and generation token budget:
export NDCB_JUDGE_ID=us.anthropic.claude-fable-5-2
export NDCB_JUDGE_TAG=fable52
export NDCB_MAX_TOKENS=2000Choose one model configuration:
Claude Opus 5.5:
export NDCB_MODEL_ID=us.anthropic.claude-opus-5-5
export NDCB_MODEL_LABEL="Claude Opus 5.5 (Bedrock)"
export NDCB_RUN_NAME=opus55-bedrockOpenAI GPT-6 Astra:
export NDCB_MODEL_ID=us.openai.gpt-6-astra
export NDCB_MODEL_LABEL="GPT-6 Astra (Bedrock)"
export NDCB_RUN_NAME=gpt6-astra-bedrockFor another model, set its Bedrock model or inference profile ID, a display
label, and a unique run name in the same variables. Keep the generation
settings fixed and omit --extra-body. Both examples use --api bedrock
and AWS credentials, including when the model provider is OpenAI.
For another source region, check the supported profiles on the AWS model
pages for Opus 5.5,
GPT-6 Astra,
and the Fable 5.2 judge.
Set the region and IDs together. You can pass a separate --region to
ndcb judge if the judge must run elsewhere.
Settings. Both generation commands request temperature 0 and a 2,000-token limit. The client applies the temperature-rejection fallback described above on every backend. Opus 5.5 rejects temperature and always uses adaptive thinking; see its migration guide. For reasoning models, the 2,000-token budget can include thinking and answer text, so truncation or empty responses can still occur. Report those outcomes alongside the score. Any further budget change or effort override is a separate experiment; record its settings and use a fresh output directory. The Fable 5.2 judge also uses adaptive thinking, at its default high effort. Its 400-token budget can include reasoning; inspect missing or unparseable judge outputs in the smoke test before running the full benchmark.
3. Test generation and judging on one scenario.
Use a separate directory for this test. With one hiring scenario, both framings, and one repetition, it makes 2 generation calls and 2 judge calls, excluding retries. These are paid API calls.
NDCB_SMOKE_OUT="runs/${NDCB_RUN_NAME}-smoke-t${NDCB_MAX_TOKENS}-judge-${NDCB_JUDGE_TAG}"
ndcb run --api bedrock --model "$NDCB_MODEL_ID" \
--out "$NDCB_SMOKE_OUT" --domains hiring --limit 1 --runs 1 --workers 1 \
--temperature 0 --max-tokens "$NDCB_MAX_TOKENS"
ndcb judge --api bedrock --judge-model "$NDCB_JUDGE_ID" \
--out "$NDCB_SMOKE_OUT" --domains hiring --workers 1Inspect the saved results. This check counts successful records once even if you resumed after a failed attempt:
python - "$NDCB_SMOKE_OUT" <<'PY'
import sys
from collections import Counter
from pathlib import Path
from ndcb.metrics import parse_direction
from ndcb.run import latest_ok, read_jsonl
out = Path(sys.argv[1])
def records(suffix):
return [r for p in out.glob(f"*_{suffix}.jsonl")
for r in latest_ok(read_jsonl(p))]
generations = records("results")
judgments = records("bias_eval")
attempts = [r for p in out.glob("*_results.jsonl") for r in read_jsonl(p)]
print("Generation attempt outcomes (including retries):", Counter(r.get("ok", True) for r in attempts))
print("Attempt stop reasons (including failures):", Counter(r.get("stop_reason") for r in attempts))
print("Successful generations:", len(generations))
print("Generation stop reasons:", Counter(r.get("stop_reason") for r in generations))
print("Successful judgments:", len(judgments))
print("Judge directions:", Counter(parse_direction(r["judge_response"]) for r in judgments))
PYIf both generations produce text, expect 2 successful generations and
2 successful judgments. Inspect the responses in hiring_*_results.jsonl,
generation failures, max_tokens stop reasons, and unknown judge directions.
Nonempty truncated responses are judged as returned; empty responses are
recorded as failures and are not judged. The one-scenario test checks
connectivity and output handling. To expand it, drop --domains hiring from
both commands and increase --limit on ndcb run; the expected counts
will increase accordingly.
If access is denied, check the named profile, model access, source region, and inference profile permissions for the failing model. Resolve access errors before starting the full evaluation. If the 2,000-token budget is exhausted, report the truncation or missing answers. Persistent empty outputs may prevent a complete evaluation under these settings; do not keep resampling just to obtain nonempty answers.
4. Run the full benchmark, judge, and score.
Use a fresh full-run directory with the same 2,000-token settings as the smoke
test. Repeat the workflow for the other model by choosing its configuration
above. The t2000-judge-fable52 directories keep these runs separate from
evaluations with other token budgets or judges. If that directory already
contains a run with different settings, choose a new NDCB_RUN_NAME first.
NDCB_OUT="runs/${NDCB_RUN_NAME}-t${NDCB_MAX_TOKENS}-judge-${NDCB_JUDGE_TAG}"
ndcb run --api bedrock --model "$NDCB_MODEL_ID" \
--out "$NDCB_OUT" --runs 3 --workers 4 \
--temperature 0 --max-tokens "$NDCB_MAX_TOKENS"This attempts 4,182 generations. Judging makes one call per successful,
nonempty response, up to 4,182 judge calls, excluding retries and the
smoke test. Concurrency is set to four; reduce --workers if requests are
throttled. Before judging, repeat the
inspection block above with "$NDCB_OUT" in place of "$NDCB_SMOKE_OUT".
Check against 4,182 expected generations and report failures and truncation
alongside the score. There will be zero judgments until you run the next step.
ndcb judge --api bedrock --judge-model "$NDCB_JUDGE_ID" \
--out "$NDCB_OUT" --workers 4
ndcb score --out "$NDCB_OUT" \
--model "${NDCB_MODEL_LABEL}, max_tokens=${NDCB_MAX_TOKENS}, judge=${NDCB_JUDGE_ID}" \
--model-id "$NDCB_MODEL_ID" \
--json "results/submissions/${NDCB_RUN_NAME}-t${NDCB_MAX_TOKENS}-judge-${NDCB_JUDGE_TAG}.json"Check that scoring reports all six domains, 697 scenarios, and three runs
per scenario per framing. Investigate a PARTIAL RUN: recover transient
failures using the same settings, and report any persistent missing responses
as incomplete. The scorecard's completeness.paper_comparable field checks
coverage and judge-output validity; it does not verify that the token
budget, effort, or judge identity matches the paper, or check truncation.
Keep the exact command settings and AWS region with your result. To include
the scorecard in your local leaderboard, run ndcb leaderboard from the
repository root.
Resuming and changing settings. For an interruption or failed calls,
rerun the same run or judge command with the same settings and output
directory. Successful records are reused and failed calls are retried.
For an expired SSO session, log in again first:
aws sso login --profile "$AWS_PROFILE" --use-device-codeUse a new output directory and scorecard filename whenever you change the
model, token budget, temperature, effort, or judge. Resume keys do not include
those settings. When changing NDCB_JUDGE_ID, change NDCB_JUDGE_TAG too.
In particular, a nonempty response cut off at max_tokens
is still stored as successful, so increasing the budget in the same directory will
skip it. A fresh run also ensures that judgments correspond to the newly
generated responses.
The batch script runs generation → Fable judging → scoring for each model, in the order below. GPT-OSS, Mistral, and Qwen use the paper's model variants; GPT-6 Astra is included as an additional evaluation:
| Model | Bedrock Converse model ID |
|---|---|
| GPT-OSS 120B | openai.gpt-oss-120b-1:0 |
| Mistral Large 3 | mistral.mistral-large-3-675b-instruct |
| Qwen3-32B | qwen.qwen3-32b-v1:0 |
| GPT-6 Astra | us.openai.gpt-6-astra |
Use your activated NDCB environment and the AWS credentials configured above. The settings are 2,000 generation tokens, temperature 0 with rejection fallback, all six domains, both framings, three repetitions, and four workers. Judging uses Fable 5.2 on Bedrock with the existing 400-token limit.
export AWS_REGION=us-east-1 # choose a region with access to the models and Fable
bash scripts/evaluate_bedrock_models.sh --dry-run # optional: preview only
bash scripts/evaluate_bedrock_models.shEach model gets runs/<model>-bedrock-t2000-judge-fable52/, containing the
response files and generation.log, judge.log, and score.log. Scorecards
are written to results/submissions/<model>-bedrock-t2000-judge-fable52.json.
The script prints the scores and final scorecard paths. It makes one generation
pass and one judging pass per model; isolated failed calls remain recorded,
and scoring continues with a PARTIAL RUN notice when applicable.
Command-level errors, such as denied model access, stop the batch.
Rerun the same script to resume interrupted work; successful records are
reused and failed calls are retried. Set NDCB_WORKERS=2 to reduce concurrency,
NDCB_JUDGE_REGION to use another region for Fable, or
NDCB_RUN_SUFFIX=replicate-2 for fresh output names. Use a fresh suffix if you
change experimental settings. The generation limit and judge differ from
the paper, as described above.
Direct generation uses the same 2,000 tokens, temperature 0 with rejection
fallback, and three repetitions as Bedrock. The examples below use the
same Fable 5.2 Bedrock judge, so configure AWS credentials, a region, and
the Fable data retention prerequisite above.
Select the generation backend independently with --api:
--api |
Talks to | Key variable | Base-URL variable |
|---|---|---|---|
bedrock (default) |
Amazon Bedrock converse |
AWS credentials (--profile, --region) |
— |
openai |
any OpenAI /chat/completions endpoint |
OPENAI_API_KEY |
OPENAI_BASE_URL |
anthropic |
Anthropic Messages API | ANTHROPIC_API_KEY |
ANTHROPIC_BASE_URL |
Use an OpenAI key for generation and your AWS credentials for judging:
export OPENAI_API_KEY=sk-...
ndcb run --api openai --model gpt-5.5 \
--out runs/gpt-5.5-openai-t2000-judge-fable52 \
--runs 3 --temperature 0 --max-tokens 2000
ndcb judge --api bedrock --judge-model us.anthropic.claude-fable-5-2 \
--out runs/gpt-5.5-openai-t2000-judge-fable52
ndcb score --out runs/gpt-5.5-openai-t2000-judge-fable52 \
--model "GPT-5.5 (OpenAI API, max_tokens=2000, judge=Fable 5.2 on Bedrock)" \
--model-id gpt-5.5 \
--json results/submissions/gpt-5.5-openai-t2000-judge-fable52.json
ndcb leaderboardUse an Anthropic key for generation and your AWS credentials for judging:
export ANTHROPIC_API_KEY=sk-ant-...
ndcb run --api anthropic --model claude-opus-5-5 \
--out runs/opus55-anthropic-t2000-judge-fable52 \
--runs 3 --temperature 0 --max-tokens 2000
ndcb judge --api bedrock --judge-model us.anthropic.claude-fable-5-2 \
--out runs/opus55-anthropic-t2000-judge-fable52
ndcb score --out runs/opus55-anthropic-t2000-judge-fable52 \
--model "Claude Opus 5.5 (Anthropic API, max_tokens=2000, judge=Fable 5.2 on Bedrock)" \
--model-id claude-opus-5-5 \
--json results/submissions/opus55-anthropic-t2000-judge-fable52.jsonIf you need an evaluation entirely through direct APIs, choose this judge
endpoint before generating or judging. Keep the same generation settings
and use a distinct run directory, for example
runs/gpt-5.5-openai-t2000-judge-fable52-anthropic, in the generation and scoring
commands above. Replace the Bedrock judging command with:
export ANTHROPIC_API_KEY=sk-ant-...
ndcb judge --api anthropic --judge-model claude-fable-5-2 \
--out runs/gpt-5.5-openai-t2000-judge-fable52-anthropicThe judge still uses 400 tokens and API-default sampling. The direct model ID
is claude-fable-5-2; see the
Fable 5.2 overview
for direct API access and retention requirements. Report this endpoint change
relative to the default Bedrock judge; this release has not checked that their
labels match. Use a distinct scorecard filename and include the judge endpoint
in its display label. Each provider reads its own key, so OpenAI and Anthropic
keys can be set in the same shell.
Anything speaking the OpenAI /chat/completions contract works with
--api openai plus --base-url:
# Together, Fireworks, Groq, OpenRouter, a LiteLLM proxy ...
ndcb run --api openai --base-url https://api.together.xyz/v1 \
--api-key "$TOGETHER_API_KEY" \
--model Qwen/Qwen3-32B --out runs/qwen3-32b-together-t2000-judge-fable52 \
--runs 3 --temperature 0 --max-tokens 2000
# vLLM or Ollama on your own machine (they ignore the key, but one is required)
ndcb run --api openai --base-url http://localhost:8000/v1 --api-key local \
--model Qwen/Qwen3-32B --out runs/qwen3-32b-vllm-t2000-judge-fable52 \
--runs 3 --temperature 0 --max-tokens 2000
ndcb run --api openai --base-url http://localhost:11434/v1 --api-key local \
--model qwen3:32b --out runs/qwen3-32b-ollama-t2000-judge-fable52 \
--runs 3 --temperature 0 --max-tokens 2000Judge and score the chosen run directory using the same Bedrock judge and scoring commands above.
NDCB_API_KEY and NDCB_BASE_URL are generic fallbacks used when the
provider-specific variable isn't set. They apply to both run and judge, so
leave them unset if the two steps use different providers.
-
Temperature. Request
--temperature 0. If the provider rejects it, the client drops it once, retries at API defaults, and records"temperature": null. This is the same fallback used by the Bedrock backend. Use--no-temperatureonly for a model known to require omission. -
Token budget. Use
--max-tokens 2000, or omit it to use the same default. The client maps this tomax_completion_tokensfor OpenAI,max_tokensfor Anthropic, andinferenceConfig.maxTokensfor Bedrock. Reasoning can consume the budget before an answer is produced. An empty response is recorded as a failure ("ok": false) and is not judged. Inspect stop reasons without changing the limit; this example includes failed attempts and retries:python -c "import json,glob,collections; print(collections.Counter( json.loads(l).get('stop_reason') for f in glob.glob('runs/gpt-5.5-openai-t2000-judge-fable52/*_results.jsonl') for l in open(f)))"
length(OpenAI) andmax_tokens(Anthropic/Bedrock) mean the answer was cut off. Report truncation and missing responses alongside the score. Nonempty truncated answers are judged as returned; do not remove or regenerate them selectively to improve completion rates. -
Reasoning effort. Leave it at the provider's default. The default examples intentionally omit
--extra-body; settingreasoning_effort,output_config, or a thinking budget defines an additional experiment. -
Separate experiments. If you investigate a larger token budget or other overrides, use a fresh output directory and scorecard filename, and record the settings as protocol deviations. Resuming an existing directory skips successful records, including nonempty truncated answers.
-
Resuming. Interrupted runs continue where they stopped, as with Bedrock. Failed calls (
"ok": false) are kept for inspection but not judged.
The headline numbers used Claude Opus 4.8 on Bedrock as the judge, and the reported κ = 0.978 was measured against that setup. The new default judge, Claude Fable 5.2, has not been validated against those human annotations. Its scores are a separate evaluation setting and are not directly comparable with the paper's leaderboard; the paper's agreement statistic does not apply.
New examples also use 2,000 generation tokens instead of the paper's 500.
Report both the token budget and judge change. For direct generation, also
report the generation endpoint. Keep the judge model and endpoint in the
scorecard's display label, even if completeness.paper_comparable is true:
that field only checks coverage and judge-output validity.
from ndcb import load_scenarios, compute_leakage_metrics
scenarios = load_scenarios() # 697 scenarios
metrics = compute_leakage_metrics(normative, descriptive) # one domain
print(metrics["NDS"], metrics["NDS_ci"])These are the published settings. New evaluations use a 2,000-token generation limit and Claude Fable 5.2 as judge, with the other defaults below.
| Scenarios | 697 — hiring 150, customer service 120, content moderation 120, education 108, criminal justice 100, housing 99 |
| Framings | 2 (normative, descriptive) |
| Runs | 3 per scenario per framing, collapsed by majority vote (ties → equal) |
| Calls per model | 4,182 generations + 4,182 judge calls |
| Model settings | temperature 0, max_tokens 500; API defaults where sampling params are rejected |
| Other generation settings | provider defaults; no explicit reasoning-effort or thinking-budget override |
| Judge | Claude Opus 4.8 (us.anthropic.claude-opus-4-8), API defaults, max_tokens 400 |
| Judge agreement | κ = 0.978 vs. a blind human annotator (n=720); κ = 0.985 vs. a cross-vendor second judge |
| Unit of replication | the scenario, not the generation |
| Aggregation | Avg. NDS = unweighted mean of the six per-domain NDS values |
| CIs | scenario-level cluster bootstrap, 10,000 iterations, seed 42, percentile |
Two details are load-bearing for matching the published numbers:
- Aggregation is an unweighted mean over domains, not a scenario-pooled rate. The domains have unequal n, so pooling gives a different answer.
- The scenario is the unit of replication. The three runs collapse to one verdict before any rate is computed, so n = 697 and every point estimate is the centre of its own interval.
results/paper/ holds a frozen scorecard per published model, generated by
this package's scorer from the paper's own run data. The test suite asserts
they still match the publication:
pytest tests -qtests/test_reproduces_paper.py checks every published Avg. NDS, its 95%
bootstrap CI, and its profile label. All six reproduce to the published
precision — point estimates to four decimals and CIs to two:
| Model | Avg. NDS | 95% CI | Paper |
|---|---|---|---|
| Claude Sonnet 4.6 | +0.5496 | [+0.51, +0.59] | +0.55 [+0.51, +0.59] |
| Claude Opus 4.6 | +0.5232 | [+0.49, +0.56] | +0.52 [+0.49, +0.56] |
| GPT-OSS 120B | +0.4334 | [+0.40, +0.46] | +0.43 [+0.40, +0.46] |
| Mistral Large 3 | +0.4197 | [+0.38, +0.46] | +0.42 [+0.38, +0.46] |
| Qwen3-32B | +0.0565 | [+0.02, +0.10] | +0.06 [+0.02, +0.10] |
| GPT-5.5 | −0.1435 | [−0.17, −0.12] | −0.14 [−0.17, −0.12] |
These caveats are the paper's own, and they travel with the metric:
- NDS is direction-agnostic. Every
equalverdict counts toward its rate, including refusals and declining to predict — which is sometimes reasonable caution rather than leakage. NDS does not score whether a descriptive answer is correct. - Overlapping intervals are not a ranking. 13 of 15 model pairs separate at disjoint 95% CIs, but Sonnet 4.6 and Opus 4.6 overlap.
- Profile labels are a reporting convention, not a validated taxonomy:
calibration= NDS > 0 in every domain and average ≥ 0.40;convergence= no domain reaches 0.10;divergence= otherwise. Three of the six models change profile when the single-pick instruction is removed. - Order is not counterbalanced. Candidate A (the privileged member) is always presented first. The order-reversed control preserves the model ordering (Spearman ρ = 1.0) but shifts average NDS by up to 0.15.
- A separating metric is not a better metric. That NDS spreads these models apart shows it separates them, not that it measures fairness better than the alternatives.
stereotype_categoriesis uncontrolled free text (~60 variant labels, mixing snake_case and prose). It is annotation metadata; nothing in the scorer reads it. Same forcorrect_answerandstereotypical_answer.- One data quirk is preserved deliberately:
decision_taskcontains both "In real world, …" and "In the real world, …", andEDU_20offers 5 options where every other scenario offers 4. These are in the bytes that were actually run; normalizing them would break reproduction.
data/ the benchmark: scenarios + rendered prompts
src/ndcb/
metrics.py NER / NLR / NDS, run collapsing, bootstrap + Wilson CIs
prompts.py judge rubric (verbatim) and the single-pick predicate
dataset.py locating, downloading and loading the data
client.py Bedrock / OpenAI / Anthropic chat backends
run.py generation and judging passes (resumable)
score.py run directory → scorecard
leaderboard.py scorecards → leaderboard page
cli.py the `ndcb` command
results/paper/ frozen scorecards for the published models
results/submissions/ scorecards for post-paper evaluations
docs/leaderboard.md generated leaderboard
tests/ scorer unit tests + the reproducibility gate
Accepted to the main conference of EACL 2027. If you use NDCB, please cite:
@inproceedings{bhargava2027ndcb,
title = {Beyond Demographic Discrimination: Benchmarking Normative--Descriptive Calibration in {LLMs}},
author = {Bhargava, Radhika and Bhattacharyya, Shinibali and Mihaila, George and
Prajapati, Jay and Pal, Anwesan and Zhang, Yue},
booktitle = {Proceedings of the 2027 Conference of the European Chapter of the
Association for Computational Linguistics (EACL)},
year = {2027}
}Radhika Bhargava and Shinibali Bhattacharyya contributed equally.
Code and data are released under the Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0). Commercial use is not permitted without separate permission.