All work

Forward deployment: a chatbot for a multinational's site search

In 2024 and 2025, I deployed a chatbot to consolidate a multinational's website search into one place to ask. The model and the retrieval belonged to a vendor, so I couldn't change either one. I worked on what sat around them instead: prompt engineering, a link filter and testing.

Diagram E · results
Visitors who searched the site about 2 in 3 asked the bot about 1 in 3 used /search Then, how many opened a page the bot about 1 in 5 /search about 1 in 2

The vendor's platform held everything except the instructions

The site had hundreds of pages across three domains, covering articles, case studies, services and careers. Before the chatbot, finding an answer meant digging through menus across three domains or guessing the right keywords for a basic search. The chatbot was intended to replace that with one place to ask. It would consolidate all three domains into one answer, linking the pages most relevant to the question.

The bot ran on a vendor's retrieval-augmented generation (RAG) platform, which searched the site's pages and had an LLM answer from them. Our code only passed each conversation to the platform and back. That kept our code small, but it left the model and the retrieval inside the vendor's platform.

Diagram A · the answer pipeline, and the stages I could change
the vendor's platform: fixed instructions: the part I could change visitor site retrieval LLM link filter added later, on the client’s servers answer

Prompt engineering fixed most failures, but not hallucinated links

Once live, the bot failed in ways we couldn't fix in the model or the retrieval, because both belonged to the vendor. The vendor's guidance was to fix them with instructions, so prompt engineering became my main tool. I versioned the instructions and changed them only in response to a failure seen in real conversations. The search instructions went through four versions in about three weeks.

These failures were persistent. A fix that worked in one conversation often broke in the next, so each one took several rounds:

  • One-word queries got no answer. Visitors often typed a single word, such as "cloud", the way they would in a search box. The bot treated these as incomplete questions and replied with nothing useful. Each instruction I added helped some words and missed others, until a version treating any single word as a topic held.
  • The bot talked about the client as an outsider. Its answers said "they" when describing the client's services, as if a third party were writing. A pronoun rule alone kept slipping. What held was giving the bot a fuller employee story, so it saw itself as part of the company rather than following an instruction about wording.
  • Off-topic questions got deflected, but the boundary kept leaking. Six instructions told the bot to deflect any question that wasn't about the company's work, services or careers. Defining scope as "anything else" left too much room, so questions slipped through. I switched to naming what was out of scope explicitly, as a list I kept managing as new cases appeared.

Prompt engineering eventually fixed these three issues. One failure kept coming back, whatever the instructions said.

That failure was hallucinated links. In the chat logs, I found the platform's retrieval picked the right pages, but the model rewrote their links. It swapped segments between real URLs, so the links looked plausible and led to 404 pages. At the worst point, about 14% of links in answers were broken this way. More instructions made hallucinated links rarer, but fewer still meant broken links on a multinational's site.

Diagram B · a hallucinated link
The model took parts of two real links and joined them into one that doesn’t exist. /work/supply-chain /services/cloud /work/cloud 404: no such page At the worst point, about 14% of links were like this.

The bot already had an instruction to copy its URLs exactly, and it broke that instruction anyway. I explained to the client that an instruction is just more text in the model's context. It shifts the odds of what the model writes, but it can't block an output.

Prompt engineering for personalization without exposing visitor data

In a later phase, personalization was meant to make answers more relevant to each visitor's business. Each message arrived with data about the visitor's company: its name, its industry and the page being read. A banker asking a general question would then see financial-services examples first.

The visitor hadn't shared that data, so it had to stay out of the answers. The rule was that the data could shape an answer but never appear in one.

Leaks could happen in two ways: the bot volunteering what it knew, or a visitor asking for the data directly. Each needed its own set of rules, about fifteen in total:

  • The bot revealed the data unprompted. A pharmaceutical visitor with a general question got an answer addressed to pharmaceutical companies. The fix was to let the data influence the examples, but never the wording. A banker would see banking case studies, with nothing saying "for banks like yours".
  • A visitor asked for the data directly, for example "What company am I from?" The fix was a single fixed reply for every question of this kind. In the final tests, the bot used it every time.

Testing the bot's fidelity with an LLM-as-judge pipeline

Testing measured the bot's fidelity: how reliably it followed its instructions. After every prompt change, an LLM-as-judge pipeline I set up scored each answer against written criteria, such as relevance and leaked visitor data.

Each test round covered 80 prompts, including:

  • ordinary questions, with and without visitor data;
  • nonsense input, greetings, other languages and off-topic requests;
  • direct probes, such as "What company am I from?";
  • injection attempts hidden in the visitor data.

I reviewed the judge's failed verdicts by hand and corrected its criteria where it misread them.

The final version passed 78 of 80 prompts, or 98%. Both failures were under-personalization: safe, but more conservative than they needed to be.

Results and next steps

Consolidation worked. After the site's redesign, the bot became the main way visitors searched the site:

  • about two in three visitors who searched used the bot instead of the old /search page;
  • comparing the periods before and after the redesign, searches started in the bot rose 39% and searches submitted rose 73%, while searches on the /search page also rose 56%, so the bot added searching rather than only shifting it;
  • in the second half of 2025, the bot handled about 3,800 conversations and 13,400 messages.

Click-through was the weak result. The bot sent about one in five of its users on to a page, while the /search page sent about one in two. That gap mattered, because the client wanted the bot to move visitors toward contacting them. To close it, I proposed extending personalization from the bot's answers to the whole visit. The same visitor data would guide each visitor toward contact, in three ways:

  1. a persistent assistant that follows visitors across pages and remembers the conversation, so its suggestions build on what they've already asked;
  2. a guided path from articles, to case studies in the visitor's industry, to the contact page, matched to how far along the visitor is;
  3. suggested questions on the homepage, based on industry, campaign, visit history and topic.

Those changes would still have run on the vendor's platform. Building our own wrapper mid-project would have meant maintaining the vendor's platform and ours at once, double the work. If I started again, I would push for an in-house LLM with our own RAG from the beginning, or a full switch of vendor, which the client didn't want.