How it works
The Knowledge node has two modes: Embed and Query. You typically use both in a workflow:- Embed a document (e.g., a PDF invoice fetched from an SFTP server); the node parses it, splits it into chunks, and stores the embeddings in a vector database.
- Query the embedded content; the node searches for relevant chunks and uses an AI model to extract or summarise the information you need.
Modes
Embed mode
In embed mode, the node takes a document as input, parses it using the appropriate document loader, splits it into chunks, and stores the vector embeddings. Configuration:
Supported document types:
Query mode
In query mode, the node searches the vector store for chunks relevant to your prompt, then uses an AI model to synthesise or extract information from those chunks. Configuration:Collections
Collections are workspace-scoped, so every workflow in your workspace shares the same collections. This means you can:- Embed a company policy document once and query it from any workflow
- Build up a collection over time by embedding new documents in each workflow run
- Share knowledge across different automations
Transient collections
For one-off document processing (where you embed, query, and discard), select Transient from the collection dropdown. Transient collections:- Are automatically created for each workflow run
- Are shared across all nodes in the same run that select “Transient”
- Are automatically cleaned up when the workflow completes (success or failure)
- Don’t require a file name or embedding model selection
Response Schema
In query mode, you can define a response schema to force the AI to return structured data instead of free-form text. This is useful when downstream nodes need to work with specific fields. The schema editor has two modes:- Visual: add properties with name, type, description, and required flags
- JSON: paste or edit raw JSON schema directly
Response schema is also available on Connector nodes in Agent mode. The same visual/JSON editor is used.
Embedding models
Two embedding models are available:
You can select the embedding model in the properties panel. If not set, the default model is used.
Examples
Extract invoice line items (transient)
A workflow that fetches a PDF invoice and extracts structured data without polluting a persistent collection:- Trigger (Manual or Webhook)
- Connector (SFTP, Direct mode): fetch the PDF file, output:
sftp_result - Knowledge (Embed mode)
- Collection: Transient
- Document Type: PDF
- Document Input:
{{ sftp_result.data.content }}
- Knowledge (Query mode)
- Collection: Transient
- Prompt:
Extract all line items with SKU, quantity, and unit price - Response Schema: define
productsarray withsku,quantity,pricefields - Output Variable:
invoice_data
Build a persistent knowledge base
Embed company documents once, then query them from any workflow: Workflow 1: Index documents (run once or on schedule):- Trigger (Schedule, weekly)
- Connector (SFTP/HTTP, Direct mode): fetch updated policy documents
- Knowledge (Embed mode)
- Collection:
company-policies - File Name:
{{ sftp_result.data.path }} - Document Type: PDF
- Collection:
- Trigger (Webhook, receives a question)
- Knowledge (Query mode)
- Collection:
company-policies - Prompt:
{{ trigger.question }} - Output Variable:
answer
- Collection:
- Connector (Slack, Agent mode): send the answer back
Tips
- Use transient collections for one-off processing. If you’re extracting data from a single document per run (invoices, receipts, forms), transient mode keeps your workspace clean.
- Use descriptive file names for persistent collections. Names like
{{ trigger.fileName }}orinvoice-2024-001.pdfhelp you identify documents in the collection grid. - Match your embedding models. Always use the same embedding model for embedding and querying the same collection.
- Start with specific prompts. Instead of “what’s in this document?”, try “extract all line items with quantities and prices as a JSON array”.
- Use response schemas for reliable downstream processing. When a Transform or Condition node needs specific fields, define a response schema to guarantee the structure.