FlowRag
Manages a vector-based knowledge base for Retrieval-Augmented Generation (RAG). Ingest, update, and delete knowledge documents so that AI agents can retrieve relevant context at query time.
What is Retrieval-Augmented Generation (RAG)?
RAG is an AI pattern that enhances language model responses by first retrieving semantically relevant documents from a knowledge store, then including those documents as context in the AI prompt. This allows AI nodes to answer questions grounded in your specific, up-to-date business knowledge — rather than relying solely on model training data.
FlowRag handles the knowledge storage and management half of this pattern. It converts text into vector embeddings, stores them in a configured vector database, and keeps that knowledge base current through insert, update, and delete operations.
Supported Operations
knowledge/insert
Add a new document to a knowledge collection. The text is embedded and stored with optional filename and source metadata. Returns the assigned knowledgeId and chunk count.
knowledge/delete
Remove a document from a collection by its knowledgeId GUID. The embedding vectors and all associated chunks are permanently deleted from the vector store.
knowledge/update
Replace the content of an existing document. The old embedding is removed, the new content is re-embedded and stored. Returns the old and new knowledgeId values.
Connection Configuration
These fields are shared across all three operations and identify the vector store and collection to operate on.
| Field | Required | Description |
|---|---|---|
providerName | Required | Vector store provider key. Supported values: pinecone, weaviate, chroma, qdrant, pgvector. |
collectionName | Required | The collection or index name within the vector store where documents are stored. All items in a collection must use the same embedding model. |
credentialId | Optional | Credential ID for the vector store API key or connection string, stored in the BizFirst Credentials Manager. |
embeddingProvider | Optional | LLM provider used to generate embeddings, e.g. openai. Defaults to the workspace-level embedding configuration. |
embeddingCredentialId | Optional | Credential ID for the embedding model API key, if different from the vector store credential. |
embeddingModel | Optional | Embedding model identifier, e.g. text-embedding-3-small, text-embedding-3-large. Must be consistent across all items in a collection. |
Vector Store Providers
| Provider | Config Value | Best For | Considerations |
|---|---|---|---|
| Pinecone | pinecone | Managed cloud vector DB, production RAG at scale | Fully managed; requires Pinecone account and API key |
| Weaviate | weaviate | Schema-rich vector store with built-in modules | Self-hosted or cloud; strong metadata filtering |
| Chroma | chroma | Lightweight, developer-friendly, local or cloud | Good for prototyping; scales less than Qdrant/Pinecone |
| Qdrant | qdrant | High-performance, rich payload filtering | Self-hosted or Qdrant Cloud; REST + gRPC APIs |
| PostgreSQL pgvector | pgvector | Teams already running PostgreSQL | Requires pgvector extension; performance degrades beyond ~10M vectors |
When to Use
- Company policy Q&A bot: Insert HR, IT, and operations policies into FlowRag at publish time. When an employee asks a question, a downstream AI node retrieves the relevant policy sections as context.
- Customer support FAQ ingestion: Use
knowledge/insertin a workflow triggered whenever a new FAQ article is published in your CMS. Keep the knowledge base current automatically. - Document library maintenance: When a policy document is revised, call
knowledge/updateto replace the old embedding with fresh content — no re-index of the entire collection required. - Expired content cleanup: When a product is discontinued or a policy is retired, call
knowledge/deleteto prevent the AI from retrieving outdated information. - Bulk initial ingestion: Use a Loop node to iterate over a document array and call FlowRag
knowledge/inserton each item to seed a new knowledge collection.
Embedding Model Selection
| Model | Provider | Dimensions | Best For |
|---|---|---|---|
text-embedding-3-small | OpenAI | 1536 | Default — excellent balance of quality and cost for general business content |
text-embedding-3-large | OpenAI | 3072 | Highest accuracy for technical, legal, or scientific content where precision matters |
text-embedding-ada-002 | OpenAI (legacy) | 1536 | Legacy compatibility only — prefer text-embedding-3-small for new collections |
Knowledge Base Design Tips
- Split long documents into focused, single-topic chunks of 200–500 tokens before inserting — retrieval quality improves significantly with tightly scoped chunks
- Set the
sourcefield to the source URL or file path so downstream AI nodes can cite their sources in responses - Use the
fileNamefield consistently to enable targeted bulk operations (e.g. delete and re-insert all chunks from a specific file when the file changes) - Maintain separate collections per domain (HR, products, legal, support) for better retrieval precision and to avoid cross-domain noise
- Store the returned
knowledgeIdin your CMS or database record so you can reliably reference it for future update and delete operations
Combine with FlowAiAgent for Autonomous RAG
Register a FlowRag query as a tool in the BizFirst Tool Registry, then give it to a FlowAiAgent node. The agent will autonomously decide when to query the knowledge base — calling it multiple times with different queries if the first retrieval does not fully answer the goal. This enables knowledge-augmented agents that can both reason and retrieve without requiring you to hard-code which knowledge base to query at each step.
Common RAG Pipeline Pattern
- Content trigger — CMS publishes or updates a document
- FlowRag knowledge/insert — embed the document and store in the appropriate collection
- Store knowledgeId — save the returned GUID to the CMS record for future update/delete
- Query time — user submits a question via a form or chat trigger
- FlowAiAgent or AI Chat — retrieves relevant chunks from FlowRag (via tool call), uses context to generate a grounded response
- Response — returns the AI answer with citations from the
sourcemetadata field