cas-bigdatalab/piflow/calibrate-query-mapper

Claude Code and agent skill by cas-bigdatalab/piflow

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

基于参考文本校准问答对中的查询(问题)。当用户提到校准问题、校准查询、语言风格校准、问题优化等需求时使用此skill。 即使用户没有明确说出"校准",只要任务涉及根据参考文本调整问答对中的问题,就应该使用此skill。

Install

npx vskill@latest install cas-bigdatalab/piflow/calibrate-query-mapper

SKILL.md

Calibrate Query Mapper

基于参考文本校准问答对中的查询(问题),使问题更加详细、准确,并贴合参考文本的语言风格。

本SKILL使用依赖data_juicer,请在调用前安装好python环境并安装data_juicer,你可用同以下指令进行安装:

pip install py-data-juicer

核心参数

参数类型必填默认值说明
input_pathstring是-输入JSON文件路径
output_pathstring是-输出JSON文件路径
api_modelstring是-LLM模型名称,如 'qwen2.5-72b-instruct'
api_endpointstring否-API端点URL
response_pathstring否choices.0.message.content响应内容路径

使用方法

bash
python scripts/run_calibrate_query_mapper.py --input_path <input_path> --output_path <output_path> --api_model <model_name> [--api_endpoint <endpoint>] [--response_path <path>]

实现原理

参照测试代码 test_calibrate_query_mapper.py 中的 _run_op 函数:

python
# 1. 初始化算子(必须指定api_model)
op = CalibrateQueryMapper(api_model='qwen2.5-72b-instruct')
# 2. 将数据转为Dataset,使用 op.run(dataset) 处理
dataset = Dataset.from_list(samples)
result_dataset = op.run(dataset)

输入输出格式

输入格式 (JSON数组)
json
[
{
"text": "参考文本,包含语言风格示例...",
"query": "原始问题",
"response": "原始回答"
}
]
输出格式 (JSON数组)
json
[
{
"text": "参考文本,包含语言风格示例...",
"query": "校准后的问题",
"response": "原始回答"
}
]

注意:此算子只校准 query 字段,response 字段保持不变。

示例

bash
python scripts/run_calibrate_query_mapper.py --input_path example_input.json --output_path output.json --api_model "qwen2.5-72b-instruct"

注意事项

  • 必须设置环境变量:使用前需设置 API key

``bash export OPENAI_API_KEY=your_api_key # 或 export DASHSCOPE_API_KEY=your_api_key ``

  • api_model 参数必须指定
  • 输入数据需要包含 text(参考)、query(问题)、response(回答)三个字段
  • 该算子只校准问题(query),回答(response)保持不变
  • 该算子调用 LLM API,可能需要较长时间

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/cas-bigdatalab/piflow/calibrate-query-mapper/badge)](https://verified-skill.com/skills/cas-bigdatalab/piflow/calibrate-query-mapper)

Something wrong with this skill or its page? Tell us.