qianfan-knowledgebase-search
由 hannatao 提供
Search & Research简介
Search knowledge from Qianfan Knowledgebase.
描述
该技能的功能
Searches private knowledge bases hosted on the Baidu Qianfan platform. Supports fulltext, semantic, and hybrid retrieval modes with optional reranking. Returns scored chunks with metadata from one or more knowledge bases.
Exposes Qianfan's hybrid retrieval and reranking pipeline through a single script call, without needing to manage the API request structure manually.
何时使用
- Querying internal documentation stored in Qianfan
- Retrieving product specs from a private Chinese-language knowledge base
- Building a Q&A agent over company policies on Baidu's platform
- Searching multiple knowledge bases in a single request
- Filtering low-confidence results with score thresholds
示例工作流
User asks: find all documentation about API rate limits in our Qianfan knowledge base
- 1
Sets query to 'API rate limits' and knowledgebase_ids from env var
- 2
Calls search.py with recall_type set to hybrid and rerank_enable true
- 3
Script converts flat parameters to nested API request structure
- 4
POSTs to Qianfan Knowledgebase Search API and receives scored chunks
- 5
Returns top chunks with content, rerank scores, and doc metadata
List of relevant chunks with content, scores, and source document info
前置要求
- BAIDU_API_KEY environment variable
- Baidu Qianfan platform account
- QIANFAN_KNOWLEDGEBASE_IDS environment variable or knowledge base IDs on hand
安装
clawhub install hannatao/qianfan-knowledgebase-search运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。