prioritize-context-data
它能做什么
这项技能让 AI 智能体先检查你附上的文件,并优先使用其中的数据。它适合希望图表数字来自自己文档的人。
适用场景
- ✓当你附上 CSV 或 Excel 文件,并希望 AI 使用其中数字的时候。
- ✓当你希望 AI 说明每个数字来自何处的时候。
- ✓当你想让 AI 去互联网搜索文件中已经有的事实,但又有所犹豫的时候。
技能链接
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/prioritize-context-data/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请用附件中的 CSV 文件作为数字依据,并告诉我每个数字来自哪个文件。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会先列出任务中的文件,读取相关的文件,并提取所需的数据。它会引用所用的文件,只有在文件缺少答案时才去网上搜索。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Prioritize Context Data
Objective
Prevent data hallucination and inefficiency by mandating that agents inspect and utilize provided reference files (CSV, XLSX, PDF, TXT, etc.) before attempting web searches or generating synthetic data.
Critical Rule
If a reference file is provided in the task context, it is the source of truth. Do not fabricate data or search the web for information that exists within the provided attachments.
Workflow Steps
1. Scan Context for Attachments
At the start of every task, explicitly list all files provided in the context window or attachment panel.
- Check for spreadsheets (
.xlsx,.csv), documents (.pdf,.docx), or data dumps (.json,.txt). - Note the filename and inferred content type.
2. Evaluate Relevance
Determine if any provided file contains the data required to complete the task.
- Match Keywords: Do filenames or column headers match task requirements?
- Check Scope: Does the data cover the necessary timeframe or地域 (region)?
3. Extract Data First
If relevant files are found:
- Read the file content using appropriate tools (e.g.,
read_file,pandas,pdf_reader). - Extract the specific data points needed.
- Do not proceed to web search until you have confirmed the file lacks the necessary information.
4. Cite Source Explicitly
When presenting data in the final output:
- Explicitly state which file the data came from.
- Example: "According to
Massabama_active_listings.xlsx..." - This verifies to the user that real data was used, not hallucinated.
5. Fallback to Search (Only if Necessary)
If the provided files do not contain the specific data needed:
- State clearly what was missing from the files.
- Then proceed with web search or estimation.
- Mark any non-file data as "External Search" or "Estimated".
Checklist
- Did I list all attached files?
- Did I open and read the relevant files?
- Did I verify the data exists in the files before searching?
- Did I cite the file name in my output?
- Did I avoid fabricating numbers that should have come from the file?
Example Usage
Task: Create a report on active property listings.
Context: Massabama_active_listings.xlsx is attached.
Incorrect Approach:
- Ignore the Excel file.
- Search web for "Massabama property listings".
- Fabricate numbers based on search snippets.
- Result: Inaccurate data, ignored source of truth.
Correct Approach:
- Identify
Massabama_active_listings.xlsxin context. - Load the Excel file.
- Count rows and sum prices directly from the sheet.
- Output: "Based on the 50 entries in
Massabama_active_listings.xlsx, the total value is..." - Result: Accurate data, verified source.
Warnings
- Hallucination Risk: Ignoring provided files is a primary cause of data fabrication.
- Efficiency: Reading a local file is faster and more reliable than web scraping.
- User Expectation: Users attach files expecting them to be used. Ignoring them is a failure of instruction following.
常见问题
智能体如何说明某个数字的来源?
这项技能要求智能体在最终回答中展示数据时,注明来源文件。
智能体可以把 PDF 作为数据来源吗?
可以。这项技能把 PDF 文件列为智能体应优先阅读的参考文件之一。
这会阻止 AI 使用网络吗?
不会。它只要求 AI 在搜索网络之前先检查你的文件。
详情
作者的原始描述
Ensures agents check and use provided context files for data before attempting external searches.
repo: HKUDS/AgentPilot
热度
- GitHub 星标
- 7.8k
- 排名
- #12952
- 许可证
- MIT
- 更新时间
- 2026/11/1
评论
- …
同一仓库的更多技能
agentpilot
7.8k帮你的智能体准备任务并运行 AgentPilot 循环,逐步改进项目:循环会提出修改、测试修改并为其打分。
openspace
7.8k帮你的智能体设置 OpenSpace,这是一个用于存储和获取智能体技能的工具,并通过 MCP 将其连接到你的 AI 应用。
rsi-arena
7.8k帮你的智能体设置并运行标准 AI 基准测试,例如 AIME 和 Terminal-Bench,用来比较不同的改进方法。
experiment-guide
7.8k帮你的智能体规划小型实验、阅读实验结果并记录发现,同时研究如何改进一个程序。