Skip to content

Wrap lever UUID in XML tags to prevent UUID leakage in free-text fields - #466

Merged
neoneye merged 1 commit into
mainfrom
fix/enrich-xml-tag-lever-id
Mar 31, 2026
Merged

Wrap lever UUID in XML tags to prevent UUID leakage in free-text fields#466
neoneye merged 1 commit into
mainfrom
fix/enrich-xml-tag-lever-id

Conversation

@neoneye

Copy link
Copy Markdown
Member

Summary

  • XML-tagged UUID: Replace Lever ID: {uuid} with <lever>{uuid}</lever>. XML tags signal structural markup — models treat it as metadata rather than text to copy into synergy/conflict fields. Full UUID preserved first in block for reliable matching.
  • Positive framing: "refer to levers by their name"
  • Exact-count instruction: "Return exactly N characterizations — one per lever, no more, no fewer"
  • OPTIMIZE_INSTRUCTIONS: Document lessons from PRs Strip UUIDs from full lever context string in enrich step #457-464

Previous attempts: negative prohibitions backfired (#458), hex prefixes broke haiku (#460), integer indices broke matching (#462), moving UUID to end broke positional heuristics (#464).

Test plan

  • Verify llama3.1 UUID contamination drops from 15 (analysis 60)
  • Verify all levers still correctly enriched (UUID matching works)
  • Verify haiku errors drop
  • Verify no content regressions
  • Check assessment verdict before merging

🤖 Generated with Claude Code

Replace "Lever ID: {uuid}" with "<lever>{uuid}</lever>" in the
per-batch prompt. XML tags signal structural markup rather than text
content, so models are less likely to copy UUIDs into synergy/conflict
fields. The full UUID stays first in each lever block for reliable
positional matching.
Add positive framing ("refer to levers by their name") and exact-count
instruction. Update OPTIMIZE_INSTRUCTIONS with lessons from PRs #457-464.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@neoneye

Copy link
Copy Markdown
MemberAuthor

Self-improve iteration — analysis 65

Verdict: YES

UUID contamination: fully eliminated (15 → 0)

  • llama3.1: 15 → 0 UUID occurrences in synergy/conflict text (–100%)
  • All other models: remain at 0
  • All levers correctly enriched across all models
  • No regressions introduced

Haiku errors reduced: 7 → 5 (–29%). Remaining 5 are benign fabricated extras — all 35 real levers enriched.

Content quality: llama3.1 synergy/conflict now uses clean lever-name prose. OPTIMIZE_INSTRUCTIONS updated and accurate.

The XML tag approach (<lever>{uuid}</lever>) works universally — models treat it as structural markup rather than text to copy, while keeping the full UUID first in the block for reliable matching.

@neoneye
neoneye merged commit b49a0a4 into mainMar 31, 2026
3 checks passed
@neoneye
neoneye deleted the fix/enrich-xml-tag-lever-id branch April 1, 2026 23:06
Sign up for freeto 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.

1 participant

@neoneye