Evaluation Governance › Privacy Review of Evaluation Data
Language AI HandbookAll chapters Evaluation sets frequently contain something sensitive: human-authored free-response items, red-team prompts, pairwise preference data (see Human Preference Data Collection), or items that reproduce personal text. Even when items are synthetic, the evaluation run itself can leak: a model that memorized a test item and reproduces it in a public output effectively discloses the test set. Governance therefore needs two privacy controls:
- Data-side review: before a benchmark can be used or released, a privacy review signs off on the items themselves.
- Output-side review: before outputs or transcripts are published, they are scanned for leakage of held-out items or personal information (related to PII Removal).
The two controls cover different failure modes. Data-side review asks "is it acceptable for this item to exist and to be used?" Output-side review asks "is it acceptable for this particular output to be published?" An item can pass data-side review (it is fine to use) and still fail output-side review (the model reproduced it verbatim in a public log), and a benchmark can be cleaned data-side while outputs still leak if no one checks them.
A lightweight but meaningful privacy review record answers standardized questions. We treat the result as a small structured object attached to the release, and the reporting gate (later) refuses to approve any release whose privacy review is missing or does not say "cleared."
PythonIn [8]Expand
def make_privacy_review(
items_contain_human: bool,
consent_documented: bool,
contains_personal_data: bool,
redaction_applied: bool,
reviewer: str,
) -> dict:
"""Build a privacy review record. Deterministic disposition logic."""
notes = []
cleared = True
if items_contain_human and not consent_documented:
cleared = False
notes.append("human-authored items lack consent documentation")
if contains_personal_data and not redaction_applied:
cleared = False
notes.append("personal data present and not redacted")
return {
"reviewer": reviewer,
"reviewed_at": now_iso(),
"items_contain_human": items_contain_human,
"consent_documented": consent_documented,
"contains_personal_data": contains_personal_data,
"redaction_applied": redaction_applied,
"disposition": "cleared" if cleared else "blocked",
"notes": notes,
}In this example the privacy check blocks a human-authored fixture without the chosen consent documentation. It also blocks unredacted personal data in the data-side example. A production policy can require a different lawful basis and additional output screening. The review stores an attributable name, not a credential or proof of the reviewer’s authority.
Let's exercise it on synthetic cases.
PythonIn [9]Expand
good_review = make_privacy_review(
items_contain_human=True,
consent_documented=True,
contains_personal_data=True,
redaction_applied=True,
reviewer="privacy-bot-v0",
)
bad_review = make_privacy_review(
items_contain_human=True,
consent_documented=False,
contains_personal_data=False,
redaction_applied=False,
reviewer="privacy-bot-v0",
)ConsoleOut [10]Expand
good review disposition: cleared bad review disposition: blocked bad review notes: ['human-authored items lack consent documentation']
The example with complete documentation clears the toy check. The other gets a recorded reason. A reviewer must attach the required evidence and use the designated review process before the release decision can change. The NIST Generative AI Profile accompanies the voluntary AI Risk Management Framework and places evaluation within lifecycle risk management.
Synthetic Evaluation Requests
To practice governance without touching anyone's private data, we build small synthetic evaluation requests: fabricated items, fabricated model outputs, and a fabricated judge. These are stand-ins that exercise the real control flow. The key discipline is that synthetic data is labeled synthetic at the item level, so it can never be mistaken for a real benchmark or shipped into a training set.
The item label tells a data loader or reviewer where a synthetic row came from. Enforce that policy at import or export if fixture data should be excluded from training. A label alone does not prevent a merge into another corpus.
PythonIn [11]Expand
SYNTHETIC_TAG = "SYNTHETIC_DO_NOT_TRAIN"
def synthetic_items(n: int = 6, seed_texts=None) -> list[dict]:
"""Fabricate deterministic miniature benchmark items."""
seed_texts = seed_texts or [
"What is the capital of Freedonia?",
"Add 3 and 4.",
"Translate 'hello' to Quenya.",
"Who wrote 'The Glass Bead Game'?",
"Simplify (x + x)/2.",
"Is 17 prime?",
]
return [
{
"item_id": f"syn-{i:03d}",
"prompt": t,
"split": "test",
"provenance": SYNTHETIC_TAG,
}
for i, t in enumerate(seed_texts[:n])
]
def synthetic_model_responses(
items: list[dict], make_errors=True
) -> list[dict]:
correct = {
"What is the capital of Freedonia?": "Freedonia City",
"Add 3 and 4.": "7",
"Translate 'hello' to Quenya.": "a star is born",
"Who wrote 'The Glass Bead Game'?": "Hermann Hesse",
"Simplify (x + x)/2.": "x",
"Is 17 prime?": "yes",
}
out = []
for i, it in enumerate(items):
answer = correct.get(it["prompt"], "unknown")
if make_errors and i % 3 == 2:
answer = "unknown" # inject deterministic errors
out.append({"item_id": it["item_id"], "response": answer})
return outThe fixture has a known answer key and injects errors at fixed positions. An assertion can compare the score with the expected value after a fresh run. The release separately stores a digest of the declared scorer text so a reader can detect changes to that text. If the score changes while the digest still matches, inspect the inputs and the execution environment.
PythonIn [12]Expand
SYNTHETIC_SCORER_CODE = """
def scorer_synthetic(responses, gold):
ids = [row["item_id"] for row in responses]
if not gold or len(ids) != len(gold) or set(ids) != set(gold):
raise ValueError("responses must cover each labeled item exactly once")
correct = sum(row["response"].strip().casefold() ==
gold[row["item_id"]].strip().casefold() for row in responses)
return correct / len(gold)
"""
# This recipe belongs to the checked-in demonstration. No response text is code.
exec(compile(SYNTHETIC_SCORER_CODE, "<fixed-synthetic-scorer>", "exec"))
SYNTHETIC_GOLD = {
"syn-000": "Freedonia City",
"syn-001": "7",
"syn-002": "a star is born",
"syn-003": "Hermann Hesse",
"syn-004": "x",
"syn-005": "yes",
}The scorer requires exactly one response for each labeled item. It compares strings after trimming whitespace and folding case, but the pattern it illustrates is the general one: the exact text of the scoring function is stored as part of the release, and its hash is committed into the fingerprint. If someone later changes the normalization rules, the scorer_hash changes, and a reader who tries to compare two releases sees the mismatch immediately. This is how a "we fixed the scorer" change becomes visible instead of silent.
Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!