tool-calling / swival /eval.jsonl
jedisct1's picture
Add tool-calling harness dataset
bd43184 verified
Raw
History Blame Contribute Delete
3.54 kB
{"id":"eval-edit-line-number","prompt":"In settings.py, change only the second timeout value from 5 to 10. Do not change the first timeout.","files":{"settings.py":"timeout = 5\nretries = 2\ntimeout = 5\n"},"verify":{"settings.py":"timeout = 5\nretries = 2\ntimeout = 10\n"},"expected_tools":["read_file","edit_file"]}
{"id":"eval-grep-edit-test","prompt":"Find the Python function that accepts empty names, make it reject empty strings, and run `python3 -m pytest tests/test_names.py`.","files":{"src/names.py":"class NameError(Exception):\n pass\n\n\ndef normalize_name(name):\n if name is None:\n raise NameError('missing')\n return name.strip()\n","tests/test_names.py":"from src.names import NameError, normalize_name\n\n\ndef test_empty_name_rejected():\n try:\n normalize_name(' ')\n except NameError:\n return\n raise AssertionError('empty name accepted')\n","pytest.py":"import importlib.util\nimport pathlib\nimport sys\n\nfailed = 0\nfor raw in sys.argv[1:]:\n path = pathlib.Path(raw)\n spec = importlib.util.spec_from_file_location(path.stem, path)\n mod = importlib.util.module_from_spec(spec)\n spec.loader.exec_module(mod)\n for name in dir(mod):\n if name.startswith(\"test_\"):\n try:\n getattr(mod, name)()\n except Exception as exc:\n failed = 1\n print(f\"FAILED {raw}::{name}: {exc}\")\nif failed:\n sys.exit(1)\nprint(\"passed\")\n","pyproject.toml":"[tool.pytest.ini_options]\npythonpath = ['.']\n"},"verify":{"src/names.py":"class NameError(Exception):\n pass\n\n\ndef normalize_name(name):\n if name is None:\n raise NameError('missing')\n normalized = name.strip()\n if not normalized:\n raise NameError('missing')\n return normalized\n"},"expected_tools":["grep","read_file","edit_file","run_command"]}
{"id":"eval-batch-read-write","prompt":"Read README.md and pyproject.toml, then create docs/summary.md with the project name and one-sentence description.","files":{"README.md":"# Widget\n\nA tiny request router.\n","pyproject.toml":"[project]\nname = 'widget'\n"},"verify_contains":{"docs/summary.md":["widget","tiny request router"]},"expected_tools":["read_multiple_files","write_file"]}
{"id":"eval-delete-obsolete","prompt":"Delete obsolete.py and leave keep.py alone.","files":{"obsolete.py":"print('old')\n","keep.py":"print('keep')\n"},"verify_missing":["obsolete.py"],"verify":{"keep.py":"print('keep')\n"},"expected_tools":["delete_file"]}
{"id":"eval-command-argv","prompt":"Run the test command `python3 -m pytest tests/test_math.py` and report whether it passed. Use argv form, not a shell string.","files":{"mathlib.py":"def add(a, b):\n return a + b\n","tests/test_math.py":"from mathlib import add\n\n\ndef test_add():\n assert add(2, 3) == 5\n","pytest.py":"import importlib.util\nimport pathlib\nimport sys\n\nfailed = 0\nfor raw in sys.argv[1:]:\n path = pathlib.Path(raw)\n spec = importlib.util.spec_from_file_location(path.stem, path)\n mod = importlib.util.module_from_spec(spec)\n spec.loader.exec_module(mod)\n for name in dir(mod):\n if name.startswith(\"test_\"):\n try:\n getattr(mod, name)()\n except Exception as exc:\n failed = 1\n print(f\"FAILED {raw}::{name}: {exc}\")\nif failed:\n sys.exit(1)\nprint(\"passed\")\n"},"verify_command":["python3","-m","pytest","tests/test_math.py"],"expected_tools":["run_command"]}