---
title: "I Will build an AI agent or chatbot that answers from your own documents"
url: https://zinnhub.com/zinns/i-will-build-an-ai-agent-or-chatbot-that-answers-from-your-own-documents/
description: "An AI agent that answers only from your own documents, cites where each answer came from, and says it does not know instead of inventing something."
published: 2026-10-21T11:04:05+00:00
modified: 2026-10-21T11:04:05+00:00
language: en-GB
---

# I Will build an AI agent or chatbot that answers from your own documents

### The problem with most document chatbots

They are confident. Ask a question the documents do not answer and a naive system invents a plausible response, which is worse than no answer at all when the documents are contracts, policies or support procedures.

### What I build instead

Retrieval first, generation second. Your documents are chunked with structure preserved — headings stay attached to the paragraphs they introduce, tables are not shredded into meaningless fragments. Each chunk carries its source, page and section. Retrieval uses hybrid search: dense embeddings for meaning, keyword search for the exact identifiers that embeddings miss, such as part numbers, clause references and names.

The model is instructed to answer only from the retrieved passages, and to cite them. If retrieval returns nothing above a confidence threshold, the agent says so and offers to escalate. That behaviour is configurable, but it is the default because it is the behaviour that keeps you out of trouble.

### What you get

- Ingestion pipeline for PDF, DOCX, HTML and plain text, with re-indexing when documents change.
- A retrieval service with an evaluation set of real questions and measured accuracy, so quality is a number rather than an opinion.
- An interface: chat widget, API endpoint, or both.
- Logging of every question, the passages retrieved, and the answer — so mistakes can be traced.

### What I need

A sample of the documents, twenty real questions your users ask, and the answer you would give to each. Those twenty become the test suite that proves the agent works before you rely on it.

### Deployment

Runs on your infrastructure or in the cloud, with the model vendor interchangeable. If the documents cannot leave your network, I will plan for a local model instead.

### Turnaround and communication

The ingestion and retrieval layers are usually working against your documents inside a week, with the twenty-question evaluation set showing where accuracy stands before anything is exposed to users. I report the score rather than an impression, and every change to retrieval is measured against the same set so improvement is visible and regression is caught. If the documents are messier than expected, that is a finding you get in the first days, not at the end.
