Knowledge Bases (RAG)
Create knowledge bases from documents and use retrieval-augmented generation in workflows.
Knowledge Bases let you upload documents and use their content as context in AI workflows through Retrieval-Augmented Generation (RAG). Documents are split into chunks, embedded, and searched by semantic similarity at execution time.
Creating a Knowledge Base
Knowledge bases are created at the organization level (requires OWNER or ADMIN role):
- Go to Settings → Knowledge Bases.
- Click Create Knowledge Base.
- Fill in Name, an optional Description, and pick an Embedding Model.
- Optionally tune Chunk Size and Chunk Overlap (defaults work well for most documents).
- Assign the knowledge base to the workspaces that should use it - either during creation or later via Settings → Workspaces → Edit.
Like AI providers and MCP servers, a knowledge base is only visible inside workspaces it has been assigned to.
Note: chunk settings apply to documents processed after the change. Changing Chunk Size or Overlap does not re-index existing documents - re-upload them if you want the new settings applied.
Embeddings and keys
Available embedding models: OpenAI text-embedding-3-small / text-embedding-3-large and Google gemini-embedding-001.
- With your own provider key (configured in Settings → AI Providers): embeddings are billed directly by the provider, with no FlowTrux-side budget.
- Without your own key: FlowTrux embeds documents using platform keys, against a monthly embedding token budget included in your plan. When the budget runs out, processing stops with a clear error and the document is marked Failed - add your own OpenAI/Google key or wait for the monthly reset.
Uploading documents
Supported formats: .txt, .md, .pdf, .json, .csv, .docx, .pptx, .xlsx, .odt, .odp, .ods, .rtf.
For PDF files only the text layer is extracted - scanned PDFs without a text layer produce no searchable content.
Each document goes through processing statuses: Pending (uploaded, queued) → Processing (chunking + embedding) → Ready (searchable). If parsing or embedding fails, the document shows Failed with the reason - fix the cause and re-upload.
Limits on the number of knowledge bases, documents per knowledge base, file size, and total storage depend on your plan - check Settings → Usage.
Using in Workflows
Agent Node (Recommended)
Add Knowledge Bases to an Agent node's Knowledge Bases (RAG) section. Relevant document chunks are retrieved and automatically injected into the prompt before the LLM call - no template variables needed.
Configure per-agent:
- Top K - number of chunks to retrieve (1-50, default 5)
- Score Threshold - minimum similarity score (0-1, default 0.7)
See Agent Nodes for the full agent configuration.
RAG Action Node
Use an Action node with type RAG for standalone search: pick a knowledge base, set the search query (template variables supported, e.g. {{trigger.data.question}}), and optionally Top K / Score Threshold (default threshold for the action is 0.3 - looser than the agent default, so it returns more matches).
The node returns the matched chunks as structured data for downstream nodes - useful when you need search results as data rather than as agent context.
Template Variables
Agent RAG context is injected automatically - no template variables needed.
The RAG action's output is an array of matched chunks in output.response. Each chunk has content (the text), score (similarity, 0-1), plus identifiers like documentId and knowledgeBaseName:
{{steps.rag-1.output.response}}
{{steps.rag-1.output.response[0].content}}
{{steps.rag-1.output.response[0].score}}