doc-search for Openclaw

A high-performance document vectorization and semantic retrieval engine supporting multi-format processing and hybrid search.

cloudcba
v1.0.0
Apr 1, 2026
0
604
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install doc-search-cloud

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 doc-search-cloud 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 doc-search?

The doc-search skill is a specialized tool within the Openclaw Skills ecosystem designed to handle document vectorization, persistent storage, and intelligent semantic retrieval. It enables AI agents to move beyond simple keyword matching by understanding the context and meaning of document content.

By integrating this skill, developers can transform unstructured data from Word, PDF, Markdown, and TXT files into searchable vector embeddings. Version 3.0 introduces significant performance optimizations, including query caching and hybrid search capabilities, making it an essential component for building robust RAG (Retrieval-Augmented Generation) systems.

doc-search Use Cases

  • Vectorizing large document collections for long-term AI memory and retrieval
  • Performing semantic queries where context is more important than exact keyword matches
  • Processing and indexing diverse file formats including .docx, .md, and .pdf
  • Managing document knowledge bases with functions to add, query, and clear collections
  • Improving search precision using hybrid BM25 and vector-based ranking

How doc-search Works

  1. The skill reads the target file (Word, PDF, Markdown, or TXT) and extracts the raw text content.
  2. Text is segmented into chunks (default 200 characters) while maintaining semantic integrity by respecting sentence boundaries.
  3. Vector embeddings are generated for each chunk using either MD5 hashing (default) or Sentence Transformers models.
  4. The resulting vectors and metadata are stored in a persistent local database for future retrieval.
  5. When a query is made, the skill calculates cosine similarity or performs a hybrid search to find the most relevant document segments.

doc-search Setup

To get started with this skill from the Openclaw Skills library, follow these steps:

# Install core dependencies for document processing
pip install python-docx PyPDF2 markdown beautifulsoup4

# (Optional) For high-accuracy semantic embeddings
pip install sentence-transformers

Initialize the vectorizer in your code:

from doc_search import DocumentVectorizer

# Initialize with persistent storage and hybrid search enabled
vector_service = DocumentVectorizer(use_real_embedding=True)

doc-search Data Schema & Taxonomy

The skill organizes its data within a dedicated directory to ensure persistence across sessions:

File Path Description
chroma_data/documents_data.pkl Stores the serialized vector data and chunk content.
chroma_data/documents_index.json Maintains an index of processed files and their associated metadata.
metadata A dictionary-based schema for user-defined tags (e.g., author, timestamp).

Each retrieved chunk includes content, similarity score (0-1), and the original metadata.

doc-search Advanced Features

  • Hybrid Search: Combines BM25 keyword matching with vector similarity for superior accuracy.
  • LRU Query Caching: Implements a Least Recently Used cache to speed up repeated queries by up to 70x.
  • Multi-Model Support: Toggle between lightweight MD5 simulations and heavy-duty Sentence Transformers like paraphrase-multilingual-MiniLM-L12-v2.
  • Auto-Persistence: Automatically saves state to disk after every modification to prevent data loss.
  • Multi-Language Support: Full compatibility with Chinese and English text processing via Openclaw Skills.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*