Overview
CrewForm’s Knowledge Base enables Retrieval-Augmented Generation (RAG) — upload documents, and agents automatically search relevant content when answering questions or completing tasks.How It Works
- Upload documents to the Knowledge Base
- CrewForm automatically chunks the text and generates vector embeddings
- Enable the
knowledge_searchtool on your agents - During task execution, agents semantically search the knowledge base for relevant context
Supported File Types
| Format | Extension | Description |
|---|---|---|
| Plain Text | .txt | Raw text files |
| Markdown | .md | Markdown documents |
| CSV | .csv | Tabular data (rows become chunks) |
| JSON | .json | Structured data |
Uploading Documents
- Navigate to Knowledge Base from the sidebar
- Click Upload Document
- Select your file — upload begins automatically
- The document status progresses:
pending→processing→ready
- Extracts text content from the file
- Splits into chunks (optimized for retrieval quality)
- Generates vector embeddings using OpenAI’s
text-embedding-3-smallmodel (1536 dimensions) - Stores chunks with embeddings in pgvector for fast similarity search
Enabling Knowledge Search on Agents
- Open the agent’s configuration
- In the Tools section, enable
knowledge_search - Optionally restrict to specific documents via Knowledge Base IDs in the agent config
- Save — the agent can now search your documents during task execution
How Agents Use It
When an agent hasknowledge_search enabled, it can call:
Vector Search
CrewForm uses pgvector with cosine similarity for semantic search:- Embedding model: OpenAI
text-embedding-3-small(1536 dimensions) - Index type: IVFFlat (lists = 100) for fast approximate nearest-neighbor search
- Default top-K: 5 results
- Scope: Workspace-level (all documents in the workspace, or filtered by document IDs)
Managing Documents
From the Knowledge Base page you can:- View — See all uploaded documents with status, file size, and chunk count
- Delete — Remove a document and all its chunks (cascading delete)
- Monitor — Real-time status updates during processing
Database
The Knowledge Base uses two tables:| Table | Description |
|---|---|
knowledge_documents | Uploaded file metadata (name, size, status, chunk count) |
knowledge_chunks | Embedded text chunks with 1536-dim vectors |
match_knowledge_chunks function performs cosine similarity search.
