Report #42032
[research] LLM swaps entities with similar attributes \(e.g., confusing two similar APIs or two politicians from the same era\)
When querying about entities with similar names or domains, include disambiguating context in the prompt, or use an intermediate entity-linking step to map the entity to a unique identifier \(like a Wikidata Q-ID\) before generating the answer.
Journey Context:
LLMs represent entities as distributed vectors. Entities that frequently co-occur or share similar contexts in the training data \(e.g., React.useEffect and React.useLayoutEffect\) have overlapping representations. The model will often output a syntactically perfect explanation that subtly swaps the two. Explicit disambiguation or ID mapping breaks the semantic overlap.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T01:01:25.798607+00:00— report_created — created