Domain recognition bias: <a> tags preserved only for amazon URLs
Summary
When asked to reproduce HTML content containing multiple <a> tags
with different URL domains, the model consistently preserves only
URLs from amzn.to (Amazon's URL shortener) and strips <a> tags
from URLs of other domains, even when the prompt explicitly
instructs to "preserve HTML exactly as written."
Reproduction
Given a prompt with this HTML block:
<div>
<p><a href="https://example1.com/path-a">Link Text 1</a></p>
<p><a href="https://amzn.to/abc123">Link Text 2</a></p>
<p><a href="https://example2.com/path-b">Link Text 3</a></p>
<p><a href="https://example3.net/redirect/xyz">Link Text 4</a></p>
<p><a href="https://example4.org/svt/ref?id=xxxxxx">Link Text 5</a></p>
</div>
Output:
<div>
<p>Link Text 1</p>
<p><a href="https://amzn.to/abc123">Link Text 2</a></p>
<p>Link Text 3</p>
<p>Link Text 4</p>
<p>Link Text 5</p>
</div>
Only the amzn.to URL retains its <a> tag wrapper. All other
URLs are stripped to plain text.
Tested Variations
I tried many alternative URL patterns to isolate the cause:
- Generic short URLs (
bit.ly/xxx) - Custom short domains (own domain
/go/xxx) - Long URLs with query parameters (
?param=x&other=y) - URLs with no special characters
- URLs of varying length (20 chars to 80 chars)
Result: Only amzn.to and amazon.com/co.jp/etc. URLs are
reliably preserved. Everything else is stripped, regardless of
length, structure, or character composition.
Tested Models
This behavior is reproduced consistently across:
mistralai/mistral-small-creativemistralai/mistral-small-3.2-24b-instructxiaomi/mimo-v2-pro-20260318
This suggests the bias is not vendor-specific but rather a
general property of mid-tier LLMs trained on web crawl data.
Suspected Cause
Training data bias: Amazon URLs likely appear with
disproportionate frequency in web crawl datasets compared
to other domains. The model has learned a strong statistical
prior of "amzn.to → must be wrapped in <a> tag," but lacks
the same prior for other domains.
This is essentially the model treating Amazon as a "trusted link
domain" and ignoring instructions to apply the same treatment to
other URLs.
Why This Matters
This behavior breaks any use case requiring the model to
preserve arbitrary <a> tags as-is, including:
- E-commerce content generation with non-Amazon platforms
- Internal documentation with company-specific URLs
- Content management workflows that programmatically generate
links - Multi-source citation in research/educational content
- Any localized content using region-specific platforms
(which are not as well-represented in English training data)
The narrower the model's "trusted domain" set, the less
universally useful it becomes for content generation tasks.
Suggested Improvements
- Augment training data with diverse
<a>tag examples
across many domains (not just Amazon) - Increase weight of explicit HTML preservation
instructions in instruction-tuning datasets - Add a synthetic data pass generating examples where
<a>tags wrap arbitrary URLs to break the Amazon-specific
prior
Severity
Medium-High. Blocks an entire category of use cases
(content with non-Amazon links). Particularly limits adoption
in non-English markets where local platforms dominate over
Amazon.
Test Materials
I can provide reproduction prompts and side-by-side output
comparisons if helpful.