AI & Automation
Building an AI-Powered Search Experience
Connecting natural-language questions to relevant answers, knowledge and resources
At a glance
Problem · Visitors had questions about a content-rich website and needed a way to reach the right pages and examples.
Approach · Use the existing Astro and Cloudflare Worker architecture to interpret the question, retrieve relevant approved knowledge and validate generated answers against their sources.
My role · I set the product direction, source policy and acceptance criteria, then directed and reviewed the AI-assisted implementation, hosted testing and release.
Observed hosted evaluation · 110 cases passed, comprising 86 supported answers and 24 appropriate abstentions. The scored benchmark included one focused retest after an answer-selection fix.
The gap between a question and the site structure
Visitors often know what information they need but not where to find it. They may be researching products, comparing solutions, examining results or looking for specific technical information. Traditional navigation and keyword-based search require familiarity with the website and its terminology. I designed an AI-powered search experience to make relevant information easier to discover.
I wanted a visitor to ask a question in natural language, read a useful answer and follow the links to relevant work. The design distinguishes documented facts, observed results, proposed approaches and questions the available approved knowledge cannot support.
How to build a reliable AI search knowledge base
Index approved website content, associate published passages with verifiable source anchors and maintain a reviewed knowledge catalogue with the necessary qualifiers. Keep private source records protected and allow only approved information to support public answers.
The search system draws from approved website content, documented capabilities and supporting resources. Each published passage points to an anchor and a canonical page. A separate reviewed statement catalogue records what can be said, its supporting information and any qualifiers the answer needs to retain. Knowledge approval governs which information enters that catalogue.
Retrieval finds relevant passages and the statement catalogue defines which claims can use them. Historical results retain their original time period, population and measurement scope.
Choosing an architecture that fits the project
Rather than introduce additional tools and unnecessary complexity, I chose to leverage the website’s existing infrastructure and published content. This allowed the search experience to evolve alongside the website, making it easier to expand its knowledge, maintain the system and validate the accuracy of its responses.
The Worker retrieves the approved facts that fit the question, then passes matched public terms and reviewed statements to GPT-OSS 20B. The model can generate concise prose tied to claim IDs. The Worker requires complete factual coverage, validates rephrasing against the cited statement and resolves public source links. It uses reviewed prose when model output is unsupported, late or unavailable.
How does AI website search retrieve and cite reliable answers?
The Worker checks and rate-limits each request before interpreting its intent. Questions are routed to the knowledge sources most relevant to the information being requested. Required claims retain their units, historical context and limitations. A question without sufficient approved information gets a direct explanation and a way to keep browsing.
The current answer appears directly below the question area, with inline source links and relevant follow-ups. The interface displays a case card only when the answer cites that case. A preloaded example shows the experience without an inference call.
The application keeps raw questions out of analytics, diagnostic logs and model input. A visitor’s browser tab holds the visible conversation, while the Worker uses a short list of published source IDs for follow-ups. The same-origin request, rate limits and bounded inference keep the service within the existing serverless architecture.
How to evaluate an AI search system for answer quality
Evaluate the full request path using realistic supported questions, cross-topic questions and requests that should be declined. Check answer coverage, factual and citation accuracy, fallback behaviour and end-to-end latency separately; a safe abstention is not the same as a useful supported answer.
The initial evaluation covered supported technical questions, questions that span cases and unsupported requests. After the published content expanded, I rebuilt the index from the live pages and their citation anchors. The hosted checks measured the full request path through retrieval, inference and validation.
The initial hosted benchmark and focused retests passed 40 cases, including 31 supported answers and nine appropriate abstentions. That release indexed 266 passages and 59 reviewed statements across 17 pages. Its median end-to-end response time was 3.86 seconds and its p95 was 9.68 seconds. These results describe that hosted test set.
Why can an AI search system miss relevant questions?
Early testing exposed a gap in query intent. A question about experience in a particular discipline initially returned an unrelated project. The revised approach prioritizes relevant knowledge sources, distinguishes broad questions from more specific requests and directs visitors to information that supports the answer.
The expanded benchmark used 279 passages and 84 reviewed statements from 17 public pages. It included additional questions about professional background, typos, technology usage, consulting, follow-up questions and unsupported requests. The hosted run plus its focused retest produced 86 complete answers and 24 appropriate abstentions. The Worker accepted 68 model responses, including 19 with revised wording, and used the reviewed fallback on the other 18 supported questions. Median observed end-to-end latency was 3.86 seconds and p95 was 7.46 seconds.
See how I organize information around buyer decisions.
Learn from questions outside the original test set
A reliable AI search system needs to measure whether it can answer the questions its audience actually asks, not only whether it avoids unsupported claims. Post-launch testing revealed that legitimate questions could remain unanswered even when relevant information existed within the website. Variations in terminology, phrasing and conversational context exposed gaps between the available knowledge and natural-language queries.
The subsequent implementation strengthened entity recognition, intent matching, knowledge coverage and conversational continuity. The approved knowledge base was expanded to support more specific questions about capabilities, technologies and practical applications. Private supporting records remain protected, while approved knowledge can support public answers. When precise information is unavailable, the system provides what can be supported and communicates the limitation rather than generating an unsupported answer.
Evaluate the complete search experience
Evaluate realistic audience questions, alternative terminology, typos, multi-part requests, conversational follow-up questions, citation accuracy, useful partial answers and information privacy. An appropriate abstention is still a success for a confidential or genuinely unsupported request; an unnecessary abstention on a legitimate question is an opportunity to improve coverage. Compare model options only after checking knowledge and retrieval using the same evaluation set and criteria.
The expanded hosted evaluation described above tested the preceding staging snapshot. The subsequent November 2026 release recorded 19 public pages, 336 passages and 97 reviewed statements; the refreshed index was checked with 110 local scenarios and four hosted production queries. These are distinct validation scopes, not another full hosted benchmark. A later local evaluation of 60 recruiter and prospective-client questions returned 41 fully supported answers, 15 qualified partial answers, one clarification and three appropriate abstentions, with no incorrect or irrelevant answers or citation integrity failures in that test set. This evaluation used reviewed answers locally, not hosted model inference. The subsequent production release indexed 422 passages across 20 public pages and contained 153 reviewed statements. These counts describe that release; they do not constitute a new hosted benchmark.
What this means for organizations
A similar approach can help a content-rich business connect customers to product guidance, documentation, support resources or technical case studies. Start with the approved source material, define what a useful answer must support and measure the full request path with realistic questions. Keep people responsible for reviewing claims, approving disclosures and resolving ambiguous results.
Related reading covers AI workflow integration, AI search visibility, repeatable reporting and human-coordinated AI workflows.
The reporting foundation uses a separate, private path for measuring website performance.
Have a website with information customers struggle to find? Discuss how an AI-powered search experience could fit your content, technology and business objectives.