← 返回
AI智能 Key 中文

Qianfan KnowledgeBase Search

Search knowledge from Qianfan Knowledgebase. Use this when you need to retrieve information from user's private knowledge bases on Baidu Qianfan platform.
从百度文心平台的私有知识库中检索信息。
hannatao
AI智能 clawhub v1.0.1 1 版本 100000 Key: 需要
★ 0
Stars
📥 1,557
下载
💾 114
安装
1
版本
#latest

概述

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.

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-03-28 22:21 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

Proactive Agent

halthelobster
将AI智能体从任务执行者升级为主动预判需求、持续优化的智能伙伴。集成WAL协议、工作缓冲区、自主定时任务及实战验证模式。Hal Stack核心组件 🦞
★ 834 📥 212,937
ai-intelligence

Self-Improving + Proactive Agent

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

self-improving agent

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