OpenParable
Skip to content
← Back to skills

Nodetool RAG Indexing

Agent Building
nodetool-rag-indexing

Nodetool RAG Indexing is an Agent Skill for agent building published in the nodetool-ai/nodetool repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Set up RAG pipelines, vector indexing, document ingestion, vector search, and knowledge base creation in NodeTool. Use when user asks about RAG, document indexing, vector search, chat with documents, knowledge base, embeddings, or collection management.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/nodetool-ai/nodetool/blob/HEAD/.claude/skills/nodetool-rag-indexing/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/nodetool-rag-indexing, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

You help users build Retrieval-Augmented Generation (RAG) pipelines in NodeTool.

RAG Architecture

INDEXING:  Documents → Load → Split → Embed → Store (vector collection)
QUERY:     Question → Embed → Search → Format → LLM → Answer

Vector Store Backends

NodeTool's vector store (@nodetool-ai/vectorstore) is backend-pluggable. The workflow nodes are the same regardless of backend — you pick the backend via configuration.

BackendBest forNotes
SQLite-vecDefault, local, embeddedNo external service
ChromaDBSelf-host / remoteCHROMA_URL, CHROMA_PATH, CHROMA_TOKEN
PineconeManaged cloudAPI-key based
Supabase (pgvector)Postgres-backedPairs with Supabase auth/storage

There are no FAISS nodes; the backends above cover local and hosted use.

Vector Nodes (vector.*)

All RAG nodes live under the single vector.* namespace (not vector.chroma.* or vector.faiss.*).

NodePurpose
vector.CollectionReference/select a collection by name (the collection ref other nodes consume)
vector.IndexTextChunkIndex a single text chunk with its embedding
vector.IndexStringIndex a string value
vector.IndexAggregatedTextIndex aggregated text
vector.IndexEmbeddingIndex a precomputed embedding
vector.IndexImageIndex an image
vector.QueryTextVector similarity search over text
vector.QueryImageVector similarity search over images
vector.HybridSearchVector + keyword search (best accuracy)
vector.GetDocumentsRetrieve specific documents
vector.CountCount documents in a collection
vector.PeekPreview collection contents
vector.RemoveOverlapDe-duplicate overlapping chunks in results

Query nodes (QueryText, QueryImage, HybridSearch) output ids, documents, metadatas, and distances (HybridSearch also returns scores).

Document Loading & Splitting (nodetool.document.*, lib.os.*)

NodeNamespacePurpose
ListFileslib.osEnumerate files in a directory
LoadDocumentFilenodetool.documentLoad a PDF/DOCX/TXT/MD into a document
SplitRecursivelynodetool.documentRecursive character/token splitting (general purpose)
SplitMarkdownnodetool.documentSplit Markdown by structure
SplitHTML / SplitJSONnodetool.documentStructure-aware splitting
SplitDocumentnodetool.documentSplit a loaded document

Chunk Size Guidance

Content typeChunk sizeOverlap
Technical docs200-500 tokens50 tokens
Prose/articles300-600 tokens75 tokens
Code100-300 tokens25 tokens

Indexing — Workflow Pattern

ListFiles → LoadDocumentFile → SplitRecursively → IndexTextChunk(collection)

Pair every index/query node with a vector.Collection node (or a collection name) so they target the same store. Use the same embedding model for indexing and querying.

Indexing — HTTP API

# Index a file into a collection
curl -X POST http://localhost:7777/api/collections/<name>/index \
  -H "Authorization: Bearer TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"file_path": "/path/to/document.pdf"}'

The server resolves the collection, runs its ingestion workflow if one is registered, otherwise falls back to split → embed → store.

Query — Workflow Pattern

ChatInput → HybridSearch(collection, top_k) → FormatText → Agent → Output
NodePurpose
ChatInputUser question
vector.HybridSearchVector + keyword retrieval (best accuracy)
vector.QueryTextVector-only retrieval (faster)
FormatTextBuild the context string for the LLM
AgentGenerate the answer from context + question
OutputReturn the answer

Complete RAG Example

Index

ListFiles("/docs/") → LoadDocumentFile → SplitRecursively(chunk_size=400, overlap=50)
                                                  ↓
                                  IndexTextChunk(collection="my-docs")

Query

ChatInput("What is...?") → HybridSearch(collection="my-docs", top_k=5)
                                  ↓
                         FormatText(template="Context:\n{documents}\n\nQuestion: {query}")
                                  ↓
                         Agent(model=gpt-5.4, system="Answer using only the context provided.")
                                  ↓
                         Output

Environment Variables

# ChromaDB backend (only when using Chroma — SQLite-vec needs no config)
CHROMA_URL=                          # Remote Chroma URL (empty = local)
CHROMA_PATH=~/.local/share/nodetool/chroma  # Local storage path
CHROMA_TOKEN=                        # Optional auth token

The embedding model is chosen on the index/query nodes via model selection (e.g. text-embedding-3-small, or a local sentence-transformers model).

Common Pitfalls

  • Embedding model mismatch: use the same embedding model for indexing and search.
  • Chunks too large: dilute the LLM context — keep to 200-500 tokens.
  • Chunks too small: sentences get fragmented; use 10-20% overlap.
  • Empty collection: index before querying — an unindexed collection returns nothing.
  • Wrong node names: it's vector.IndexTextChunk / vector.QueryText / vector.HybridSearch, not IndexTextChunks / TextSearch, and there is no vector.chroma.*/vector.faiss.* namespace.
  • No nodetool collections CLI: manage collections through the editor UI or the /api/collections/... endpoints.