How Retrieval Works
TruGen supports two retrieval modes that control when and how the agent queries your Knowledge Base.Supported Content Types
Documents
Upload PDF or DOCX files. Content is extracted, chunked, and indexed automatically. Best for policies, manuals, product documentation, and structured reports.
Plain Text
Paste raw text directly. Best for FAQs, scripted responses, quick reference content, or any content you want to control precisely without uploading a file.
URL & Website
Provide a URL to scrape a single page, or crawl an entire website. TruGen fetches and indexes the content automatically. Best for public documentation, help centres, or product pages.
Getting Started
1
Open Knowledge Base
Go to app.trugen.ai and click Knowledge Base in the left panel under Configure.
2
Create a new Knowledge Base
Click Create New. Give it a clear Name and Description — these are used by the agent to decide when to query this Knowledge Base.
3
Add your content
Choose from three options:
- Add Files — upload a PDF or DOCX document
- Add Text — paste plain text directly
- Add URL — enter a webpage to scrape or a root URL to crawl the entire site
4
Wait for indexing
TruGen extracts, cleans, chunks, and indexes your content. Once complete, you can attach this Knowledge Base when creating or updating an agent.
The Name and Description fields are critical. The agent uses them to decide whether to query this Knowledge Base for a given question — be specific about what it contains and when it should be used.
Naming Your Knowledge Base
Good names and descriptions make a big difference in retrieval accuracy. Here’s an example:Via API
Create a Knowledge Base
Add a Document
Upload a file to an existing Knowledge Base using itsknowledge_base_id:
Replace
YOUR_API_KEY with your key from the Developer Portal and knowledge_base_id with the ID returned when you created the Knowledge Base.What’s Next?
Knowledge Base API Reference
Full set of endpoints to create, update, and manage Knowledge Bases programmatically.
Templates
Attach Knowledge Bases to a template so every agent inherits the right knowledge automatically.