Skip to content

Measure whether the three surviving 'adr' schema examples contaminate output, or only illustrate format - #2260

Merged
mstomar125 merged 2 commits into
mainfrom
issue-2190-adr-example-contamination
Aug 24, 2026
Merged

mstomar125 merged 2 commits into
mainfrom
issue-2190-adr-example-contamination

Conversation

@mstomar125

Copy link
Copy Markdown
Contributor

Summary

PR #2188 removed the "ADR" worked example from create_schema's name parameter after measuring it caused the model to name a created type "ADR" verbatim. Three other model-facing descriptions still carry the 'adr' token (create_node.node_type, create_schema.relationships.targetType, update_schema.schema_id), on the theory (explicitly flagged as a prediction, not a finding, in tools.rs's own comment) that these are a different case: they name a value that must already exist, so the example illustrates a format, not a candidate answer to adopt — unlike name, which names the thing being created.

This PR measures that prediction directly, in both directions:

  • Forward (do they contaminate?): tested against a request deliberately shaped to be conceptually as close to "ADR" as possible without ever spelling ADR/adr in the prompt.
  • Reverse (does removing them hurt id-copying, since two of the three examples also demonstrate the lowercase snake_case id format?): tested with the examples removed entirely.

Result — negative both directions, 27/27 real-inference tool calls

arm node_type targetType schema_id total
baseline (current text) arch_decision arch_decision arch_decision 9/9
armA ('adr' → 'my_type') arch_decision arch_decision arch_decision 9/9
armB (example removed) arch_decision arch_decision arch_decision 9/9

"adr" never appeared in any of the 27 tool calls across all three arms. Removing the examples doesn't help (nothing to fix) and doesn't hurt (id-copying ties baseline exactly) — the prediction holds.

Outcome

No code removed — there's nothing to fix. FINDINGS.toml §6B records the measurement, and a choosing-vs-copying addendum to ADR-064 is proposed there (flagged for review, not merged into the ADR doc directly): an example in a description for a value the model is choosing supplies a candidate answer and can contaminate output; an example for a value that must already exist illustrates a format and is safe to leave.

Closes #2190.

mstomar125 and others added 2 commits August 21, 2026 13:58
… output (#2190)

core#2188 removed create_schema's name-parameter "ADR" example after it
caused the model to name a created type "ADR" verbatim. Three other
model-facing descriptions still carry the token (create_node.node_type,
create_schema.relationships[].targetType, update_schema.schema_id), each
naming an id that must already exist rather than one being created — an
untested prediction that they are a different, harmless case.

Adds a fresh golden case (must-exist-id-{baseline,armA,armB}.toml) that
exercises all three parameters against a type deliberately close to the
"ADR" concept (arch_decision: proposed/accepted/superseded, a supersedes
field) without ever spelling "ADR" or "adr" in the prompt. Compared at 3
reps across three arms — current text, 'adr' replaced with a neutral
'my_type', and the example deleted outright — the model produced the
correct id in all 27 tool calls with zero variation between arms. The
survivors neither contaminate output nor does removing them degrade
id-copying: inert in both directions, not merely non-contaminating.

Records the measurement in FINDINGS.toml section 6B and proposes a
choosing-vs-copying addendum to ADR-064 (an example for a value being
created supplies a candidate answer; an example for a value that must
already exist and is already shown in context does neither, so it isn't
licensed to invent one) for review rather than amending the ADR directly.
Updates the in-code comment on create_schema.name to record the measured
(not just predicted) status. No functional code change — the three
descriptions are kept as-is; the negative result is the outcome.

Also fixes an unrelated pre-existing clippy failure (collapsible match in
live_resolve_query_decomposition_shapes.rs) that blocks `cargo clippy
--all-targets` on main regardless of this change, discovered while running
the mandatory quality gate.

Co-Authored-By: Claude <noreply@anthropic.com>
@mstomar125

Copy link
Copy Markdown
Contributor Author

Independent verification (mstomar125)

Checked the only non-fixture file touched (tools.rs) — it's a pure comment
addition, zero functional/behavioral change. The three golden fixtures
(baseline/armA/armB) and FINDINGS.toml are measurement artifacts, not
runtime code. Given the negative result was measured in both directions
(27/27 real-inference calls, forward + reverse) and no code path changed,
this is about as low-risk as a PR can be.

APPROVE. (posted as a comment — same account authored the PR)

@mstomar125
mstomar125 merged commit e5230eb into main Aug 24, 2026
@mstomar125
mstomar125 deleted the issue-2190-adr-example-contamination branch August 24, 2026 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Measure whether the three surviving 'adr' schema examples contaminate output, or only illustrate format

1 participant