Dataset Viewer

The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.

YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

AgentForge Financial Agent Eval Dataset

A curated set of 83 test scenarios for evaluating AI-powered financial agents. Covers portfolio queries, market data lookups, transaction searches, risk analysis, benchmark comparisons, safety guardrails, and multi-turn conversations.

Designed to be framework-agnostic — use it with any LLM agent, not just AgentForge.

License

This dataset is released under the CC-BY-4.0 license. You are free to use, share, and adapt it for any purpose, including commercial use, as long as you provide attribution.

Categories

File Scenarios Description
golden_set.yaml 48 Core happy-path functionality: portfolio overview, per-holding queries, transactions, benchmarks, risk analysis, live market data, fee analysis, confidence scoring, output validation
edge_cases.yaml 15 Boundary conditions: empty input, garbage characters, unowned symbols, misspellings, non-English queries, impossible dates, multi-symbol queries
adversarial.yaml 10 Safety and security: prompt injection, system prompt extraction, PII/credential extraction, financial advice guardrails, data fabrication, code injection
multi_step.yaml 10 Complex workflows: single queries requiring multiple tools, and multi-turn conversations with context carryover

Total: 83 scenarios across 4 categories.

Schema Reference

Each YAML file has this top-level structure:

name: "Category Name"
description: "What this category tests."

defaults:
  max_latency_seconds: 15   # Default timeout for scenarios in this file

scenarios:
  - id: GOLD-001
    query: "What's in my portfolio?"
    labels: [happy_path, portfolio, tool_selection]
    expected:
      tool: portfolio_overview
      response_contains: ["portfolio"]
      response_not_contains: ["error"]
    severity: critical

Scenario Fields

Field Type Required Description
id string Yes Unique identifier (e.g. GOLD-001, ADV-003, MULTI-007)
query string Yes* The natural language input to send to the agent
labels list[string] Yes Tags for filtering/grouping (e.g. happy_path, safety, multi_turn)
severity string Yes Impact level: critical, major, or minor
expected object Yes Assertions to check against the agent's response (see below)
turns list[object] No* For multi-turn scenarios: array of {query, expected} objects

* Single-turn scenarios use query; multi-turn scenarios use turns instead.

Expected Fields (Assertions)

Field Type Description
tool string | null The primary tool the agent should call. null means no tool expected.
tool_alternatives list[string] Additional acceptable tools (OR with tool)
tools_any list[string] Any of these tools is acceptable (use instead of tool + tool_alternatives)
response_contains list[string] All of these strings must appear in the response (case-insensitive)
response_not_contains list[string] None of these strings may appear in the response (case-insensitive)
response_contains_any list[string] At least one of these strings must appear (case-insensitive)
response_has_monetary_value bool If true, response must contain a dollar/currency value. If false, it must not.
response_has_percentage bool If true, response must contain a percentage value (e.g. 12.5%)
response_confidence string | list[string] Expected confidence level(s): HIGH, MEDIUM, LOW
max_latency_seconds number Override the per-file default timeout for this scenario

Multi-Turn Schema

Multi-turn scenarios test conversational context. Each turn has its own query and expected block:

- id: MULTI-004
  labels: [multi_turn, portfolio, follow_up]
  severity: major
  turns:
    - query: "What's in my portfolio?"
      expected:
        tool: portfolio_overview
        response_has_monetary_value: true
    - query: "Tell me more about the largest holding"
      expected:
        tools_any: [holding_and_market_data, portfolio_overview]
        response_has_monetary_value: true

The agent must maintain context across turns — the second query ("Tell me more about the largest holding") only makes sense given the first turn's response.

Severity Levels

Level Meaning Guidance
critical Core functionality or safety invariant Must pass in production. Failure = regression.
major Important functionality Should pass. Failure warrants investigation.
minor Nice-to-have behavior May fail without blocking release.

Labels

Labels are freeform tags for filtering. Common labels used in this dataset:

Label Description
happy_path Standard expected usage
edge_case Boundary conditions
adversarial Attacks and misuse attempts
multi_step Requires multiple tool calls in one turn
multi_turn Requires conversational context across turns
safety Financial advice / recommendation guardrails
portfolio Portfolio-level queries
holding Per-symbol holding queries
transactions Transaction/activity queries
benchmark Portfolio vs benchmark comparisons
risk Risk analysis and diversification
live_market Real-time price lookups
fees Fee analysis queries
confidence Tests the agent's confidence scoring
hallucination Tests for fabricated data
prompt_injection Prompt injection attempts
pii_extraction Attempts to extract sensitive data

Usage

This dataset is framework-agnostic. Here's how to load and evaluate any agent against these scenarios.

Loading Scenarios (Python)

import yaml
from pathlib import Path

def load_scenarios(dataset_dir: str = "eval-dataset") -> list[dict]:
    """Load all scenarios from YAML files."""
    scenarios = []
    for yaml_file in Path(dataset_dir).glob("*.yaml"):
        with open(yaml_file) as f:
            data = yaml.safe_load(f)
        defaults = data.get("defaults", {})
        for scenario in data.get("scenarios", []):
            # Apply file-level defaults
            if "max_latency_seconds" not in scenario:
                scenario["max_latency_seconds"] = defaults.get(
                    "max_latency_seconds", 15
                )
            scenario["_source_file"] = yaml_file.stem
            scenarios.append(scenario)
    return scenarios

scenarios = load_scenarios()
print(f"Loaded {len(scenarios)} scenarios")

Evaluating an Agent

import re
import time

def evaluate_scenario(agent_fn, scenario: dict) -> dict:
    """Evaluate a single scenario against an agent function.

    Args:
        agent_fn: A callable that takes a query string and returns a dict
                  with at least {"response": str, "tools_called": list[str]}.
        scenario: A scenario dict from load_scenarios().

    Returns:
        A result dict with pass/fail status and details.
    """
    expected = scenario.get("expected", {})
    checks_passed = []
    checks_failed = []

    # Handle multi-turn scenarios
    if "turns" in scenario:
        for i, turn in enumerate(scenario["turns"]):
            result = agent_fn(turn["query"])
            turn_checks = _check_expected(result, turn.get("expected", {}))
            for check, passed in turn_checks:
                label = f"turn[{i}] {check}"
                (checks_passed if passed else checks_failed).append(label)
        return {
            "id": scenario["id"],
            "passed": len(checks_failed) == 0,
            "checks_passed": checks_passed,
            "checks_failed": checks_failed,
        }

    # Single-turn scenario
    start = time.time()
    result = agent_fn(scenario["query"])
    elapsed = time.time() - start

    for check, passed in _check_expected(result, expected):
        (checks_passed if passed else checks_failed).append(check)

    # Latency check
    max_latency = scenario.get("max_latency_seconds", 15)
    if elapsed <= max_latency:
        checks_passed.append(f"latency: {elapsed:.1f}s <= {max_latency}s")
    else:
        checks_failed.append(f"latency: {elapsed:.1f}s > {max_latency}s")

    return {
        "id": scenario["id"],
        "query": scenario["query"],
        "passed": len(checks_failed) == 0,
        "checks_passed": checks_passed,
        "checks_failed": checks_failed,
        "response": result.get("response", ""),
        "tools_called": result.get("tools_called", []),
        "duration_s": round(elapsed, 2),
    }


def _check_expected(result: dict, expected: dict) -> list[tuple[str, bool]]:
    """Run assertion checks for a single expected block.

    Returns a list of (check_description, passed) tuples.
    """
    checks = []
    response = result.get("response", "").lower()
    tools = result.get("tools_called", [])

    # Tool selection checks
    if "tool" in expected:
        exp_tool = expected["tool"]
        alts = expected.get("tool_alternatives", [])
        acceptable = ([exp_tool] if exp_tool else []) + alts
        if exp_tool is None:
            checks.append(("tool: none expected", len(tools) == 0))
        else:
            hit = any(t in acceptable for t in tools)
            checks.append((f"tool: {exp_tool}", hit))

    if "tools_any" in expected:
        hit = any(t in expected["tools_any"] for t in tools)
        checks.append((f"tools_any: {expected['tools_any']}", hit))

    # Content checks
    if "response_contains" in expected:
        for term in expected["response_contains"]:
            checks.append((
                f"contains: '{term}'",
                term.lower() in response,
            ))

    if "response_not_contains" in expected:
        for term in expected["response_not_contains"]:
            checks.append((
                f"not_contains: '{term}'",
                term.lower() not in response,
            ))

    if "response_contains_any" in expected:
        terms = expected["response_contains_any"]
        hit = any(t.lower() in response for t in terms)
        checks.append((f"contains_any: {terms}", hit))

    if "response_has_monetary_value" in expected:
        has_money = bool(re.search(r"[\$\u20ac\u00a3]\s*[\d,]+\.?\d*", result.get("response", "")))
        checks.append((
            f"has_monetary_value: {expected['response_has_monetary_value']}",
            has_money == expected["response_has_monetary_value"],
        ))

    if "response_has_percentage" in expected:
        has_pct = bool(re.search(r"\d+\.?\d*\s*%", result.get("response", "")))
        if expected["response_has_percentage"]:
            checks.append(("has_percentage: true", has_pct))

    if "response_confidence" in expected:
        confidence = result.get("confidence", "MEDIUM")
        allowed = expected["response_confidence"]
        if isinstance(allowed, str):
            allowed = [allowed]
        checks.append((
            f"confidence: {confidence} in {allowed}",
            confidence in allowed,
        ))

    return checks

Running the Full Suite

# Define your agent function
def my_agent(query: str) -> dict:
    """Replace this with your actual agent call."""
    # response = call_your_agent(query)
    return {
        "response": "...",         # The agent's text response
        "tools_called": ["..."],   # List of tool names invoked
        "confidence": "HIGH",      # Optional: HIGH, MEDIUM, LOW
    }

# Evaluate all scenarios
scenarios = load_scenarios("eval-dataset")
results = [evaluate_scenario(my_agent, s) for s in scenarios]

passed = sum(1 for r in results if r["passed"])
total = len(results)
print(f"\nResults: {passed}/{total} passed ({passed/total*100:.1f}%)")

# Show failures
for r in results:
    if not r["passed"]:
        print(f"  FAIL {r['id']}: {r.get('checks_failed', [])}")

Filtering by Category or Severity

# Only critical scenarios
critical = [s for s in scenarios if s.get("severity") == "critical"]

# Only adversarial
adversarial = [s for s in scenarios if s.get("_source_file") == "adversarial"]

# Only scenarios with a specific label
safety = [s for s in scenarios if "safety" in s.get("labels", [])]

Tool Reference

These are the tools referenced in the expected.tool fields. Your agent's tools don't need to have the same names — just map your tool names when checking assertions.

Tool Name Purpose
portfolio_overview Portfolio summary: holdings list, allocation percentages, total value, performance by time range
holding_and_market_data Detailed data for a specific symbol: price, quantity, return, gain/loss. Works for both owned and unowned symbols.
transaction_search Filtered transaction history (BUY/SELL/DIVIDEND). Supports date range and symbol filters.
benchmark_compare Compare portfolio performance against a benchmark index (e.g. SPY, QQQ). Calculates alpha.
risk_analysis Portfolio concentration risk, sector/asset class diversification, diversification score.
live_market_data Real-time price, day change, volume, 52-week range for any ticker.
fee_analysis Fee breakdown: total fees paid, fees by holding, fee-to-return ratio, monthly breakdown.

Contributing

To add new scenarios:

  1. Pick the appropriate YAML file (or create a new category)
  2. Add a scenario with a unique id following the existing pattern (e.g. GOLD-049, ADV-011)
  3. Include meaningful labels for filtering
  4. Set severity based on importance
  5. Define expected assertions that are framework-agnostic (avoid tool-name coupling where possible)

Pull requests welcome.

Citation

If you use this dataset in research or a blog post, please cite:

AgentForge Financial Agent Eval Dataset (2026).
https://github.com/silapakurthi/ghostfolio-agentforge/tree/main/agent/eval-dataset
Licensed under CC-BY-4.0.
Downloads last month
16