---
title: "How we built a small town website chatbot | T10"
url: "https://t10.net/blog/how-we-built-asknbt10net-town-website-chatbot/"
description: "We wanted to get some real world experience building a RAG based chatbot, but using a data source out of our control. We chose our little town's website to…"
lastmod: "2025-11-02"
---

[Back to Insights](https://t10.net/blog/)

# How we built a small town website chatbot

T10 Consulting October 10, 2025 3 min read

We wanted to get some real-world experience building a RAG-based chatbot, but using a data source out of our control. We chose our little town's website to scrape and provide a simple web-based chatbot. Simple right..well..not that simple. We learned a lot about the limitations of vector databases and the importance of AI Agent instructions and garbage-in and garbage-out. Here is the overall architecture: ![image](https://t10.net/media/blog/blog-posts-asknb-asknb-high-arch.webp)

Here are the technologies we used:

1.  [n8n](https://n8n.io/) is a very popular workflow tool that has some excellent AI features included. It's open source and they offer a hosted version
2.  [Firecrawl](https://www.firecrawl.dev/) - we used this for crawling a website and converting it to markdown. It's also open source and they offer a hosted version
3.  [OpenAI](https://platform.openai.com/docs/guides/embeddings) for embeddings (OpenAI embeddings transform text into high-dimensional numerical vectors that encode semantic meaning, enabling applications such as text similarity analysis, clustering, classification, and semantic search)
4.  [Supabase](https://supabase.com/) for the vector store (switched from Pinecone)
5.  [LightRAG](https://lightrag.github.io/) for Knowledge Graph
6.  [Cohere's Reranker](https://docs.cohere.com/docs/rerank-overview) - used to rank the answers to get a better results
7.  [n8n's Ai Agent](https://n8n.io/ai-agents/) for responding to chat/prompts from the website
8.  [Cursor](https://cursor.com/) to build the website
9.  Hosted on [bare-metal.io](https://bare-metal.io/) virtual machine (4 vcpu, 12gb ram)

Seems like a lot eh? Orginally, I didn't think this would be very difficult after seeing some basic RAG videos on YouTube. What they don't tell you is scraping a random website out of your control can lead to very strange results. Here are some issues we ran into:

1.  Scraping with Firecrawl can get expensive so we chose to host it ourselves mostly to get through the dev/testing part
2.  Getting incorrect results on basic quesitons like "What are the transfer station hours?" (we'll go through this)
3.  Making sure the metadata is being collected per page. URL, page title,etc..
4.  AI Agent instructions - this probaby took the most work. Below is just the beginning, it took a lot of iterations to make sure this returns the best possible answer

> You are a helpful assistant for the town of New Boston, NH. Only return information you are authorized to provide from the Supabase Vector Store and the LightRag tool or conversation memory (context window of 5). Do NOT generate or infer answers not explicitly found in the vector store or in the LightRag tool or memory. Always prefer the answer from the LightRag tool

5.  CORS errors - Nobody talks about this but strict rules calling webhooks from one domain to another make it a challenge to get this all wired up.
6.  We only had the vector store at the beginning but noticed we were getting very inconsitant results on the same quesitons. We introduced LightRAG and that helped a lot.

Here are the two n8n workflows we used. One for scraping the data and inserting it into the vector and graph database and one to listen for chat requests from the website and return responses: ![image](https://t10.net/media/blog/blog-posts-asknb-asknb-scrape.webp) ![image](https://t10.net/media/blog/blog-posts-asknb-asknb-n8n-graphrag.webp) For the knowledge graph, we used LightRAG as it was easy to implement. There are some better solutions out there but this seemed to work fine. This graph was created by simply sending it markdown documents from the website. We couldn't load them all in as this can get rather expensive because you need to use an embedding LLM like OpenAI. ![image](https://t10.net/media/blog/blog-posts-asknb-kg1.webp) ![image](https://t10.net/media/blog/blog-posts-asknb-kg2.webp) Once we figured out how to wire this all up and get the Ai Agent instrucitons correct, we built a simple website using Cursor. We used simple design patterns outlined in videos like [this](https://youtu.be/uayt-IVbh8E?si=UzrHG9HpPRfXU__S) add after some prompt haggling, got something that looked good on desktop and mobile. ![image](https://t10.net/media/blog/blog-posts-asknb-asknb-page1.webp) We even added a dark mode: ![image](https://t10.net/media/blog/blog-posts-asknb-asknb-page2.webp) Here it is in action: ![image](https://t10.net/media/blog/blog-posts-asknb-asknb-chat1.webp) Here is a screenshot of when things go bad: ![image](https://t10.net/media/blog/blog-posts-asknb-asknb-bad-formatting.webp) This issue took a better model in Cursor instead of their "Auto" one. (used Grok code fast and it nailed it)

In conclusion, this was a great project to work on. Most of the RAG and GraphRAG examples you see out there are in very controlled environments where the data is a certain format and quality. In reality in any company, the data you are dealing with isn't going to be perfect so you need to add steps and other technologies to ensure your users get a great experience or they will doubt and mabye not even adopt what you have created.

Check out the site at: [AskNB.t10.net](https://asknb.t10.net/)

[Back to Insights](https://t10.net/blog/)

## About this post

Author

T10 Consulting

Published

Oct 10, 2025

Reading time

3 min

## Tags

-   rag
-   chatbot
-   ai agents
-   vector databases
-   web scraping
-   llms
-   n8n
-   firecrawl

## Related posts

-   [From Hype to Hard-Won Truth: Why Pure Vector RAG Fails at Scale (and What Actually Works)](https://t10.net/blog/from-hype-to-hard-won-truth-why-pure-vector-rag-fails-at-scale-and-what-actually-works/)Nov 17, 2025
-   [Demystifying Agentic AI: Architectures vs. Workflows](https://t10.net/blog/demystifying-agentic-ai-architectures-vs-workflows/)Oct 24, 2025
-   [Elevating Your AI Applications: Advanced Techniques for Retrieval-Augmented Generation](https://t10.net/blog/elevating-your-ai-applications-advanced-techniques-for-retrieval-augmented-generation/)Sep 14, 2025

## Want to see where AI fits in your week?

A free 30-minute planning call. Tell us how the week runs, and we'll say plainly which parts AI is good at and which it isn't.

[Book a planning call](https://t10.net/#book)[More insights](https://t10.net/blog/)
