Try the live assistant
blog / Why Is Your Chatbot Linking to…

Why Is Your Chatbot Linking to the Wrong Page?

Why does an AI chatbot link to the wrong page? How fuzzy matching invents links — and why a link should be a promise you can check, not a guess.

From the AnswerRails development blog — plain-English notes on the technology behind trustworthy AI chat.

A visitor asks a roofing company’s website assistant how to get a quote. The answer is right — but in the middle of it, the words “we visit” are blue and underlined. A link, pointing at the services page, which says nothing about quotes. Nobody wrote that link. Here’s the machinery that did, and how we tore half of it out of our own product.

Before-and-after diagram: fuzzy phrase matching invented links on the ordinary phrases 'we visit' and 'owner if'; the exact-only rule links only an exact whole-word page-title mention such as 'Services', and adds no link when it is not certain.
Fuzzy matching invented links from ordinary words. Exact-only matching makes every added link a promise.

Where the links in an AI answer come from

There are two kinds. The AI model writes some itself — it’s told which of your pages exist, so a good answer often ends “you can read the details on our pricing page”, link included. The rest are added afterwards by ordinary software, which reads the finished answer looking for mentions of your pages by name and turns them into links.

That second kind hangs on one question: how sure should the system be before it adds a link the model never wrote?

Two words that should never have been blue

Before a recent release we ran a road test against a test site we’d built for a fictional roofing firm. Two of the findings were links. “We visit” had been linked to the services page. And in an answer about a guarantee that “transfers to a new owner if you sell the house”, the fragment “owner if” was linked to the same page. Owner if is not even a phrase.

The model wrote neither link; we keep its raw text in the records, and it contained none. To a visitor this reads as broken. We treated it as release-blocking.

A machine for inventing links

Every part was reasonable on its own. A list of page titles. Derived variations, so “service” still links to the Services page — one of them, made by trimming the plural, was the stem “Servic”. And a matcher that scored every short phrase against every title and variation by edit distance — the number of single-letter changes between two strings — to forgive typos.

“We vis” is three letter-edits from “servic”. That scored close enough to clear the default on a “match confidence” dial, so “we visit” became a link. “Owner if” passed the same way. Nobody designed that outcome. Assembled, the parts were a machine for inventing links.

Exact or nothing

The fix was a rule, not a cleverer formula: a link is added only on an exact, whole-word match of a page title, a stored variation, or a term. The scoring formula wasn’t tuned. It was deleted.

It’s the same economics as declining to answer: a missing link costs the visitor a few seconds; a wrong link costs trust, because a link is a promise you can check. When the system isn’t certain, no link. Genuine title mentions still link, exactly as before.

The confidence dial came out entirely. Once matching is exact there’s nothing to tune, and a control that controls nothing is a small lie on your settings page.

One trade-off, written down: a page with an everyday one-word title like “About” now links on every exact mention. We’d rather a predictable rule than an unpredictable guess.

Then we proved it: tests that replay the incident’s exact sentences and fail if either ever turns blue again, and a live re-run of the same road test. The rendered links were exactly the model’s links, plus one email address made clickable.

Three questions for any vendor

Does your assistant add links the model didn’t write — and on what rule, exact match or “close enough”? When a link appears, can you show me why? And when it isn’t certain, which does it prefer — a wrong link or no link?


AnswerRails is a WordPress plugin bringing safe, grounded AI chat to small-business websites. More at answerrails.com.

← All posts