Portal Community

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.

What this node does: FlowRag provides managed knowledge base operations within BizFirst workflows. Insert knowledge documents (policies, FAQs, product descriptions, contract clauses) into named collections, keep them current with update and delete operations, and expose the collection to AI agents for semantic retrieval at query time. Supports Pinecone, Weaviate, Chroma, Qdrant, and pgvector as vector store providers.

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.

FieldRequiredDescription
providerNameRequiredVector store provider key. Supported values: pinecone, weaviate, chroma, qdrant, pgvector.
collectionNameRequiredThe collection or index name within the vector store where documents are stored. All items in a collection must use the same embedding model.
credentialIdOptionalCredential ID for the vector store API key or connection string, stored in the BizFirst Credentials Manager.
embeddingProviderOptionalLLM provider used to generate embeddings, e.g. openai. Defaults to the workspace-level embedding configuration.
embeddingCredentialIdOptionalCredential ID for the embedding model API key, if different from the vector store credential.
embeddingModelOptionalEmbedding model identifier, e.g. text-embedding-3-small, text-embedding-3-large. Must be consistent across all items in a collection.

Vector Store Providers

ProviderConfig ValueBest ForConsiderations
PineconepineconeManaged cloud vector DB, production RAG at scaleFully managed; requires Pinecone account and API key
WeaviateweaviateSchema-rich vector store with built-in modulesSelf-hosted or cloud; strong metadata filtering
ChromachromaLightweight, developer-friendly, local or cloudGood for prototyping; scales less than Qdrant/Pinecone
QdrantqdrantHigh-performance, rich payload filteringSelf-hosted or Qdrant Cloud; REST + gRPC APIs
PostgreSQL pgvectorpgvectorTeams already running PostgreSQLRequires pgvector extension; performance degrades beyond ~10M vectors

When to Use

Embedding Model Selection

ModelProviderDimensionsBest For
text-embedding-3-smallOpenAI1536Default — excellent balance of quality and cost for general business content
text-embedding-3-largeOpenAI3072Highest accuracy for technical, legal, or scientific content where precision matters
text-embedding-ada-002OpenAI (legacy)1536Legacy compatibility only — prefer text-embedding-3-small for new collections
Embedding model consistency: All documents in a collection must use the same embedding model. Mixing models produces invalid similarity scores at query time. To change the model, delete all items and re-insert with the new model.

Knowledge Base Design Tips

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

  1. Content trigger — CMS publishes or updates a document
  2. FlowRag knowledge/insert — embed the document and store in the appropriate collection
  3. Store knowledgeId — save the returned GUID to the CMS record for future update/delete
  4. Query time — user submits a question via a form or chat trigger
  5. FlowAiAgent or AI Chat — retrieves relevant chunks from FlowRag (via tool call), uses context to generate a grounded response
  6. Response — returns the AI answer with citations from the source metadata field