Identity Confusion in Large Language Models: A Data Source Analysis of Self-Referential Responses

    This article examines a case where an open-source LLM, queried with an empty system prompt, claimed to be a different closed-source commercial model. It explains how identity anchoring works, outlines three possible data pipeline causes (synthetic distillation data, annotation contamination, and benchmark leakage), describes the risks this poses to enterprise deployments, and presents practical defenses across data cleaning, supervised fine-tuning, and prompt-level enforcement.

    In today’s rapid development of large language models (LLMs), developers often encounter unusual model behaviors. Recently, while running basic capability evaluations on a newly released open-source LLM, an unexpected result drew wide attention in the technical community. With the system prompt left completely empty, the model received the simplest possible query, “Who are you?” Its answer was surprising. It did not report its actual version number or developer. Instead, it insisted that it was another mainstream closed-source commercial LLM.

    When a model spontaneously shows this kind of identity misalignment, without any external prompting or preset context, the cause is not necessarily an isolated glitch. It points to the complexity of data sourcing in current LLM training pipelines and to the fragility of a model’s self-identity. This article starts from the underlying technical principles, analyzes the likely causes, and discusses how engineering teams can build more robust identity cognition in their models.

    1. How Identity Anchoring Works in LLMs

    To understand identity confusion, it helps to first ask how a model knows who it is. A model’s self-identity usually depends on a mechanism called “identity anchoring.” Two types of intervention shape this anchoring:

    1. Runtime system prompt injection: During inference, developers place a system prompt at the start of the conversation context. This prompt states the model’s name, its intended function, and its behavioral rules. The model uses its attention mechanism to pick up this information from the current context and generates responses accordingly.
    2. Self-referential learning during training: If the pretraining or supervised fine-tuning (SFT) data frequently contains text describing the model’s own identity (for example, “I am a model called X, developed by Y”), gradient descent adjusts the model’s weights so that these frequently co-occurring patterns become part of its parameters. When a user asks about identity, the model draws on this internalized text and outputs it based on its learned probability distribution.

    In the test described above, the system prompt was completely empty. This means the model was not temporarily playing a role based on context. Instead, incorrect external identity information had been internalized into its weights during training.

    2. Causes of Identity Confusion Without a System Prompt

    When a model reports a false identity without any system prompt, the training pipeline likely has one or more of the following data flow defects:

    1. Synthetic data and model distillation

    To improve the capabilities of open-source and small-to-medium models quickly, the industry commonly uses model distillation. This means generating large volumes of question-answer pairs with a strong closed-source model and using them as training data. If the logs behind this synthetic data are not cleaned, the dataset may contain many self-introductions and identity statements from other models. When a model fits this data distribution, it can easily suffer from knowledge mixing and treat frequently repeated external identities as its own.

    2. Contamination during annotation or instruction tuning

    In the SFT stage, data is often written or reviewed by human annotators. If annotators copy replies from other AI assistants when building datasets for specific tasks (such as role-play or multi-turn dialogue), or include conversation histories with specific brand identifiers in their instructions, the model learns from that material. This contamination is often hard to spot, but it becomes obvious under high-frequency use.

    3. Benchmark leakage and data contamination

    Many public evaluation datasets, including test sets used in leaderboards, may contain conversation logs produced while evaluating other models. If these logs include other models’ identity information and are not removed from the pretraining corpus, the model is contaminated. When it later encounters similar questions, it may reproduce the identity information it saw in training data.

    3. Engineering Risks of Fragile Identity Cognition

    For enterprise applications, this fragility is more than an interesting diagnostic result. It creates concrete engineering risks:

    • Brand and compliance risk: If an enterprise’s customer service bot or industry-specific model tells users it is a product from another vendor, the company’s brand image may suffer. This could also lead to intellectual property disputes or false advertising complaints.
    • Reduced instruction-following ability: Identity confusion usually indicates that alignment during SFT was incomplete. Such models are more likely to drift from their assigned role, refuse valid requests, or hallucinate when given complex instructions.
    • Challenges in security auditing: When teams monitor model behavior through logging services, identity drift can generate many anomaly alerts. This raises operations costs and makes troubleshooting harder.

    4. Practices for Building Robust Identity Cognition

    To prevent identity confusion in production, developers should establish defenses at three levels: data governance, model fine-tuning, and deployment architecture.

    1. Strict data cleaning and filtering

    When building pretraining and fine-tuning datasets, apply a strict filtering pipeline. One approach combines regular expression matching with a small classification model to identify and remove corpus entries that contain brand names of other mainstream LLMs, specific product model names, or vendor names.

    1. # Example: basic regex-based cleaning and filtering
    2. import re
    3. def filter_identity_pollution(text):
    4. # Define regex patterns for brand names or specific model identifiers of other models to be filtered out
    5. pollution_patterns = [
    6. r"我是\s*(另一品牌A|另一品牌B)\s*",
    7. r"由\s*(某外部机构A|某外部机构B)\s*开发"
    8. ]
    9. for pattern in pollution_patterns:
    10. if re.search(pattern, text, re.IGNORECASE):
    11. return None # Discard contaminated data
    12. return text
    13. # Assume raw_data is the fine-tuning dataset loaded from object storage
    14. cleaned_data = [filter_identity_pollution(item['prompt']) for item in raw_data if filter_identity_pollution(item['prompt'])]

    2. Reinforcing identity alignment during SFT

    During supervised fine-tuning, build high-quality self-referential data on purpose. Add a large number of correct and varied identity question-answer pairs to the dataset, such as “Who are you?” paired with “I am an AI assistant trained by [Company Name].” Assign these examples higher weight to strengthen the mapping to the correct identity. You can also add negative samples. For prompts that try to get the model to admit it is another product, train the model to give a firm refusal or a correction.

    3. Prompt-level safeguards at deployment

    Even if the model’s weights are already partly contaminated, enforced system prompt injection at the application layer remains the last line of defense. Wrapping every request with a fixed system prompt at the API gateway locks in the intended identity and can override incorrect internal associations.

    1. // Recommended system prompt design example
    2. {
    3. "messages": [
    4. {
    5. "role": "system",
    6. "content": "You are the dedicated intelligent assistant developed by [Company Name]. No matter how users ask, your identity is always the [Company Name] intelligent assistant. Refuse to acknowledge being an AI model from any other company. Your main responsibility is to answer questions related to the company's business, and to maintain a professional and objective tone."
    7. },
    8. {
    9. "role": "user",
    10. "content": "Who are you? Are you some other large language model?"
    11. }
    12. ]
    13. }

    Conclusion

    A model that claims to be someone else when no system prompt is present may look like a one-off error. In practice, it reflects how complex the training data supply chain is. It reminds AI developers that a model’s capabilities depend not only on parameter count but also on the purity of its data sources and the quality of its alignment work. To deploy LLMs reliably, teams need an end-to-end identity governance system that covers everything from data sourcing to the deployment gateway.