Using Knowledge Nodes
Embed documents into or query from your knowledge base using knowledge nodes.
Overview
A Knowledge node lets a workflow interact with a Spojit knowledge collection. It runs in one of two modes: Embed, which adds a document to a collection so it can be retrieved later, and Query, which performs a semantic search against a collection and returns the most relevant chunks.
Knowledge nodes are the bridge between unstructured content (PDFs, web pages, transcripts) and the rest of your workflow. Use them when an agent or downstream step needs grounded context that lives in your own documents rather than in a structured connector like Shopify or Salesforce.
Before You Start
- You need at least one collection in your workspace. See Creating a Knowledge Collection.
- For Embed mode, the source document or text must already be available on the canvas (from a trigger, a connector step, or an earlier transform).
Modes
- Embed - chunks the supplied document, generates embeddings, and stores them in the chosen
collection. Supported inputs include PDF, CSV, JSON, HTML, plain text, Markdown, Word, Excel, PowerPoint, email files, and common image types. - Query - takes a natural language
queryand returns the top matching chunks from the chosencollection. Useful for grounding an agent answer or pulling reference data into a later step.
Configuration
- Mode -
EmbedorQuery. - Collection - the target knowledge collection in your workspace. Pick a persistent collection from the dropdown, or select Transient to create a single-run collection that is automatically cleaned up when the workflow completes (ideal for one-off document processing where you embed, query, and discard).
- Content (Embed) - the document body, file reference, or URL to ingest.
- Query (Query) - the natural language search string, usually a template expression like
{{ input.question }}. - Top K (Query) - how many chunks to return. Default is a small number; increase only if downstream prompts genuinely need more context.
- Response schema (Query) - optional structured shape for the result so later steps can read named fields.
Transient Collections
Select Transient in the Collection dropdown for workflows that need to process a document once and throw it away. Every Knowledge node in the same run that selects Transient shares the same single-run collection, so you can Embed a PDF in one step and Query it in the next without ever creating a persistent collection. Transient mode skips the file name and embedding model fields - sensible defaults are used.
This is the right mode for invoice extraction, emailed PO parsing, contract redlines on submission, or anything where the document is per-run and shouldn't pollute a shared collection. See How to Create NetSuite Sales Orders from Emailed PO PDFs for a worked example.
Usage Examples
- FAQ assistant - a webhook trigger receives a question, a Knowledge node in Query mode pulls supporting snippets from a
policiescollection, and a Connector node in Agent mode drafts the answer. - Document intake - an Email trigger receives an invoice, a Transform node extracts the body, and a Knowledge node in Embed mode files it into an
invoicescollection for later search.
Tips
- Keep collections focused. A single collection per domain (policies, product docs, invoices) gives much better retrieval than one giant collection.
- Phrase queries the way a user would ask, not the way a SQL filter would read. The retriever is semantic, not keyword based.
- When feeding results into an agent, pass the retrieved chunks through a Transform node first to strip noise and keep the prompt small.
Common Pitfalls
- Embedding the same document repeatedly creates duplicate chunks and skews retrieval. Track what you have already ingested.
- Querying an empty or wrong collection returns nothing useful. Confirm the collection name in the dropdown matches where the documents actually live.
- Very large Top K values bloat downstream prompts and slow agent steps without improving answers.
Related Articles
- Introduction to the Knowledge Base
- Creating a Knowledge Collection
- Uploading Documents to a Collection
- Querying Your Knowledge Base
- Using Connector Nodes in Agent Mode