Return to Feed
Tutorials2026-09-02

How to Build an AI Knowledge Base Agent for Your UK Service Business

UK knowledge workers lose five hours a week searching for information. An AI knowledge base agent answers instantly, cites sources, and routes the gaps. Here's how to build one in n8n and Claude.

<p class="lead">The average UK knowledge worker spends nearly five hours a week searching for information — internal policies, client SOPs, onboarding materials, pricing guides, past project notes. Most of that time goes to digging through shared drives, pinging colleagues on Slack, or re-reading documents they have seen before but cannot locate again. An AI knowledge base agent ends that. It sits on top of your existing documents, answers questions in seconds, cites its sources, and routes the gaps to the right person when it cannot find the answer. Here is how to build one for your UK service business, step by step.</p> <figure> <img src="https://images.unsplash.com/photo-1481627834876-b7833e8f5570?w=1200&q=80" alt="AI knowledge base agent for UK service businesses — turning company documents, SOPs, and client notes into an instantly searchable AI-powered question-answering system" width="1200" height="630" loading="lazy" /> </figure> <h2>Why a Shared Drive Is Not a Knowledge Base</h2> <figure> <img src="https://images.unsplash.com/photo-1497366216548-37526070297c?w=1200&q=80" alt="Shared drive versus AI knowledge base — UK service businesses lose five hours per employee per week to information search, a problem an AI knowledge base agent solves instantly" width="1200" height="800" loading="lazy" /> </figure> <p>A shared Google Drive or SharePoint folder is a storage system, not a knowledge system. The distinction matters more than most businesses realise. A storage system keeps files. A knowledge system lets you retrieve answers. The gap between them is where most of the five weekly lost hours per employee actually go.</p> <p>The typical shared drive has three problems. First, information is buried in filenames — you only find the right document if you already know what it is called. Second, knowledge is locked inside documents rather than being surfaced at the point of need. Third, there is no way to know when you are looking at the current version versus a document that was updated six months ago. A consultant joins your firm, asks where to find the onboarding checklist, and someone Slacks them a link that turns out to be a 2023 version. That is a knowledge system failure, not a Slack failure.</p> <p>McKinsey put the cost at 1.8 hours per employee per day. For a ten-person firm, that is 18 hours of productivity lost every day — nearly half an employee's working time, every week, to information retrieval that an AI agent could handle in seconds. The business case does not require sophisticated modelling. It requires honest time tracking.</p> <blockquote><p>A shared drive keeps your documents organised. An AI knowledge base keeps your team effective. They are different tools solving different problems — and only one of them scales as your team and document library grows.</p></blockquote> <p>The AI knowledge base agent is not a chatbot bolted onto Google Drive. It is a retrieval-augmented generation system — a vector database containing embeddings of your actual documents, connected to a language model that can answer questions against them, cite sources, and flag uncertainty. The <a href="/blog/rag-architecture-guide-uk-businesses">RAG architecture guide</a> covers the technical foundation in full. This post covers the practical build.</p> <h2>What Your AI Knowledge Base Agent Needs to Do</h2> <p>Before writing a single line of workflow, define the four jobs your agent needs to perform. Skipping this step produces a system that works in demos and fails in daily use.</p> <p><strong>Job one: answer accurately.</strong> This means retrieving the right source document, extracting the relevant passage, and returning an answer that is grounded in that source — not a plausible-sounding hallucination. Every answer the agent returns must be traceable to a specific document and section. If the agent cannot find a reliable answer, it must say so — not guess.</p> <p><strong>Job two: cite sources.</strong> Users need to be able to verify answers and read the full context when they want more detail. An agent that gives answers without citations creates trust problems the moment it gets something wrong. Include the document name, section heading, and a direct link to the source file in every response.</p> <p><strong>Job three: route gaps.</strong> Some questions will not have answers in your knowledge base — new processes not yet documented, edge cases, genuinely ambiguous situations. Your agent needs to know when it does not know, and route those questions to the right human rather than fabricating an answer. This is the <a href="/blog/human-in-the-loop-ai-agents-uk">human-in-the-loop pattern</a> applied to knowledge retrieval.</p> <p><strong>Job four: learn from gaps.</strong> Every unanswered question is a documentation gap. Your agent should log questions it could not answer to a shared document or task list, so your team can update the knowledge base to close the gap over time. This is the feedback loop that makes the system better with use rather than static.</p> <h2>Building the AI Knowledge Base Agent: The Four-Step Process</h2> <figure> <img src="https://images.unsplash.com/photo-1518770660439-4636190af475?w=1200&q=80" alt="Step-by-step architecture for building an AI knowledge base agent — document chunking, vector embeddings in Pinecone, n8n retrieval workflow, and Claude as the answering model" width="1200" height="800" loading="lazy" /> </figure> <h3>Step 1: Gather and Chunk Your Documents</h3> <p>Start with your highest-value documents. For most UK service businesses, these fall into five categories: service delivery SOPs, client onboarding guides, pricing and proposal templates, compliance checklists, and past project case notes. You do not need to load everything at once — start with the 20 documents your team references most often and expand from there.</p> <p>Once gathered, your documents need to be chunked — split into passages of roughly 300 to 500 words that can be individually retrieved. The right chunking strategy depends on your document types. Structured documents like SOPs and checklists chunk well by section heading. Long narrative documents like case studies and proposals chunk better by paragraph with a 50-word overlap between chunks to preserve context at boundaries. Avoid chunks smaller than 150 words — they lose context — or larger than 600 — they dilute retrieval precision.</p> <h3>Step 2: Build the Vector Store</h3> <p>Each chunk is converted to a vector embedding — a numerical representation of its meaning — and stored in a vector database. The embedding model converts text into a high-dimensional vector such that semantically similar passages end up close together in that space. When a user asks a question, the question is also converted to a vector and the system retrieves the chunks nearest to it.</p> <p>For most UK service businesses, Pinecone or Supabase's pgvector extension are the right choices for the vector store. Pinecone starts free and scales without infrastructure work; pgvector is a better choice if you are already on Supabase or want to keep everything in one database. OpenAI's text-embedding-3-small model is inexpensive and produces strong results for business documents — roughly £0.02 per million tokens, meaning a 100-document knowledge base costs under £1 to embed initially.</p> <p>In n8n, the Embeddings OpenAI node handles the embedding step. Connect it to your document chunks and point it at your vector store using the Pinecone or Supabase n8n nodes. Run this once to load your initial documents, then build a secondary workflow that re-embeds any document whenever it is updated in Google Drive — triggered by a Google Drive webhook following the <a href="/blog/event-driven-ai-agents-webhook-architecture">event-driven pattern</a>.</p> <h3>Step 3: Build the Query and Answer Workflow</h3> <p>The query workflow has four nodes. A Webhook or Slack trigger receives the user's question. An Embeddings node converts the question to a vector. A Pinecone or Supabase Query node retrieves the top five most relevant chunks. An AI Agent node — using Claude Sonnet as the model — receives those chunks and the original question, generates an answer grounded only in the retrieved content, and formats the response with the source document name and section.</p> <p>The system prompt for the AI Agent node is the most important part of the build. It needs three explicit instructions: only answer using the retrieved context, never invent information not present in the context, and if confidence is below a threshold, respond with an honest acknowledgement that the question needs a human answer and route accordingly. This is the difference between an agent that is useful and one that is dangerous. Test with questions you know are not in the knowledge base to verify the routing works before going live. The <a href="/blog/ai-agent-evaluation-framework">agent evaluation framework</a> gives you a structured way to do this systematically.</p> <h3>Step 4: Add Gap-Logging and Escalation</h3> <p>Add a confidence threshold check after the AI Agent node. A simple IF node evaluating whether the agent flagged low confidence routes to a separate branch: log the question text to a Google Sheet or Notion database labelled "Knowledge Gaps", send the user a Slack message acknowledging the gap and naming the human they should ask, and create a task in your project management tool for a team member to document the answer. Set a weekly recurring reminder to review the gap log and update documents accordingly. Most teams find that two or three sessions of documentation updates in the first month make the agent dramatically more effective than it was at launch.</p> <h2>Deploying to Slack and Measuring Success</h2> <figure> <img src="https://images.unsplash.com/photo-1460925895917-afdab827c52f?w=1200&q=80" alt="AI knowledge base agent performance statistics — 70% questions answered without escalation, five hours saved per employee per week, under £50 per month running cost for a ten-person UK service business" width="1200" height="800" loading="lazy" /> </figure> <p>The right delivery channel for most UK service businesses is Slack. Deploy your n8n workflow as a Slack slash command — your team types <code>/ask</code> followed by their question and the agent replies in-thread within ten to fifteen seconds. The in-thread format matters: it means the answer is attached to the conversation context, visible to everyone in the channel, and reviewable if someone wants to correct or supplement it.</p> <p>The metrics that tell you whether the agent is working are not complicated. Track four numbers in the first month:</p> <ul> <li><strong>Questions answered without escalation.</strong> Aim for 70% or above by week four. Below that, your knowledge base needs more content before it is ready for daily use.</li> <li><strong>Escalation response time.</strong> When questions go to humans, how long does it take to get an answer? This tells you whether the gap-routing is actually being acted on.</li> <li><strong>Gap log closure rate.</strong> What percentage of logged gaps are turned into knowledge base documents each week? A healthy rate is 80% within two weeks of the gap being logged.</li> <li><strong>Team usage rate.</strong> How many team members are actively using the <code>/ask</code> command each week? Adoption below 60% usually means the answers are not good enough or the delivery channel is wrong. Interview non-users before changing the system.</li> </ul> <p>The running cost is modest. Pinecone's free tier covers most early knowledge bases. The AI Agent node — using Claude Sonnet at roughly £0.003 per answer — costs around £15 to £25 per month for a ten-person team asking fifty questions a day. Total stack cost: under £50 per month. Time saved: two to four hours per person per week.</p> <figure> <img src="https://images.unsplash.com/photo-1573164574048-f968d7ee9f6b?w=1200&q=80" alt="AI knowledge base agent deployed in Slack — team members using the slash command to get instant cited answers from company documents, reducing internal information search time for UK service businesses" width="1200" height="800" loading="lazy" /> </figure> <blockquote><p>The knowledge base agent does not replace your team's expertise — it makes that expertise accessible to every person in your firm the moment they need it, not forty minutes later when someone gets back to their desk.</p></blockquote> <p>This is also one of the best first agents for UK service businesses to build because it has no external-facing risk. It answers internal questions using your own documents. The <a href="/blog/ai-knowledge-moat-uk-service-businesses">knowledge moat post</a> explains why this internal knowledge infrastructure is the hardest competitive advantage for rivals to copy — once your team's collective expertise is captured and queryable, it compounds with every new project, every new client, every new decision your team documents. Pair it with the <a href="/blog/rag-architecture-guide-uk-businesses">RAG architecture guide</a> for the deeper technical layer when you are ready to extend retrieval across multiple knowledge sources.</p> <p>If you want help designing the knowledge base architecture for your firm — or you have already built one and want a second opinion on the retrieval quality — <a href="/contact">get in touch</a>. We build and run AI operating systems for UK service businesses, and the knowledge layer is one of the highest-leverage places we see firms invest time in 2026.</p>
BOOK CALL