Give Your Bot Knowledge
Out of the box, a bot reasons from the model's general knowledge. To make it answer from your content — product docs, FAQs, policies — attach a knowledge base.
1. Create a knowledge base
Go to Knowledge in the dashboard and click New Base. Give it a name that reflects its contents (e.g. "Product FAQ").
2. Upload your documents
Add PDFs, text files, Markdown, CSVs, or JSON docs. Bothive extracts readable text, splits it into searchable chunks, and indexes it so a bot can retrieve the most relevant passages at answer time (retrieval-augmented generation).
For PDFs:
- Open Knowledge.
- Pick a base.
- Click Upload PDF/docs.
- Choose a searchable PDF under 15MB.
- Wait for the success toast showing how many chunks were indexed.
If upload says the PDF has no readable text, it is probably scanned/image-only. Export it with OCR first, then upload again.
3. Attach it to a bot
In the bot's settings, select the knowledge base. Now when a user asks something covered by your docs, the bot pulls the relevant context and answers from it — with far fewer hallucinations.
4. Search it from HiveLang
You can also search a knowledge base explicitly as a capability:
hivelangbot Support { instructions { Answer product questions using our documentation. } capabilities { knowledge.search } on user.message { call knowledge.search with { query: input } as context call ai.generate with { prompt: "Answer using this context: " + context + "\n\nQuestion: " + input } as answer respond with answer } }
Tips
- Keep bases focused — one topic per base retrieves more accurately than one giant catch-all.
- Re-upload when your docs change; the index reflects what you've uploaded.
Next steps
- Build your first bot — attach a base to a new bot.
- Connect your own API — for live data instead of static docs.
Use the test pane to iterate quickly. Every change you make is live — no need to save first.
API keys are shown only once. Store them securely and never commit them to version control.
Test your bot with edge cases before deployment. Try empty inputs, long messages, and special characters.
Chain multiple specialized bots in a workflow for better results than one general-purpose bot.