Qianfan KnowledgeBase Search

v1.0.1

Search knowledge from Qianfan Knowledgebase. Use this when you need to retrieve information from user's private knowledge bases on Baidu Qianfan platform.

0· 1.2k·2 current·2 all-time
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description match the implementation: the script performs POSTs to qianfan.baidubce.com to run knowledgebase searches. Declared binaries (python3) and primaryEnv (BAIDU_API_KEY) are appropriate for this purpose. Note: the package has no homepage/source listed in the registry metadata, so publisher provenance is not verifiable from the provided files.
Instruction Scope
SKILL.md instructs the agent to run search.py with a JSON request body. The script only reads the provided JSON, BAIDU_API_KEY, and optional QIANFAN_KNOWLEDGEBASE_IDS, constructs a request body, and posts to the Qianfan API. It does not access other files, system configs, or unrelated environment variables.
Install Mechanism
There is no install spec (instruction-only runtime plus a small Python script). No remote downloads or archive extraction are performed by the skill itself. Runtime requires python3 and the requests library (not declared, but typical for Python scripts); this is low-risk compared with arbitrary remote installs.
Credentials
Requested environment variables (BAIDU_API_KEY and QIANFAN_KNOWLEDGEBASE_IDS) are appropriate for the Qianfan API. However, there is a minor inconsistency: manifest lists QIANFAN_KNOWLEDGEBASE_IDS as required, SKILL.md marks it optional (used if not supplied in request). In practice the script requires either knowledgebase_ids in the request body or the QIANFAN_KNOWLEDGEBASE_IDS env var, otherwise it exits with an error. No unrelated credentials are requested.
Persistence & Privilege
always:false and the skill does not attempt to modify agent/system config or other skills. It runs only when invoked and sends queries to the Qianfan endpoint; no persistent privileged presence is requested.
Assessment
This skill appears to do exactly what it says: run a local Python script that calls the Baidu Qianfan knowledgebase search API. Before installing, consider: (1) you must provide BAIDU_API_KEY — treat it as sensitive and prefer a key with minimized scope/permissions; (2) queries and returned content (including any sensitive KB data you request) will be transmitted to qianfan.baidubce.com, so ensure you trust Baidu Qianfan and the environment; (3) the skill will fail unless you provide knowledgebase IDs either in the request or via QIANFAN_KNOWLEDGEBASE_IDS env var — the registry and SKILL.md disagree on whether that env var is required; (4) publisher provenance is not shown (no homepage/source), so if you need stronger assurance, obtain the script directly from a trusted source or inspect it yourself (the included search.py is short and readable). If those points are acceptable, the skill is internally consistent.

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

Runtime requirements

📚 Clawdis
Binspython3
EnvBAIDU_API_KEY, QIANFAN_KNOWLEDGEBASE_IDS
Primary envBAIDU_API_KEY
latestvk970jdg3skpsepkdtsx9xh059x80v93g
1.2kdownloads
0stars
2versions
Updated 1mo ago
v1.0.1
MIT-0

Qianfan Knowledgebase Search Skill

Search and retrieve knowledge from Baidu Qianfan platform knowledge bases. Supports semantic search, fulltext search, hybrid search, and reranking.

Workflow

  1. The skill executes the Python script located at search.py
  2. The script makes a POST request to the Qianfan Knowledgebase Search API
  3. The API returns structured search results with chunks, scores, and metadata

Environment Variables

envrequireddescription
BAIDU_API_KEYyesQianfan platform API Key
QIANFAN_KNOWLEDGEBASE_IDSnoKnowledgebase IDs, comma-separated (used if not specified in request)

Parameters

request body structure

paramtyperequireddefaultdescription
querystryesSearch query content
knowledgebase_idslist[str]noKnowledgebase ID list (uses env var if not specified)
top_kintno6Number of chunks to return, range [1, 40]
score_thresholdfloatno0.4Score threshold for filtering, range [0, 1]
enable_graphboolnofalseEnable knowledge graph
enable_expansionboolnofalseReturn expanded chunks
recallobjnoRecall strategy configuration
+recall.typestrnohybridRecall type: fulltext/semantic/hybrid
+recall.top_kintno100Recall phase top_k, range [1, 400]
+recall.vec_weightfloatno0.75Vector weight when type=hybrid, range [0, 1]
rerankobjnoRerank configuration
+rerank.enableboolnotrueEnable reranking
+rerank.top_nintno20Rerank top_n, range [1, 40]

Note: Use flattened parameter names in input (e.g., recall_type, recall_top_k), the script will convert to nested structure automatically.

Example Usage

# Configure knowledgebase IDs via environment variable
export BAIDU_API_KEY="your_api_key"
export QIANFAN_KNOWLEDGEBASE_IDS="kb_id_1,kb_id_2"
python3 skills/qianfan-knowledgebase-search/search.py '{"query":"请介绍下千帆大模型知识库"}'
# Or specify knowledgebase IDs in request parameters
python3 skills/qianfan-knowledgebase-search/search.py '{"query":"如何使用API","knowledgebase_ids":["kb_id_1","kb_id_2"],"top_k":10,"recall_type":"hybrid","rerank_enable":true}'

Response Structure

Response contains the following fields:

  • id: Request unique identifier
  • created_at: Request timestamp
  • total_count: Total number of chunks returned
  • chunks: Chunk list
    • chunk_id: Chunk unique identifier
    • content: Chunk content (supports text/figure/table/graph types)
    • rerank: Rerank score and position
    • recall: Recall score and position
    • meta: Metadata (chunk_type, tokens, word_count, doc_info, etc.)
    • neighbors: Related chunks

Current Status

The Qianfan Knowledgebase Search skill is fully functional and can be used to retrieve knowledge from private knowledge bases on the Baidu Qianfan platform.

Comments

Loading comments...