FinanceReasoning
收藏资源简介:
FinanceReasoning是一个新颖的基准测试,旨在评估大型推理模型在金融数值推理问题中的推理能力。根据推理的难度,问题被分为三个子集:简单(1,000个例子)、中等(1,000个例子)和困难(238个例子)。数据集以json格式提供,包含问题ID、问题文本、上下文信息、统计信息、Python解决方案、标准答案、难度系数、难度级别和问题来源等属性。
FinanceReasoning is a novel benchmark designed to evaluate the reasoning capabilities of large-scale reasoning models in financial numerical reasoning problems. The problems are categorized into three subsets based on the difficulty level: Easy (1,000 examples), Medium (1,000 examples), and Hard (238 examples). The dataset is provided in JSON format and includes attributes such as problem ID, problem text, contextual information, statistical information, Python solution, standard answer, difficulty coefficient, difficulty level, and problem source.
FinanceReasoning 数据集概述
数据集简介
FinanceReasoning 是一个用于评估大型推理模型(LRMs)在金融数值推理问题中推理能力的基准测试数据集。该数据集基于推理难度分为三个子集:
- Easy:1,000 个示例
- Medium:1,000 个示例
- Hard:238 个示例
数据结构
数据集以 JSON 格式提供,包含以下属性:
主要数据
json { "question_id": "问题唯一标识符", "question": "问题文本,通常是金融数据分析问题", "context": "问题背景信息,包括 Markdown 格式的表格数据", "statistics": { "number_statistics": "数字统计信息", "operator_statistics": "运算符使用统计", "code_statistics": "代码相关统计" }, "python_solution": "金融专家编写的 Python 解决方案代码", "ground_truth": "标准答案,通常是执行 Python 解决方案的结果", "difficulty": "问题难度系数", "level": "问题难度级别(hard、medium、easy)", "source": "问题来源标识符" }
金融函数库
json { "function_id": "函数唯一标识符", "function": "函数代码", "function_docstring": "函数文档字符串" }
金融文档库
json { "document_id": "文档唯一标识符", "document": "文档文本", "document_docstring": "文档文档字符串" }
实验设置
环境配置
- 依赖安装:
pip install -r requirements.txt - 配置文件:
config/config.yaml控制推理和评估的所有方面
推理方法
-
基于配置的推理 bash python inference.py --config config/config.yaml
-
批量 API 推理 bash python utils/openai_batch.py --dataset "FinanceReasoning" --subset "hard" --prompt "cot" --model "your_model_id" --api_key "your_api_key" --base_url "your_base_url"
评估方法
bash python evaluation.py --config config/config.yaml
实验结果存储
- 推理结果存储在
results目录中 - CoT 输出存储在
results/FinanceReasoning/hard/raw_cot_outputs和results/FinanceReasoning/hard/processed_cot_outputs - PoT 输出存储在
results/FinanceReasoning/hard/raw_pot_outputs和results/FinanceReasoning/hard/processed_pot_outputs




