ai newsDo., 29. Okt.
EilmeldungWabi reels in $55M for its consumer-focused AI assistant

How to Add an AI Chatbot to Your Website (Grounded in Your Own Content)

Most website chatbots fail the same way: they sound confident and get your hours, services or policies wrong. A chatbot is only useful if it answers from your content and admits when it doesn't know. I built HeshBot , the assistant on my own site, to work exactly that way. Here's what a site assist

dev.toDonnerstag 22:19 · 29.10.2 Min. Lesezeit
Bild: dev.to

Posted on Oct 29 • Originally published at trevorheshka.com

Most website chatbots fail the same way: they sound confident and get your hours, services or policies wrong. A chatbot is only useful if it answers from your content and admits when it doesn't know.

I built HeshBot, the assistant on my own site, to work exactly that way. Here's what a site assistant actually needs, using HeshBot as the worked example.

Behind the widget is a single PHP 7.4 endpoint that runs on ordinary shared hosting. It receives a question, adds the right context from your content, calls the model, and returns the answer. Because it runs on your server, the API key stays on your server too, stored outside the web root where a browser can't reach it.

This is what makes an assistant grounded. HeshBot uses a Python build script that reads the site's public pages and turns them into a knowledge file. That's a small piece of workflow automation: when the site changes, re-run the script and the assistant knows about the change.

The rule is simple: the assistant answers only from that knowledge file. If the answer isn't there, it says so and points the visitor to the contact details instead of guessing.

HeshBot runs on HeshLLM:20B, a model I build and fine-tune myself. For other projects, a hosted frontier LLM API can be the better fit. Either way, grounding matters more than model size: a well-grounded assistant on a fine-tuned model beats a giant model that's allowed to make things up.

A public chat box is an open door, so it needs locks. HeshBot uses:

Those come from 25+ years in technical support and my Google Cybersecurity certificate training: assume someone will try to misuse it, and plan for that from day one.

Open the chat on trevorheshka.com/heshbot/ and ask about my services or projects. For the build story, read how HeshBot was built. The code is open source under the MIT licence: github.com/YardPhantom/HeshBot.

For a business, the same approach works on your own pages, FAQs and documents: an assistant grounded only in your content, so it doesn't make things up, with the same guardrails, on your hosting. See HeshBot for business and AI chatbots in BC.

I'm based in Nanaimo on Vancouver Island and work remotely across BC and Canada. Email me for a quote.

Originally published at trevorheshka.com.

Quelle: dev.to (dev.to). Original öffnen