Agent Skillsnodetool-ai/nodetool › nodetool-rag-indexing

nodetool-rag-indexing

GitHub

指导在 NodeTool 中构建 RAG 管道,涵盖文档加载、分块、向量化索引及混合搜索。支持多种向量存储后端,提供节点配置与工作流模式指南。

.claude/skills/nodetool-rag-indexing/SKILL.md nodetool-ai/nodetool

Trigger Scenarios

用户询问如何建立 RAG 系统 涉及向量索引或嵌入问题 需要创建知识库或进行文档检索

Install

npx skills add nodetool-ai/nodetool --skill nodetool-rag-indexing -g -y
More Options

Non-standard path

npx skills add https://github.com/nodetool-ai/nodetool/tree/main/.claude/skills/nodetool-rag-indexing -g -y

Use without installing

npx skills use nodetool-ai/nodetool@nodetool-rag-indexing

指定 Agent (Claude Code)

npx skills add nodetool-ai/nodetool --skill nodetool-rag-indexing -a claude-code -g -y

安装 repo 全部 skill

npx skills add nodetool-ai/nodetool --all -g -y

预览 repo 内 skill

npx skills add nodetool-ai/nodetool --list

SKILL.md

Frontmatter
{
    "name": "nodetool-rag-indexing",
    "description": "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."
}

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.

Backend Best for Notes
SQLite-vec Default, local, embedded No external service
ChromaDB Self-host / remote CHROMA_URL, CHROMA_PATH, CHROMA_TOKEN
Pinecone Managed cloud API-key based
Supabase (pgvector) Postgres-backed Pairs 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.*).

Node Purpose
vector.Collection Reference/select a collection by name (the collection ref other nodes consume)
vector.IndexTextChunk Index a single text chunk with its embedding
vector.IndexString Index a string value
vector.IndexAggregatedText Index aggregated text
vector.IndexEmbedding Index a precomputed embedding
vector.IndexImage Index an image
vector.QueryText Vector similarity search over text
vector.QueryImage Vector similarity search over images
vector.HybridSearch Vector + keyword search (best accuracy)
vector.GetDocuments Retrieve specific documents
vector.Count Count documents in a collection
vector.Peek Preview collection contents
vector.RemoveOverlap De-duplicate overlapping chunks in results

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

Document Loading & Splitting

Node Namespace Purpose
Code nodetool.code Enumerate files with await workspace.list(dir)
LoadDocumentFile nodetool.document Load a PDF/TXT/MD into a document
Chunk nodetool.text Fixed-size word chunking with overlap (general purpose)
RegexSplit nodetool.text Structure-aware splitting on a delimiter pattern

Chunk Size Guidance

Content type Chunk size Overlap
Technical docs 200-500 tokens 50 tokens
Prose/articles 300-600 tokens 75 tokens
Code 100-300 tokens 25 tokens

Indexing — Workflow Pattern

ListFiles → LoadDocumentFile → Chunk → 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
Node Purpose
ChatInput User question
vector.HybridSearch Vector + keyword retrieval (best accuracy)
vector.QueryText Vector-only retrieval (faster)
FormatText Build the context string for the LLM
Agent Generate the answer from context + question
Output Return the answer

Complete RAG Example

Index

ListFiles("/docs/") → LoadDocumentFile → Chunk(length=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.

Version History

  • a6a7e57 Current 2026-08-20 09:50

Same Skill Collection

.claude/skills/ask-matt/SKILL.md
.claude/skills/ast-grep-outline/SKILL.md
.claude/skills/ast-grep/SKILL.md
.claude/skills/codebase-design/SKILL.md
.claude/skills/companion-clis/SKILL.md
.claude/skills/diagnosing-bugs/SKILL.md
.claude/skills/domain-modeling/SKILL.md
.claude/skills/flash/SKILL.md
.claude/skills/implement/SKILL.md
.claude/skills/improve-codebase-architecture/SKILL.md
.claude/skills/nodetool-api-reference/SKILL.md
.claude/skills/nodetool-browser-agent/SKILL.md
.claude/skills/nodetool-chat-cli/SKILL.md
.claude/skills/nodetool-custom-node-developer/SKILL.md
.claude/skills/nodetool-deployment/SKILL.md
.claude/skills/nodetool-model-provider-config/SKILL.md
.claude/skills/nodetool-troubleshooter/SKILL.md
.claude/skills/nodetool-workflow-builder/SKILL.md
.claude/skills/prototype/SKILL.md
.claude/skills/research/SKILL.md
.claude/skills/resolving-merge-conflicts/SKILL.md
.claude/skills/setup-matt-pocock-skills/SKILL.md
.claude/skills/tdd/SKILL.md
.claude/skills/to-spec/SKILL.md
.claude/skills/to-tickets/SKILL.md
.claude/skills/triage/SKILL.md
.claude/skills/wayfinder/SKILL.md
.claude/skills/wizard/SKILL.md
.claude/skills/yts806379-everything-claude-code-e2e-testing/SKILL.md
packages/sandbox-packs/sandbox-aws/SKILL.md
packages/sandbox-packs/sandbox-chrono/SKILL.md
packages/sandbox-packs/sandbox-color/SKILL.md
packages/sandbox-packs/sandbox-csv/SKILL.md
packages/sandbox-packs/sandbox-dates/SKILL.md
packages/sandbox-packs/sandbox-decimal/SKILL.md
packages/sandbox-packs/sandbox-diff/SKILL.md
packages/sandbox-packs/sandbox-docx/SKILL.md
packages/sandbox-packs/sandbox-dsl/SKILL.md
packages/sandbox-packs/sandbox-epub/SKILL.md
packages/sandbox-packs/sandbox-exif/SKILL.md
packages/sandbox-packs/sandbox-expr/SKILL.md
packages/sandbox-packs/sandbox-fabric/SKILL.md
packages/sandbox-packs/sandbox-flow/SKILL.md
packages/sandbox-packs/sandbox-gif/SKILL.md
packages/sandbox-packs/sandbox-html/SKILL.md
packages/sandbox-packs/sandbox-ics/SKILL.md
packages/sandbox-packs/sandbox-jmespath/SKILL.md
packages/sandbox-packs/sandbox-mammoth/SKILL.md
packages/sandbox-packs/sandbox-markdown/SKILL.md

Metadata

Files
0
Version
a6a7e57
Hash
43958395
Indexed
2026-08-20 09:50

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-25 07:25
浙ICP备14020137号-1 $방문자$