Experiment · AI Agents

A support chatbot that answers only from an approved source

A webhook-driven agent that looks up an approved knowledge source before it answers, and says so when the source has no answer.

Problem

A general chatbot answers a customer question from whatever it absorbed in training. For a business that is a liability: the answer sounds right and may not match the company's own policy.

Objective

Build a first-line support agent that answers from an approved source and from nothing else.

Technology stack

n8n, Google Gemini, a lookup tool over an approved FAQ source, conversation memory, and a webhook for the chat interface.

Architecture

A webhook receives the question. The agent calls the lookup tool, reads what comes back, and composes a reply from it. A response node returns the reply to the chat interface.

A workflow canvas: a webhook, an AI agent with a model, memory and a lookup tool, and a response node
A grounded chatbot: a webhook in, an answer drawn from an approved source, a reply out.

Implementation

The system prompt tells the agent to answer only from the lookup result and to hand over to a person when the source does not cover the question. Memory keeps the thread of one conversation and is not shared between users.

Limitations

The agent is as good as the source. A gap or an out-of-date entry in the FAQ becomes a gap or a wrong answer in the chat. It handles first-line questions; anything involving an account or a decision goes to a person.

Lessons learned

Grounding is a behaviour you instruct and then test, with questions the source cannot answer. Maintaining the source is the ongoing work.

Not yet written up: costs, results. I add a section when I have measured it, and leave it out until then.

Weekly newsletter

The AI Brief by Clarence Cheang

A weekly exploration of the developments, technologies and ideas shaping artificial intelligence.

One email a week. Unsubscribe in one click. What is in each issue