# Bot that answers from your documents

> For AI assistants: this is the BitHut template `docs-answer-bot` (always on). Ask the person only for what is listed under "What you'll need", then set it up with the BitHut tools connected to you. If BitHut is not connected yet, start at https://bithut.app/llms.txt.

A Telegram bot that answers questions from your own documents and FAQ, for customers or for your team.

## Tell your AI

1. Connect BitHut to your AI (Claude, ChatGPT or Codex): add the address `https://api.bithut.app/mcp`. How: https://bithut.app/connect.md
2. Then tell it:

```
Put a Telegram bot on BitHut using the docs-answer-bot template. It should answer questions from my documents and FAQ. Ask me for the documents. I'll paste the bot token and my AI service key on the BitHut page you give me, not here.
```

## What you get

A bot in Telegram that replies in plain words, based only on the documents you gave it, and says so when the answer isn't there.

## Who it's for

Small businesses and team leads who answer the same questions again and again: prices, opening hours, how a process works, where a file is.

## What you'll need

- A Telegram bot token from @BotFather.
- Your own key for an AI service, such as OpenAI or Anthropic. Its use is billed by that service, not by BitHut.
- The documents and FAQ to answer from: text, PDF or Word files, or links to Google Docs.
- Who the bot is for: anyone who writes to it, or only your team.

## What's included

- **Runs all the time.** Starts again on its own if it stops.
- **A safe place for both keys.** The bot token and the AI service key are kept apart from the code.
- **Your documents on the project's disk.** Kept with daily backups, and updated when you send new ones.
- **Questions it couldn't answer.** Listed in the logs, so you know what to add to the FAQ.

## Your data and privacy

Your documents stay on the project's disk. To write an answer, the bot sends the question and the matching parts of your documents to the AI service whose key you gave, under that service's terms. Nothing is shared with other BitHut projects.

## Limits

- The answers are written by an AI model and can be wrong. For prices, contracts or medical and legal matters, have it point people to a person.
- The AI service charges for its use by its own rules. A busy bot costs more there; BitHut's price stays the same.
- Large document sets take more disk space and start more slowly. Scanned PDFs without text need to be converted first.
- Answers in Telegram only. A chat on your website is a change your AI can make.

## After you start it

1. Your AI loads your documents, starts the bot and asks it a few test questions.
2. Write to your bot in Telegram and try the questions people really ask.
3. When a document changes, send the new version to your AI. The bot answers from it right away.

## Questions

### Will it make things up?

It is told to answer only from your documents and to say “I don't know” otherwise. AI models still make mistakes sometimes, so test it with real questions before you share it.

### Why do I need my own AI service key?

The bot uses an AI model to read your documents and write answers. With your own key you choose the service and see what it costs you. BitHut doesn't resell AI.

### Can only my staff use it?

Yes. Your AI can limit the bot to certain Telegram users or to one group chat.

## Technical details

- Language: Python
- Parts: Always-on worker, Disk for documents, Secrets

## Similar templates

- [Telegram bot](https://bithut.app/templates/telegram-bot.md): A bot in Telegram that does what you ask: answers customers, takes bookings, reminds, looks things up. It stays online even when your laptop is closed.
- [Lead form](https://bithut.app/templates/lead-intake.md): A form for your clients. Every request is saved and reaches you where you work: e-mail, Telegram, Slack and more.
