‹ Blog / Artificial Intelligence

How We Built Our Website’s AI Search Feature: An Introduction to RAG

Dec 18th 2025

If you’ve ever wished your website’s search bar could understand your users, not just match keywords? At FL1 Digital, so did we, so we built it!

If you’ve ever wished your website’s search bar could understand your users, not just match keywords? You’re not alone.

At FL1 Digital, we wanted to create a smarter, faster, and more human-like search experience for our own site. So we built it.

Our new AI-powered search feature, built on a technique called Retrieval-Augmented Generation (RAG), now sits right in the banner of our homepage. It delivers conversational, relevant answers by understanding what users mean, not just what they type.

Here’s how we did it…

First off… what Is RAG (Retrieval-Augmented Generation)?

RAG, or Retrieval-Augmented Generation, is a powerful AI technique that merges two components:

  1. Retrieval: First, the system searches through a custom knowledge base to find relevant pieces of content.

  2. Generation: It then feeds that content into a language model (like ChatGPT) to generate a clear, natural-language response.

This approach gives you the best of both worlds, accurate, content-grounded responses powered by your own data, with the fluency and interactivity of a conversational AI.

Because the answers are grounded in your own website’s content, it’s ideal for sites with complex information, like e-commerce stores, online learning platforms, and knowledge hubs.

How Our RAG Search System Works

We integrated the RAG architecture directly into our WordPress site using a custom-built tech stack designed for performance and flexibility. Here’s how each part works:

Frontend: A React Component in the Homepage Banner

At the heart of the experience is a React component placed in the homepage banner. This component provides a clean, friendly prompt box where users can type natural-language questions.

When a user submits a query, the React app sends the input, along with any conversation context to our backend API.

Backend: A Custom Python API

Our backend is written in Python and acts as the brain of the system. It performs the following:

  • Receives prompts from the frontend

  • Looks up related content from our vector database (using embeddings)

  • Sends that context to the ChatGPT API

  • Returns a generated answer that’s both relevant and conversational

ChromaDB: The Vector Database

We use ChromaDB as our vector store. It stores high-dimensional embeddings of all the content on our site, essentially, mathematical representations of meaning.

When a question comes in, ChromaDB is queried to find the most semantically relevant content (even if the user’s wording is different from the source material).

Our Custom WordPress Plugin: Crawling, Chunking, and Guardrails

To index our content, we built a custom WordPress plugin that does some heavy lifting:

  • Crawling & Chunking: The plugin regularly scans the website, breaks content into manageable “chunks,” and converts them into embeddings using OpenAI’s embedding model. This allows the system to understand and retrieve even long-form or complex content.

  • Indexing New Content: Whenever we add new blog posts, product pages, or resources, the plugin automatically reindexes the site, so the AI is always up-to-date.

  • Guardrails: One of the standout features of our plugin is the ability to set guardrails (rules that define what the AI can and cannot do). These include:

    • Instructions for how to handle sensitive or outdated content

    • Restrictions on certain data types or sources

    • Preprocessing rules for data cleanup and formatting

This makes the system both safe and customisable, especially important when you’re dealing with regulated content, legacy information, or diverse user needs.

Why Use RAG on a Website?

A RAG-based search feature can be a game-changer for websites with a lot of custom content. Here are a few ideal use cases:

  • Online Shops: Help customers find the right product based on needs, not just keywords.

  • Learning Platforms: Let users ask complex questions and get answers pulled from multiple courses or resources.

  • Knowledge Bases: Replace outdated FAQ systems with conversational search that understands context.

It makes your site more accessible, more engaging, and more useful, without requiring users to know exactly what they’re looking for.

Is AI Search a Good Fit for Your Website?

If your website has a large amount of content, a growing knowledge base, or simply needs a more intelligent way for users to interact, an AI-powered RAG search feature could be a perfect addition.

Want to explore what this could look like for your business?

Get in Touch to find out how we can build a custom AI search experience tailored to your website.