Local RAG for Openclaw

A privacy-first semantic search engine optimized for low-power devices that indexes local documents for precise AI retrieval.

lookupmark
v1.9.1
Apr 6, 2026
0
973
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install lookupmark-local-rag

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install lookupmark-local-rag using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Local RAG?

Local RAG is a sophisticated retrieval-augmented generation skill designed specifically for Openclaw Skills users who need to query their local document library without compromising privacy. It utilizes all-MiniLM-L6-v2 embeddings and ms-marco-MiniLM-L-6-v2 cross-encoder reranking to provide highly accurate search results.

This skill is uniquely engineered for low-RAM ARM environments, such as the Raspberry Pi, by utilizing a smart memory management strategy that loads and frees models sequentially. By using ChromaDB and a parent-child chunking strategy, it ensures that your AI agent doesn't just find a keyword, but understands the full context of your private documents.

Local RAG Use Cases

  • Searching through personal research papers, thesis documents, or lecture notes using natural language.
  • Finding specific clauses or information within large collections of PDF or DOCX contracts.
  • Retrieving context from offline Markdown notes or LaTeX files for AI-assisted writing.
  • Building a private knowledge base on low-power hardware like a Raspberry Pi or home server.

How Local RAG Works

  1. The indexing script scans specified local directories and calculates SHA-256 hashes to track file changes.
  2. Documents are split into 128-word child chunks for granular embedding and 768-word parent chunks for broader context.
  3. Semantic vectors are stored in a persistent ChromaDB instance for fast retrieval.
  4. Upon a query, the system performs a vector search to find relevant child chunks.
  5. A cross-encoder reranker scores the candidates and returns the top parent chunks to provide the AI with full surrounding context.

Local RAG Setup

To get started with this Openclaw Skills integration, ensure your environment is ready and use the following commands:

# Define the virtual environment path
VENV=~/.local/share/local-rag/venv/bin/python

# Perform an initial incremental index of your documents
$VENV ~/.openclaw/workspace/skills/lookupmark-local-rag/scripts/index.py --paths ~/Documents

# Run a test query to verify the installation
$VENV ~/.openclaw/workspace/skills/lookupmark-local-rag/scripts/query.py "How do I configure my local rag?"

Local RAG Data Schema & Taxonomy

The skill organizes its data within ~/.local/share/local-rag/ using the following taxonomy:

Path Purpose
/chromadb/ Vector database storage with Git-based versioning for rollbacks.
/venv/ Isolated Python environment containing sentence-transformers and ChromaDB.
index.lock Process lock to prevent database corruption during concurrent indexing.
queries.log Historical record of all natural language queries and results.

Local RAG Advanced Features

  • Parent-Child Chunking: Returns full paragraphs even if only a specific sentence matched the query.
  • Low-RAM Optimization: Peak memory usage is capped at ~400MB by manually cycling models through the GPU/RAM.
  • Batch Indexing: Includes a specialized script with Git checkpoints for stable processing on unstable or low-spec hardware.
  • Incremental Updates: Only re-indexes files that have changed, significantly reducing overhead for large libraries.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*