← 返回
未分类 中文

LiteRAG

Local retrieval skill for large documentation corpora using independent SQLite knowledge libraries with keyword plus vector hybrid search. Use when searching...
本地检索技能,使用独立 SQLite 知识库实现关键词+向量混合搜索,适用于大型文档语料库的检索。
mozi1924
未分类 clawhub v0.2.2 1 版本 100000 Key: 无需
★ 0
Stars
📥 370
下载
💾 0
安装
1
版本
#latest

概述

LiteRAG

Use this skill when the target corpus is too large or too noisy for main agent memory.

Install

Packaged dependency install:

python3 -m pip install -r {baseDir}/requirements.txt

Layout

  • Config + databases live under /.literag/
  • Main config: /.literag/knowledge-libs.json
  • Default workspace resolution order: OPENCLAW_WORKSPACEWORKSPACE → walk upward from the current path until the OpenClaw workspace sentinel files are found
  • Core scripts live under skills/literag/scripts/
  • Skill bin entrypoint: skills/literag/bin/literag
  • Workspace convenience wrappers live at scripts/literag-query.py, scripts/literag-index.py, scripts/literag-status.py, scripts/literag-meta.py, and scripts/lq

Rules

  • Keep personal/work memory in OpenClaw builtin memory
  • Keep large external corpora in LiteRAG, not memory_search
  • Treat each knowledge base as an independent library with its own SQLite
  • Search first, inspect second
  • Prefer grouped document hits over raw chunk spam
  • Prefer source-relative paths when citing files back to the user
  • Use local OpenAI-compatible embeddings by default unless explicitly changed in config

Read these files when needed

  • Always read /.literag/knowledge-libs.json when targeting a library or changing config
  • Read references/usage.md when you need command examples, output schema, or the intended search → inspect workflow
  • Read references/configuration.md when adding libraries, source roots, excludes, chunking overrides, or ranking overrides
  • Read references/agent-prompts.md when another agent / ACP harness needs a ready-made LiteRAG prompt template
  • Read references/optimization-playbook.md when a specific library needs retrieval-quality tuning, ranking cleanup, or indexing-throughput tuning
  • Read scripts under skills/literag/scripts/ only when editing behavior or diagnosing bugs

Slash / user-invocable usage

When invoked as /literag ..., parse the remaining argument string as a subcommand.

Supported forms:

  • /literag search
  • /literag inspect [--start N --end N]
  • /literag index [--limit-files N] [--embedding-batch-size N]
  • /literag index-all [--limit-files N] [--embedding-batch-size N]
  • /literag status
  • /literag meta
  • /literag benchmark --query ...

If the user gives a natural-language request instead of a strict subcommand, translate it to the nearest supported operation instead of being pedantic.

Supported commands

  • index_library.py — index one library
  • index_all.py — index all configured libraries
  • search_library.py — grouped hybrid/fts/vector retrieval
  • inspect_result.py — expand a hit by file path + chunk range
  • status_library.py — show index health / compatibility / counts
  • meta_library.py — dump raw sqlite meta records
  • benchmark_library.py — benchmark hybrid/fts/vector latency + hit shape across fixed query sets
  • bin/literag — packaged CLI entrypoint for search / inspect / index / status / meta / benchmark
  • scripts/literag-query.py — query/search/inspect wrapper
  • scripts/literag-index.py — index wrapper for one library or all libraries
  • scripts/literag-status.py — status wrapper
  • scripts/literag-meta.py — meta wrapper
  • scripts/literag-benchmark.py — benchmark wrapper
  • scripts/lq — tiny shell alias for literag-query.py

Operating workflow

  1. Read /.literag/knowledge-libs.json
  2. Resolve the target library
  3. Run search_library.py for grouped retrieval
  4. If needed, run inspect_result.py on the top hit or chosen range
  5. For quick operator use, prefer scripts/literag-query.py or scripts/lq
  6. Use scripts/literag-index.py when you need a short indexing entrypoint
  7. Use scripts/literag-status.py before debugging weird retrieval or after config changes
  8. Use scripts/literag-meta.py when you need the raw stored metadata
  9. Use scripts/literag-benchmark.py or skills/literag/scripts/benchmark_library.py when you need repeatable retrieval latency / hit-shape comparisons
  10. Keep LiteRAG separate from builtin memory unless the user explicitly wants a durable summary copied into workspace memory

Current intent

Use LiteRAG for:

  • Blender manual + Blender Python reference
  • Future blog/article/site knowledge bases
  • Any large external docs where hybrid retrieval is needed without polluting builtin memory

版本历史

共 1 个版本

  • v0.2.2 当前
    2026-05-07 13:08 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

dev-programming

Local Stt Workflow

mozi1924
本地语音转文字工作流,用于兼容OpenAI的STT服务器,通常位于 http://127.0.0.1:8000/v1。在配置、测试、调试或验证时使用。
★ 0 📥 496
knowledge-management

Summarize

paudyyin
智能摘要工具,自动为长文本、文档、网页生成摘要,提取要点与关键词,支持自定义摘要长度。
★ 972 📥 524,657
knowledge-management

Obsidian

steipete
操作 Obsidian 仓库(纯 Markdown 笔记)并通过 obsidian-cli 自动化。
★ 453 📥 106,341