Knowledge Base (RAG)
Upload your documents and let agents search them using Retrieval-Augmented Generation (RAG). Ground AI responses in your actual data instead of relying on the model's training data.
What is RAG?
RAG (Retrieval-Augmented Generation) is a technique where the AI searches your documents for relevant information before generating a response. This means your agent can answer questions using YOUR data — product docs, company policies, FAQ articles, etc.
Set Up via Dashboard
Open Knowledge Tab
Click 'Knowledge' in the dashboard sidebar.
Create a Collection
Click 'Create Collection' and give it a name (e.g., 'product-docs').
Upload Documents
Upload PDF, TXT, MD, or CSV files. Fluxgate auto-chunks and embeds them.
Wait for Processing
Documents are chunked, embedded, and indexed. This takes a few seconds per document.
Link to Agent
Go to the Agents tab, edit your agent, and link this knowledge collection.
Test It
Run the agent with a question about your documents. It will search the knowledge base automatically.
Upload via API
# Create a collection
curl -X POST http://localhost:8000/api/v1/knowledge/collections \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{ "name": "product-docs", "description": "Product documentation" }'
# Upload a document
curl -X POST http://localhost:8000/api/v1/knowledge/collections/COLLECTION_ID/documents \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@/path/to/document.pdf" \
-F "metadata={"source":"product-docs"}"
# Search the knowledge base
curl -X POST http://localhost:8000/api/v1/knowledge/search \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{ "query": "return policy", "collection_id": "COLLECTION_ID", "limit": 5 }'Best document types for RAG
FAQs, product manuals, policy documents, and support articles work best. Keep documents focused on specific topics for better search accuracy.