knoten / builtin / ai / aiagents
Indexer
Splitting text into chunks and embedding them into a vector store
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
Save text from a workflow into a knowledge base, so agents can search it later.
What it does
Section titled “What it does”Indexer splits Input into chunks with the connected text splitter, then saves the chunks into the knowledge base connected to Knowledge. Each chunk is embedded with that knowledge base’s own embedding model.
With a Local Knowledge store, indexing the same source again updates it instead of adding a copy: its chunks are overwritten, and if the new text is shorter, the extra old chunks are removed. Empty chunks are skipped.
Indexer is an end point: it has no output port, so nothing runs after it on its branch.
When to use it
Section titled “When to use it”- Fill a knowledge base from a workflow: pages you scrape, files you load, results of an API call.
- Keep a knowledge base up to date on a schedule, by re-indexing the same pages.
To add files, pages or text by hand, use Add sources on the knowledge bases page instead. To ask questions about indexed content, use RAG Agent or Q&A Agent.
Inputs and settings
Section titled “Inputs and settings”| Einstellung | Typ | Was es bewirkt |
|---|---|---|
| Input (erforderlich) | Text | The input to index. |
| Source ID | Text | A stable id for this document. Indexing again with the same id updates it instead of adding a copy. Defaults to the source link or name, else to the text itself. |
| Source name | Text | Shown in citations and in the knowledge base source list. Indexing again with the same source name (or link) updates that source in place instead of adding a copy. |
| Source link | Text | Where the text comes from, linked from citations. |
Fill Input with an expression such as {{ $input.text }}.
A source is identified by its Source ID, else its Source link, else its Source name. With none of them, the text itself is the identity, so a changed text counts as a new source. When a workflow re-indexes the same pages, always set one of the three. Citations show Source name, or the link, or “Workflow input” when both are empty.
Outputs
Section titled “Outputs”This node has no output port: nothing runs after it on this branch.
Each output item has these fields:
| Field | Typ | What it holds |
|---|---|---|
| success | True/false | |
| chunks | Number | |
| added | Number | |
| updated | Number | |
| failed | Number | |
| removed | Number | |
| sourceId | Text |
{ "success": true, "chunks": 0, "added": 0, "updated": 0, "failed": 0, "removed": 0, "sourceId": "…"}The result is visible in the run data:
chunks: how many chunks the input was split into.addedandupdated: new chunks, and chunks that replaced the same source’s previous version.failed: chunks that could not be saved.successisfalsewhen any failed.removed: old chunks deleted because the source got shorter.sourceId: the source the chunks are stored under. Index again with the same id to update it.
After a run, the node on the canvas shows a badge such as 24 added · 3 updated. With a vector store other than Local Knowledge, chunks are simply added and updated is always 0.
Dependencies and credentials
Section titled “Dependencies and credentials”| Slot | Accepts | Connections |
|---|---|---|
| Model | chat model | One node. |
| Knowledge (erforderlich) | vector store | One node. |
| Text Splitter (erforderlich) | text splitter | One node. |
- Knowledge: a Local Knowledge node pointing at the knowledge base to fill.
- Text Splitter: how the text is cut, for example Recursive Character Text Splitter.
- Model: not used for indexing. Workflows that already have one connected keep working.
Example workflow
Section titled “Example workflow”- Schedule runs every day.
- Get All Text from Link with URL
https://example.com/pricingand Output field nametext. - Indexer with Input
{{ $input.text }}, Source namePricing pageand Source linkhttps://example.com/pricing. Connect Local Knowledge to Knowledge and Recursive Character Text Splitter to Text Splitter.
Each day the same source is updated in place, and chat citations link back to the page.
Common issues
Section titled “Common issues”- “None of the N chunks could be saved to the knowledge base.” Nothing was written. Check that the knowledge base exists and that its embedding model is installed in Local models.
- “N of M chunks could not be saved to the knowledge base.” (a warning in the run log) Part of the text was saved;
successisfalseandfailedcounts the rest. Run again to retry. - Duplicates appear after each run. No stable identity is set. Fill Source ID, Source link or Source name.
- Citations read “Workflow input”. Set Source name.
- “Vector store not found” or “Text splitter not found”. The node on that slot is not set up. Open it and complete its settings.
Related nodes
Section titled “Related nodes”- Local Knowledge: the knowledge base Indexer writes to.
- RAG Agent and Q&A Agent: answer questions from what you indexed.
- File Document Loader and URL Document Loader: load documents to index.