Adaptive RAG Engine for Openclaw

An autonomous cognitive loop engine that transforms linear RAG into a multi-stage, self-correcting retrieval process for higher precision.

luaqnyin
v1.0.0
Apr 13, 2026
0
1.1k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install adaptive-rag-engine

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 adaptive-rag-engine 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 Adaptive RAG Engine?

The Adaptive RAG Engine is a sophisticated protocol layer designed for AI agents that moves beyond simple vector search into a closed-loop cognitive cycle. It integrates intelligent routing to determine if a search is even necessary, capsule-based pre-filtering to narrow down data scopes by 90%, and Corrective RAG (CRAG) to ensure the retrieved information is actually relevant before generation. By serving as the navigation system for an agent memory, this Openclaw Skills component ensures high-precision responses for complex queries and reduces hallucinations through strict verification gates.

Adaptive RAG Engine Use Cases

  • Searching through long-term memory or large document sets with high precision.
  • Reducing LLM hallucination by implementing CRAG quality gates for retrieved data.
  • Optimizing search efficiency in multi-agent workflows by skipping unnecessary retrieval steps.
  • Verifying output accuracy against core insights using the L3 Gatekeeper protocol.

How Adaptive RAG Engine Works

  1. The Adaptive Router analyzes the incoming query to decide if memory retrieval is required or if a direct answer is sufficient.
  2. The Capsule Pre-filter scans structured capsule titles to narrow the search scope by up to 90% before performing expensive operations.
  3. Vector Search performs a semantic search using bge-m3 to identify the top 20 most relevant information chunks.
  4. LLM Re-rank narrows the selection from the top 20 down to the top 5 most contextually relevant pieces for the prompt.
  5. The CRAG Evaluator assesses the quality of retrieved data and triggers supplementary searches if confidence scores are low.
  6. The L3 Gatekeeper verifies the generated response against core insights and known facts before the final output is delivered.

Adaptive RAG Engine Setup

To get started with this skill within the Openclaw Skills ecosystem, ensure you have python3 installed and follow these steps:

# Rebuild the capsule index for your memory storage
python3 ~/.openclaw/workspace/skills/adaptive-rag-engine/scripts/build-capsule-index.py

# Evaluate search quality for specific queries to calibrate the engine
python3 ~/.openclaw/workspace/skills/adaptive-rag-engine/scripts/rag-evaluate.py --query "your_query" --results "result1, result2"

Adaptive RAG Engine Data Schema & Taxonomy

The engine organizes its retrieval logic and metadata through specific configuration files:

File Path Description
rules/adaptive-rag-protocol.md The core protocol containing the complete decision tree, CRAG logic, and L3 verification rules.
memory/topics/.capsule-index.json A structured index of metadata points for rapid pre-filtering of memory topics.
scripts/ Python utilities for maintaining the index and evaluating RAG performance.

Adaptive RAG Engine Advanced Features

  • Autonomous Cognitive Loop: Shifts from linear retrieval to an iterative retrieval-correction cycle for complex reasoning.
  • Multi-stage Filtering: Combines high-speed metadata capsule filtering with deep semantic vector search.
  • Deep Integration: Functions as the navigation layer for other Openclaw Skills like phoenix-memory and dynamic-rag-capsule.
  • Agentic Quality Control: Enables sub-agents to self-evaluate their search results using integrated CRAG and L3 gatekeeper logic.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*