FlowTruxFlowTrux/Docs

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 fragments, and at run time the fragments closest in meaning to the question are found and handed to the AI.

Creating a Knowledge Base

Knowledge bases are created at the organization level (requires OWNER or ADMIN role):

  1. Open the Resources tab in the left panel and choose Knowledge Bases.
  2. Click Create Knowledge Base.
  3. Fill in Name, an optional Description, and pick an Embedding Model.
  4. Optionally tune Fragment size and Chunk Overlap (defaults work well for most documents).
  5. Assign the knowledge base to the workspaces that should use it - either during creation or later in the workspace's settings under Enabled resources.

Like AI providers and MCP servers, a knowledge base is only visible inside workspaces it has been assigned to.

Note: fragment settings apply to documents processed after the change. Changing Fragment size or Chunk Overlap does not re-process 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 Resources > AI Providers): embeddings are billed directly by the provider, with no FlowTrux-side budget.
  • Without your own key: FlowTrux embeds documents - and searches them - with the AI built into FlowTrux, paid from your organization's monthly AI credits (see Plans and Usage). When the credits are used up, processing stops with a clear error and the document is marked Failed - add your own OpenAI/Google key, wait for the monthly renewal, or have an Owner or Admin add a credit pack in Settings > Billing.

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, waiting) → Processing → 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.

Open a knowledge base and type a question into the search box ("Enter a search query...") to see which fragments it returns and their scores - a quick way to tune Top K and Score Threshold before using it in a workflow.

Using in Workflows

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}}