XHS Knowledge Retriever

Query the competitor-note RAG index for semantically relevant examples

kekena1016

@kekena1016

Install

$ openclaw skills install @kekena1016/xhs-knowledge-retriever

XHS Knowledge Retriever

Query the competitor-note RAG index and get back the most relevant chunks.

Run

From workspace-xhs-agent/products/xhs-note-learning-cycle:

python3 skills/xhs-knowledge-retriever/scripts/retrieve.py --query "有娃家庭怎么选沙发"

With options:

python3 skills/xhs-knowledge-retriever/scripts/retrieve.py \
  --query "有娃家庭怎么选沙发" \
  --top-k 5 \
  --output /tmp/retrieved.json

Check local readiness without running retrieval:

python3 skills/xhs-knowledge-retriever/scripts/retrieve.py --check-only

Runtime Python packages:

  • numpy
  • sentence-transformers

The script does not require API credentials. If the standard workspace layout is not available, set XHS_KNOWLEDGE_ROOT to the local knowledge/xhs directory.

What it consumes

What it produces

  • JSON with the query, model, and top-k results including:
    • score (cosine similarity)
    • chunk (the retrieved text)
    • metadata (competitor name, note title, note URL, title pattern, content signals, etc.)

Rules

  1. Read only. It only queries the local index.
  2. Planner/Writer should call this before making creative decisions.
  3. Retrieved chunks are inspiration, not copy sources.
  4. Do not publish competitor text verbatim.

Top skills in this category