Content types
Size limits
Files above these limits are rejected with a 400 error. For larger source material, split into smaller documents before uploading — smaller focused docs also retrieve better than one big file.
Uploading a file via API
Upload a single document to an existing Knowledge Base using itskbId:
Adding plain text
Plain text lives inline in the KB — no file is created. Best for FAQs, scripted responses, or short reference content you want to control word-for-word. Add plain text in the Studio’s Knowledge Base editor.Prefer plain text when the content is short and you want precise wording. Prefer file uploads when the content is long, already lives in a document, or needs to survive versioning outside TruGen.
Adding a URL or website
Point the Studio’s URL input at a webpage and TruGen fetches, cleans, and indexes it. You can either:- Add a single URL — fetches and indexes just that page
- Crawl a root URL — walks the site and indexes every reachable page under that root
URL and crawl support is currently a Studio feature. If you need to add URLs programmatically at scale, contact support@trugen.ai.
How content is processed
Every piece of content passes through the same pipeline:1
Extract
Text is pulled from the file, page, or plain-text input. Layout, images, and formatting are stripped down to the underlying content.
2
Clean
Boilerplate (nav, footers, page numbers) and low-signal noise are removed.
3
Chunk
The document is split into semantically coherent chunks sized for embedding retrieval.
4
Index
Each chunk is embedded and stored in the vector index. Once indexed, the content is searchable by any agent the KB is attached to.
Removing a document
Delete a specific document from a KB by itsdocId:
Best practices
- Clean text beats fancy PDFs. PDFs with unusual layouts, multi-column pages, or footnotes retrieve poorly. Convert to Markdown or a clean PDF export when you can.
- Split large documents. A 100-page master PDF retrieves worse than 10 well-scoped 10-page documents.
- Use descriptive filenames.
hr-leave-policy-2026.pdfbeatsdocument-final-v2.pdf. Filenames show up in retrieval reasoning. - Re-upload changed docs rather than editing. Delete the old version, upload the new one. Cleaner than trying to overwrite in place.
Next steps
Attaching to Agents
Wire your Knowledge Base to one or many agents.
Creating a Knowledge Base
Back to the setup guide.