用安全工具链替代直接数据库访问,提升敏感数据解析的可靠性。
InData: Towards Secure Multi-Step, Tool-Based Data Analysis
- 通过预定义安全工具限制LLM直接操作数据
- 大模型在难题上准确率仅69.6%,暴露多步推理短板
- 适合关注数据安全与复杂分析能力评估的研究者
用于数据解析的大语言模型代理通常直接在数据库上生成并执行代码。但在处理敏感数据时,这种做法存在重大安全风险。为此,我们提出一种以安全为导向的替代方案:限制LLM直接生成代码或访问数据,要求其仅通过一组预先定义的、经过验证的安全工具与数据交互。尽管已有工具使用基准,但主要针对工具选择和简单执行,而非复杂数据解析所需的组合式多步推理。为缩小这一差距,我们引入间接数据参与(InData)数据集,用于评估LLM的多步工具推理能力。InData包含三个难度等级(易、中、难)的数据分析问题,反映推理复杂度递增。我们在15个开源LLM上进行基准测试,发现大模型(如gpt-oss-120b)在易题上准确率达97.3%,但在难题上骤降至69.6%。结果表明当前LLM仍缺乏稳健的多步工具使用推理能力。InData推动了具备更强多步工具使用能力的LLM开发与评估进程。我们将公开发布数据集与代码。
原文摘要 · Abstract (English)
Large language model agents for data analysis typically generate and execute code directly on databases. However, when applied to sensitive data, this approach poses significant security risks. To address this issue, we propose a security-motivated alternative: restrict LLMs from direct code generation and data access, and require them to interact with data exclusively through a predefined set of secure, verified tools. Although recent tool-use benchmarks exist, they primarily target tool selection and simple execution rather than the compositional, multi-step reasoning needed for complex data analysis. To reduce this gap, we introduce Indirect Data Engagement (InData), a dataset designed to assess LLMs' multi-step tool-based reasoning ability. InData includes data analysis questions at three difficulty levels--Easy, Medium, and Hard--capturing increasing reasoning complexity. We benchmark 15 open-source LLMs on InData and find that while large models (e.g., gpt-oss-120b) achieve high accuracy on Easy tasks (97.3%), performance drops sharply on Hard tasks (69.6%). These results show that current LLMs still lack robust multi-step tool-based reasoning ability. With InData, we take a step toward enabling the development and evaluation of LLMs with stronger multi-step tool-use capabilities. We will publicly release the dataset and code.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。