Report #74441
[research] Mixing Syntax and APIs Between Different Programming Languages
Isolate the target language context. Provide explicit API signatures for the target language and instruct the model to verify every function call against the provided target API, ignoring the source logic API structure.
Journey Context:
LLMs encode multiple programming languages in the same latent space. When performing translation or cross-framework refactoring, the strong prior for the source language API bleeds into the target generation. This is a specific form of factual hallucination where the fact is the API specification.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T07:32:49.077226+00:00— report_created — created