← 返回
未分类 Key

test2333

Retrieve chunks from an avatar personal knowledge base using a client-provided dataset_id.
Retrieve chunks from an avatar personal knowledge base using a client-provided dataset_id.
user_e3c9e60f
未分类 community v1.0.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 74
下载
💾 0
安装
1
版本
#latest

概述

pkm-retrieval

Use this skill when the user wants information from an avatar's personal knowledge base (PKM), such as remembered notes, uploaded files, or avatar-specific reference material.

Configuration

PKM credentials are stored in:

  • skills/pkm-retrieval/config.json — machine-readable config (base_url, dataset_id, api_key)
  • TOOLS.md — human-readable notes with curl examples

Load the config file when making API calls. Do not hardcode secrets.

When to use

  • The user asks to search an avatar's personal knowledge base.
  • The task depends on content stored in a customer-managed PKM dataset.
  • The user already has a dataset_id or can provide one.

Do not use

  • General web or product knowledge questions.
  • Cases where only avatar_id is available and the user has not provided a dataset_id.
  • Tasks that should go through the Avatar chat workflow instead of direct dataset retrieval.

Required input

  • dataset_id
  • Retrieval query

If dataset_id is missing

  • Ask the user for the avatar's PKM dataset_id.
  • Explain that this customer-facing interface uses a client-maintained dataset_id.
  • Do not assume or derive dataset_id from avatar_id unless the user explicitly asks for the internal admin flow.

Question template

  • Please provide the PKM dataset_id for this avatar so I can run the retrieval.

API behavior

  • Endpoint: POST /v1/datasets/{dataset_id}/retrieve
  • In this environment, UI Vector Search corresponds to API search_method: "semantic_search".
  • Authentication must be configured outside this skill. Never hardcode API keys or secrets in the skill instructions.
  • Load credentials from skills/pkm-retrieval/config.json when making requests.
  • There is an internal two-step route: avatar_id -> pkb_{avatar_id} -> /v1/datasets lookup -> dataset_id -> /retrieve, but this should not be the default customer-facing path.

Executing a Retrieval Query

When the user wants to search the PKM and has already provided a dataset_id:

  1. Read skills/pkm-retrieval/config.json to get base_url and api_key.
  2. Construct the request with the user's query and the request body template below.
  3. Call the endpoint and return a concise, summarized answer.
  4. Include source document names when helpful.

Request body template

{
  "query": "<user query>",
  "retrieval_model": {
    "search_method": "semantic_search",
    "reranking_enable": false,
    "reranking_mode": "weighted_score",
    "reranking_model": {
      "reranking_provider_name": "langgenius/xinference/xinference",
      "reranking_model_name": "bge-reranker-large"
    },
    "weights": {
      "weight_type": "customized",
      "keyword_setting": {
        "keyword_weight": 0.5
      },
      "vector_setting": {
        "vector_weight": 0.5,
        "embedding_model_name": "jina-embeddings-v3",
        "embedding_provider_name": "langgenius/xinference/xinference"
      }
    },
    "top_k": 20,
    "score_threshold_enabled": true,
    "score_threshold": 0.3
  }
}

How to interpret results

  • Prefer the highest-score chunk first.
  • If one chunk is a clear exact match and the rest are noisy PDF or image-preview fragments, answer from the best chunk and ignore the noisy tail.
  • Summarize relevant content for the user instead of dumping raw sign_content or long image-preview markup.
  • Mention source document names when helpful.

Response style

  • Return a concise answer first.
  • If needed, add a short source line with the document name.
  • If nothing relevant is found, say so clearly.

OpenClaw behavior

  • If the user asks to use PKM but has not given a dataset_id, pause and ask for it before calling the endpoint.
  • If the user only gives avatar_id, explain that customer-facing PKM retrieval expects a stored dataset_id, and ask whether they want to provide it.

版本历史

共 1 个版本

  • v1.0.0 Initial release 当前
    2026-05-11 15:01 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 666 📥 323,791
ai-intelligence

self-improving agent

pskoett
捕获经验教训、错误和纠正,以实现持续改进。使用时机:(1)命令或操作意外失败;(2)用户纠正……
★ 4,055 📥 795,896
ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,349 📥 317,697