CoolFace
Datasetpublic

pranavvmurthy26/synthetic-financial-tool-calling-grpo-rlvr-1k

🤖 Synthetic Financial Tool Calling Dataset for GRPO and RLVR This is a synthetic dataset designed for training language models on financial tool calling using GRPO (Group Relative Policy Optimization) with verifiable rewards (RLVR). The dataset contains ~1.1K examples of financial planning queries paired with expected tool calls and answers. Dataset sample schema, { "prompt": [ { "role": "system", "content": "You are a financial planning assistant with tools… See the full description on the dataset page: https://huggingface.co/datasets/pranavvmurthy26/synthetic-financial-tool-calling-grpo-rlvr-1k.

sourceHugging Faceapache-2.0updated 8mo agoView on Hugging Face
2likes45downloads
Dataset Card

🤖 Synthetic Financial Tool Calling Dataset for GRPO and RLVR

This is a synthetic dataset designed for training language models on financial tool calling using GRPO (Group Relative Policy Optimization) with verifiable rewards (RLVR). The dataset contains ~1.1K examples of financial planning queries paired with expected tool calls and answers.

Dataset sample schema,

json
{
  "prompt": [
    {
      "role": "system",
      "content": "You are a financial planning assistant with tools for portfolio allocation, mortgage affordability, tax optimization, retirement readiness, debt payoff strategies, insurance needs, education funding, and currency exchange.\nAnalyze user requests and call the appropriate tool with all required parameters extracted from their query.\nReturn concise answers with key metrics. Do not ask for clarification - use reasonable defaults if needed."
    },
    {
      "role": "user",
      "content": "Age 30, retiring at 58, $95k saved, $15k annual contributions, 75% employer match. Aggressive 8.5% returns, 2.5% inflation. Want $60k retirement income, Social Security $20k at 62, no pension, healthcare $9k/year. Living to 90."
    }
  ],
  "answer": "Projected Savings: $3,656,004, Annual Gap: $117,758, Readiness: 97%, Status: Nearly There",
  "ground_truth": {
    "name": "calculate_retirement_readiness",
    "arguments": {
      "current_age": 30,
      "retirement_age": 58,
      "current_savings": 95000,
      "annual_contribution": 15000,
      "employer_match_percent": 0.75,
      "expected_return": 0.085,
      "inflation_rate": 0.025,
      "desired_retirement_income": 60000,
      "social_security_estimate": 20000,
      "pension_income": 0,
      "healthcare_cost_annual": 9000,
      "life_expectancy": 90
    }
  }
}

Fine-tuning an LLM using Reinforcement learning leverages prompt and uses answer optionally to verify reward.

📄 Schema

ColumnTypeDescription
promptlist[dict]A conversation-style prompt with role (system/user) and content fields. The system message defines the assistant's capabilities, and the user message contains a natural language financial query.
answerstringThe expected human-readable output from executing the correct tool call (e.g., insurance coverage recommendations with premiums).
ground_truthstringA JSON string containing the exact tool call specification with name (function name) and arguments (parameter dictionary) that should be invoked to answer the query.

📊 How the Data is Used

The dataset is used with a GRPO trainer for tool-calling optimization:

  1. 1.Dataset Loading: Loads prompts, answers, and ground truth tool calls
  2. 2.Model Generation: The model generates completions (tool calls) given the prompts
  3. 3.Tool Execution: Generated tool calls are executed against actual tool functions
  4. 4.Reward Computation: The reward function compares tool execution results against expected answers
  5. 5.Policy Optimization: GRPO uses rewards to optimize tool-calling behavior through relative comparisons across generations

🛠️ Tool Description and Rewards

Tools

Reference: `financial_tools_complex.py`

The dataset targets 8 financial planning functions with complex argument structures (8-12 parameters each):

ToolPurpose
calculate_portfolio_allocationOptimal asset allocation based on risk tolerance, time horizon, age, and preferences
calculate_mortgage_affordabilityMaximum home price and monthly payment breakdown
optimize_tax_strategyTax liability calculation with optimization recommendations
calculate_retirement_readinessRetirement savings projection and readiness assessment
analyze_debt_payoff_strategyOptimal debt payoff approach (avalanche/snowball/hybrid)
calculate_insurance_needsLife, disability, and LTC insurance coverage recommendations
calculate_education_fundingCollege savings projections and funding gap analysis
calculate_currency_exchange_arbitrageCurrency exchange optimization with fee analysis

Each function returns a deterministic string result, enabling exact-match reward computation during training.

📈 Reward Function

Reference: `financial_tools_reward.py`

The reward function implements a 3-tier scheme:

RewardCondition
1.0Tool response exactly matches the expected answer
0.1A tool was called but the response doesn't match
0.0No tool call was made

This structure encourages the model to: (1) learn to make tool calls, and (2) learn to make the correct tool calls with proper arguments.

🦾 Dataset generation

This dataset was generated with the help of kiro.dev.

Citation

If you use this dataset, please cite:

bibtex
@dataset{pranavvmurthy26-synthetic-financial-tool-calling-grpo-rlvr-1k,
  title={Synthetic Financial Tool Calling GRPO RLVR Dataset},
  author={Murthy, Pranav},
  journel={},
  year={2026}
}