Adaptive Rag Engine

v1.0.0

Adaptive RAG 引擎 — 从线性检索到自主认知循环。集成胶囊预筛选、智能路由、CRAG纠错、L3校验。当需要搜索记忆/检索信息/回答复杂问题时触发。关键词:RAG、检索、记忆搜索、向量检索、Agentic RAG、CRAG。

0· 62·0 current·0 all-time
Security Scan
Capability signals
Crypto
These labels describe what authority the skill may exercise. They are separate from suspicious or malicious moderation verdicts.
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description (Adaptive RAG engine) match the provided artifacts: two small Python helper scripts (index builder and relevance evaluator) plus an instruction file describing routing, pre-filtering and evaluation. The skill claims integrations (vector search, bge‑m3, Phoenix memory bridge) but does not embed any external-client code — it acts as an orchestration/protocol layer and expects existing tools to provide vector search and memory storage. This design is coherent, though some high-level capabilities (e.g., bge‑m3 search, Active Memory ↔ Phoenix bridge) are described but not implemented in the included files — they are expected to exist elsewhere.
Instruction Scope
SKILL.md explicitly instructs the agent to read local protocol and memory files: rules/adaptive-rag-protocol.md and memory/topics/.capsule-index.json, and to run scripts under ~/.openclaw/workspace/skills/adaptive-rag-engine/scripts. Reading those files is expected for a RAG/navigation skill, but it is file-system access to user workspace data. Also SKILL.md states it is a "protocol layer" that "does not require explicit invocation" while registry flags show always:false — this is a minor inconsistency in intended activation semantics (not an immediate security problem, but worth noting).
Install Mechanism
No install spec (instruction-only plus two simple scripts) — low install risk. Scripts are small, readable Python files with no downloads or network calls. Minor manifest mismatch: registry metadata lists no required binaries, but the SKILL.md header declares python3 as required; python3 is reasonable for the provided scripts.
Credentials
The skill requests no environment variables or external credentials. The only resources accessed are local files under the user's OpenClaw workspace (~/.openclaw/workspace/memory and rules). That level of filesystem access is proportionate to the stated purpose of building/reading a capsule index and evaluating retrieval quality.
Persistence & Privilege
Skill is not marked always:true and does not request to modify other skills or system settings. Autonomous invocation (disable-model-invocation:false) is platform default; the SKILL.md's claim of acting as a protocol layer without explicit invocation contrasts with the actual flags but does not create extra privileges in the bundle itself.
Assessment
This skill appears to be a local orchestration/protocol layer for retrieval and is internally consistent, but before enabling you should: (1) Inspect the contents of rules/adaptive-rag-protocol.md and the files under ~/.openclaw/workspace/memory/topics to ensure they don't contain sensitive secrets you don't want the agent to read. (2) Note that vector search and memory bridging are not implemented here — the skill expects external components (e.g., a memory_search tool, bge‑m3 backend, Phoenix memory) to be present and may rely on their credentials; verify how those integrations are wired elsewhere. (3) Be aware of the SKILL.md claim that it is a protocol layer that 'does not require explicit invocation' — confirm how your platform will activate the skill (it is not always:on by default). (4) If you plan to run the included scripts, run them in a safe environment or inspect them (they are small and readable) — they only read/write files under your ~/.openclaw workspace and do not perform network I/O. If you need tighter assurance, request the full protocol/routing implementation or provenance for the vector/memory backends the skill expects.

Like a lobster shell, security has layers — review code before you run it.

latestvk977dr2bkawbbbqkmzwx90jh9584pq5z
62downloads
0stars
1versions
Updated 6d ago
v1.0.0
MIT-0

🧠 Adaptive RAG Engine v1.0

不是管道,是认知循环。

核心能力

能力说明触发方式
Adaptive Router判断是否需要检索,简单问题直接答自动(每次 memory_search 前)
Capsule Pre-filter42个胶囊标题预匹配,缩小范围 90%自动(Router 通过后)
Vector Searchbge-m3 向量检索 Top-20memory_search 工具
LLM Re-rank语义重排序 Top-20 → Top-5检索后自动
CRAG Evaluator质量评估 + 低分补搜检索后自动
L3 Gatekeeper输出前与核心洞察校验生成前自动
Memory BridgeActive Memory ↔ Phoenix 双向桥接对话结束时

使用流程

对于 CEO(小鸟文书)

此 Skill 是协议层,不需要显式调用。它通过以下方式生效:

  1. 读取协议文件: rules/adaptive-rag-protocol.md — 获取完整决策树
  2. 读取胶囊索引: memory/topics/.capsule-index.json — 获取 42 个胶囊元数据
  3. 按决策树执行: 每次需要记忆时,走 Router → Pre-filter → Search → Rank → CRAG → Generate → Verify

对于 SubAgent

SubAgent 在执行任务时:

  1. 先判断任务类型 → 决定是否需要检索
  2. 需要检索时 → 先做胶囊预筛选
  3. 检索结果 → 自行判断质量(CRAG 思维)
  4. 输出前 → 自检是否与已知信息矛盾

关键文件

文件用途
rules/adaptive-rag-protocol.md完整协议(决策树/分类/bridge/CRAG/L3)
memory/topics/.capsule-index.json42个胶囊的结构化索引
scripts/build-capsule-index.py重建胶囊索引脚本
scripts/rag-evaluate.pyCRAG 质量评估脚本

快速命令

# 重建胶囊索引
python3 ~/.openclaw/workspace/skills/adaptive-rag-engine/scripts/build-capsule-index.py

# 评估检索质量
python3 ~/.openclaw/workspace/skills/adaptive-rag-engine/scripts/rag-evaluate.py --query "xxx" --results "result1, result2"

与其他 Skill 的关系

  • dynamic-rag-capsule — Context 管理层面的胶囊化(对话太长时压缩)
  • phoenix-memory — 记忆存储和衰减管理(四层架构)
  • 本 Skill — 检索策略和质量控制(怎么搜、搜到后怎么办)

三者关系:phoenix-memory 是仓库,dynamic-rag-capsule 是打包器,adaptive-rag-engine 是导航仪

Comments

Loading comments...