quantdiff 0.1.0rc1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. quantdiff/__init__.py +53 -0
  2. quantdiff/__main__.py +5 -0
  3. quantdiff/_http.py +151 -0
  4. quantdiff/_text.py +13 -0
  5. quantdiff/_version.py +1 -0
  6. quantdiff/api.py +340 -0
  7. quantdiff/backends/__init__.py +28 -0
  8. quantdiff/backends/_common.py +342 -0
  9. quantdiff/backends/base.py +91 -0
  10. quantdiff/backends/llamacpp.py +428 -0
  11. quantdiff/backends/ollama.py +359 -0
  12. quantdiff/backends/openai_compat.py +338 -0
  13. quantdiff/cache.py +240 -0
  14. quantdiff/card.py +1664 -0
  15. quantdiff/cli.py +377 -0
  16. quantdiff/discover.py +488 -0
  17. quantdiff/errors.py +45 -0
  18. quantdiff/metrics/__init__.py +36 -0
  19. quantdiff/metrics/codeexec.py +428 -0
  20. quantdiff/metrics/jsonschema.py +610 -0
  21. quantdiff/metrics/logit.py +214 -0
  22. quantdiff/metrics/tasks.py +114 -0
  23. quantdiff/metrics/textsim.py +66 -0
  24. quantdiff/metrics/toolcheck.py +99 -0
  25. quantdiff/png.py +360 -0
  26. quantdiff/preflight.py +365 -0
  27. quantdiff/progress.py +283 -0
  28. quantdiff/py.typed +0 -0
  29. quantdiff/report.py +780 -0
  30. quantdiff/runner.py +492 -0
  31. quantdiff/spec.py +154 -0
  32. quantdiff/stats.py +226 -0
  33. quantdiff/suites/__init__.py +462 -0
  34. quantdiff/suites/data/chat.jsonl +22 -0
  35. quantdiff/suites/data/code.jsonl +32 -0
  36. quantdiff/suites/data/json.jsonl +34 -0
  37. quantdiff/suites/data/scoring.jsonl +41 -0
  38. quantdiff/suites/data/tools.jsonl +32 -0
  39. quantdiff/types.py +322 -0
  40. quantdiff/verdict.py +1513 -0
  41. quantdiff-0.1.0rc1.dist-info/METADATA +514 -0
  42. quantdiff-0.1.0rc1.dist-info/RECORD +45 -0
  43. quantdiff-0.1.0rc1.dist-info/WHEEL +4 -0
  44. quantdiff-0.1.0rc1.dist-info/entry_points.txt +2 -0
  45. quantdiff-0.1.0rc1.dist-info/licenses/LICENSE +202 -0
@@ -0,0 +1,22 @@
1
+ {"id": "chat-001", "kind": "chat", "messages": [{"role": "system", "content": "You are a concise assistant. Answer exactly what is asked, with no preamble."}, {"role": "user", "content": "What is the chemical symbol for gold? Answer with the symbol only."}], "max_tokens": 16}
2
+ {"id": "chat-002", "kind": "chat", "messages": [{"role": "system", "content": "You are a concise assistant. Answer exactly what is asked, with no preamble."}, {"role": "user", "content": "What is 17 multiplied by 23? Answer with the number only."}], "max_tokens": 16}
3
+ {"id": "chat-003", "kind": "chat", "messages": [{"role": "system", "content": "You are a concise assistant. Answer exactly what is asked, with no preamble."}, {"role": "user", "content": "List the eight planets of the solar system in order from the Sun, separated by commas."}], "max_tokens": 64}
4
+ {"id": "chat-004", "kind": "chat", "messages": [{"role": "system", "content": "You are a concise assistant. Answer exactly what is asked, with no preamble."}, {"role": "user", "content": "Rewrite in the passive voice: \"The committee approved the new budget.\""}], "max_tokens": 48}
5
+ {"id": "chat-005", "kind": "chat", "messages": [{"role": "system", "content": "You are a concise assistant. Answer exactly what is asked, with no preamble."}, {"role": "user", "content": "How many minutes are there in 3.5 hours? Answer with the number only."}], "max_tokens": 16}
6
+ {"id": "chat-006", "kind": "chat", "messages": [{"role": "system", "content": "You are a concise assistant. Answer exactly what is asked, with no preamble."}, {"role": "user", "content": "Sort these words alphabetically and return them separated by commas: pear, apple, mango, banana, cherry."}], "max_tokens": 48}
7
+ {"id": "chat-007", "kind": "chat", "messages": [{"role": "system", "content": "You are a concise assistant. Answer exactly what is asked, with no preamble."}, {"role": "user", "content": "What does the abbreviation HTTP stand for?"}], "max_tokens": 32}
8
+ {"id": "chat-008", "kind": "chat", "messages": [{"role": "system", "content": "You are a concise assistant. Answer exactly what is asked, with no preamble."}, {"role": "user", "content": "Give the past tense of these verbs, separated by commas: go, see, write, bring, teach."}], "max_tokens": 48}
9
+ {"id": "chat-009", "kind": "chat", "messages": [{"role": "system", "content": "You are a concise assistant. Answer exactly what is asked, with no preamble."}, {"role": "user", "content": "Define photosynthesis in one sentence."}], "max_tokens": 96}
10
+ {"id": "chat-010", "kind": "chat", "messages": [{"role": "system", "content": "You are a concise assistant. Answer exactly what is asked, with no preamble."}, {"role": "user", "content": "Convert 5 kilometers to meters. Answer with the number only."}], "max_tokens": 16}
11
+ {"id": "chat-011", "kind": "chat", "messages": [{"role": "system", "content": "You are a concise assistant. Answer exactly what is asked, with no preamble."}, {"role": "user", "content": "Rewrite this message in a formal tone: \"hey, can u send me the report asap? thx\""}], "max_tokens": 96}
12
+ {"id": "chat-012", "kind": "chat", "messages": [{"role": "system", "content": "You are a concise assistant. Answer exactly what is asked, with no preamble."}, {"role": "user", "content": "Write 0.375 as a fraction in lowest terms. Answer with the fraction only."}], "max_tokens": 16}
13
+ {"id": "chat-013", "kind": "chat", "messages": [{"role": "system", "content": "You are a concise assistant. Answer exactly what is asked, with no preamble."}, {"role": "user", "content": "Translate into Spanish: \"The library opens at nine in the morning.\""}], "max_tokens": 48}
14
+ {"id": "chat-014", "kind": "chat", "messages": [{"role": "system", "content": "You are a concise assistant. Answer exactly what is asked, with no preamble."}, {"role": "user", "content": "Spell the word \"necessary\" backwards."}], "max_tokens": 32}
15
+ {"id": "chat-015", "kind": "chat", "messages": [{"role": "system", "content": "You are a concise assistant. Answer exactly what is asked, with no preamble."}, {"role": "user", "content": "What is the boiling point of water at sea level in degrees Fahrenheit? Answer with the number only."}], "max_tokens": 16}
16
+ {"id": "chat-016", "kind": "chat", "messages": [{"role": "system", "content": "You are a concise assistant. Answer exactly what is asked, with no preamble."}, {"role": "user", "content": "Name the three primary colors of light, separated by commas."}], "max_tokens": 32}
17
+ {"id": "chat-017", "kind": "chat", "messages": [{"role": "system", "content": "You are a concise assistant. Answer exactly what is asked, with no preamble."}, {"role": "user", "content": "Summarize in one sentence: \"The city council voted on Tuesday to extend the bike lane network by 40 kilometers over the next three years. The plan is funded by a regional transport grant and will prioritize routes near schools.\""}], "max_tokens": 96}
18
+ {"id": "chat-018", "kind": "chat", "messages": [{"role": "system", "content": "You are a concise assistant. Answer exactly what is asked, with no preamble."}, {"role": "user", "content": "What is the largest ocean on Earth? Answer with its name only."}], "max_tokens": 16}
19
+ {"id": "chat-019", "kind": "chat", "messages": [{"role": "system", "content": "You are a concise assistant. Answer exactly what is asked, with no preamble."}, {"role": "user", "content": "Count the words in this sentence: \"Small models can still be very useful tools.\" Answer with the number only."}], "max_tokens": 16}
20
+ {"id": "chat-020", "kind": "chat", "messages": [{"role": "system", "content": "You are a concise assistant. Answer exactly what is asked, with no preamble."}, {"role": "user", "content": "Write the word \"banana\" with a hyphen between each letter."}], "max_tokens": 32}
21
+ {"id": "chat-021", "kind": "chat", "messages": [{"role": "system", "content": "You are a concise assistant. Answer exactly what is asked, with no preamble."}, {"role": "user", "content": "Give a one-sentence definition of a prime number."}], "max_tokens": 64}
22
+ {"id": "chat-022", "kind": "chat", "messages": [{"role": "system", "content": "You are a concise assistant. Answer exactly what is asked, with no preamble."}, {"role": "user", "content": "Convert the time 7:45 PM to 24-hour format. Answer with the time only."}], "max_tokens": 16}
@@ -0,0 +1,32 @@
1
+ {"id": "code-001", "kind": "code", "messages": [{"role": "system", "content": "You are an expert Python programmer. Reply with a single Python code block that defines the requested function. Use only the standard library. Do not include tests, examples or explanations."}, {"role": "user", "content": "Write a Python function `reverse_words(text: str) -> str`.\n\nReturn the words of `text` in reverse order, joined by single spaces. Words are\nseparated by any amount of whitespace; leading and trailing whitespace is ignored.\n\nReturn only the code."}], "max_tokens": 512, "entry_point": "reverse_words", "tests": "assert reverse_words(\"hello world\") == \"world hello\"\nassert reverse_words(\" one two three \") == \"three two one\"\nassert reverse_words(\"single\") == \"single\"\nassert reverse_words(\"\") == \"\"\n"}
2
+ {"id": "code-002", "kind": "code", "messages": [{"role": "system", "content": "You are an expert Python programmer. Reply with a single Python code block that defines the requested function. Use only the standard library. Do not include tests, examples or explanations."}, {"role": "user", "content": "Write a Python function `is_palindrome(text: str) -> bool`.\n\nReturn True if `text` reads the same forwards and backwards when only letters and\ndigits are considered and case is ignored. An empty string is a palindrome.\n\nReturn only the code."}], "max_tokens": 512, "entry_point": "is_palindrome", "tests": "assert is_palindrome(\"A man, a plan, a canal: Panama\") is True\nassert is_palindrome(\"race a car\") is False\nassert is_palindrome(\"\") is True\nassert is_palindrome(\"No 'x' in Nixon\") is True\nassert is_palindrome(\"ab\") is False\n"}
3
+ {"id": "code-003", "kind": "code", "messages": [{"role": "system", "content": "You are an expert Python programmer. Reply with a single Python code block that defines the requested function. Use only the standard library. Do not include tests, examples or explanations."}, {"role": "user", "content": "Write a Python function `parse_duration(text: str) -> int`.\n\nConvert a duration such as \"1h30m15s\" into a number of seconds. The string contains\none or more parts, each a non-negative integer followed by one of the units d, h, m\nor s, in any order. Raise ValueError for an empty string or any other format.\n\nReturn only the code."}], "max_tokens": 512, "entry_point": "parse_duration", "tests": "assert parse_duration(\"1h30m15s\") == 5415\nassert parse_duration(\"45s\") == 45\nassert parse_duration(\"2d\") == 172800\nassert parse_duration(\"10m1h\") == 4200\nfor bad in (\"\", \"10\", \"5x\", \"h1\"):\n try:\n parse_duration(bad)\n except ValueError:\n pass\n else:\n raise AssertionError(f\"expected ValueError for {bad!r}\")\n"}
4
+ {"id": "code-004", "kind": "code", "messages": [{"role": "system", "content": "You are an expert Python programmer. Reply with a single Python code block that defines the requested function. Use only the standard library. Do not include tests, examples or explanations."}, {"role": "user", "content": "Write a Python function `fizzbuzz(n: int) -> list[str]`.\n\nReturn a list of strings for the numbers 1 to n inclusive: \"Fizz\" for multiples of 3,\n\"Buzz\" for multiples of 5, \"FizzBuzz\" for multiples of both, otherwise the number\nitself as a string. Return an empty list when n < 1.\n\nReturn only the code."}], "max_tokens": 512, "entry_point": "fizzbuzz", "tests": "assert fizzbuzz(5) == [\"1\", \"2\", \"Fizz\", \"4\", \"Buzz\"]\nassert fizzbuzz(15)[-1] == \"FizzBuzz\"\nassert fizzbuzz(0) == []\nassert len(fizzbuzz(100)) == 100\n"}
5
+ {"id": "code-005", "kind": "code", "messages": [{"role": "system", "content": "You are an expert Python programmer. Reply with a single Python code block that defines the requested function. Use only the standard library. Do not include tests, examples or explanations."}, {"role": "user", "content": "Write a Python function `roman_to_int(numeral: str) -> int`.\n\nConvert a valid Roman numeral in uppercase (I, V, X, L, C, D, M with subtractive\nnotation such as IV and CM) to an integer between 1 and 3999.\n\nReturn only the code."}], "max_tokens": 512, "entry_point": "roman_to_int", "tests": "assert roman_to_int(\"III\") == 3\nassert roman_to_int(\"IV\") == 4\nassert roman_to_int(\"MCMXCIV\") == 1994\nassert roman_to_int(\"MMMCMXCIX\") == 3999\nassert roman_to_int(\"XLII\") == 42\n"}
6
+ {"id": "code-006", "kind": "code", "messages": [{"role": "system", "content": "You are an expert Python programmer. Reply with a single Python code block that defines the requested function. Use only the standard library. Do not include tests, examples or explanations."}, {"role": "user", "content": "Write a Python function `flatten(items: list) -> list`.\n\nFlatten an arbitrarily nested list into a flat list, keeping the left-to-right order\nof the non-list elements. Tuples and strings are not flattened.\n\nReturn only the code."}], "max_tokens": 512, "entry_point": "flatten", "tests": "assert flatten([1, [2, [3, [4]], 5]]) == [1, 2, 3, 4, 5]\nassert flatten([]) == []\nassert flatten([[], [[]], [[], [6]]]) == [6]\nassert flatten([\"ab\", (1, 2), [\"c\"]]) == [\"ab\", (1, 2), \"c\"]\n"}
7
+ {"id": "code-007", "kind": "code", "messages": [{"role": "system", "content": "You are an expert Python programmer. Reply with a single Python code block that defines the requested function. Use only the standard library. Do not include tests, examples or explanations."}, {"role": "user", "content": "Write a Python function `merge_intervals(intervals: list[tuple[int, int]]) -> list[tuple[int, int]]`.\n\nMerge overlapping closed intervals given as (start, end) tuples with start <= end.\nIntervals that touch, such as (1, 3) and (3, 5), also merge. Return the merged\nintervals as tuples sorted by start. The input may be unsorted.\n\nReturn only the code."}], "max_tokens": 512, "entry_point": "merge_intervals", "tests": "assert merge_intervals([(1, 3), (2, 6), (8, 10), (15, 18)]) == [(1, 6), (8, 10), (15, 18)]\nassert merge_intervals([(1, 3), (3, 5)]) == [(1, 5)]\nassert merge_intervals([(5, 7), (1, 2)]) == [(1, 2), (5, 7)]\nassert merge_intervals([]) == []\nassert merge_intervals([(1, 10), (2, 3), (4, 5)]) == [(1, 10)]\n"}
8
+ {"id": "code-008", "kind": "code", "messages": [{"role": "system", "content": "You are an expert Python programmer. Reply with a single Python code block that defines the requested function. Use only the standard library. Do not include tests, examples or explanations."}, {"role": "user", "content": "Write a Python function `caesar_shift(text: str, shift: int) -> str`.\n\nShift every ASCII letter in `text` by `shift` positions in the alphabet, wrapping\naround and preserving case. `shift` may be negative or larger than 26. All other\ncharacters are unchanged.\n\nReturn only the code."}], "max_tokens": 512, "entry_point": "caesar_shift", "tests": "assert caesar_shift(\"abc\", 1) == \"bcd\"\nassert caesar_shift(\"Hello, World!\", 3) == \"Khoor, Zruog!\"\nassert caesar_shift(\"xyz\", 3) == \"abc\"\nassert caesar_shift(\"Abc\", -1) == \"Zab\"\nassert caesar_shift(\"abc\", 53) == \"bcd\"\n"}
9
+ {"id": "code-009", "kind": "code", "messages": [{"role": "system", "content": "You are an expert Python programmer. Reply with a single Python code block that defines the requested function. Use only the standard library. Do not include tests, examples or explanations."}, {"role": "user", "content": "Write a Python function `run_length_encode(text: str) -> str`.\n\nCompress `text` by replacing each run of identical characters with the character\nfollowed by the run length, for example \"aaabcc\" becomes \"a3b1c2\".\n\nReturn only the code."}], "max_tokens": 512, "entry_point": "run_length_encode", "tests": "assert run_length_encode(\"aaabcc\") == \"a3b1c2\"\nassert run_length_encode(\"\") == \"\"\nassert run_length_encode(\"x\") == \"x1\"\nassert run_length_encode(\"aaaaaaaaaaaab\") == \"a12b1\"\nassert run_length_encode(\"abab\") == \"a1b1a1b1\"\n"}
10
+ {"id": "code-010", "kind": "code", "messages": [{"role": "system", "content": "You are an expert Python programmer. Reply with a single Python code block that defines the requested function. Use only the standard library. Do not include tests, examples or explanations."}, {"role": "user", "content": "Write a Python function `is_valid_ipv4(address: str) -> bool`.\n\nReturn True if `address` is a dotted-decimal IPv4 address: exactly four parts\nseparated by dots, each a decimal number from 0 to 255 written with digits only and\nwithout leading zeros (except the single digit 0).\n\nReturn only the code."}], "max_tokens": 512, "entry_point": "is_valid_ipv4", "tests": "assert is_valid_ipv4(\"192.168.0.1\") is True\nassert is_valid_ipv4(\"255.255.255.255\") is True\nassert is_valid_ipv4(\"256.1.1.1\") is False\nassert is_valid_ipv4(\"01.2.3.4\") is False\nassert is_valid_ipv4(\"1.2.3\") is False\nassert is_valid_ipv4(\"1.2.3.-4\") is False\n"}
11
+ {"id": "code-011", "kind": "code", "messages": [{"role": "system", "content": "You are an expert Python programmer. Reply with a single Python code block that defines the requested function. Use only the standard library. Do not include tests, examples or explanations."}, {"role": "user", "content": "Write a Python function `binary_search(items: list[int], target: int) -> int`.\n\n`items` is sorted in ascending order and may contain duplicates. Return the index of\nthe first occurrence of `target`, or -1 if it is not present.\n\nReturn only the code."}], "max_tokens": 512, "entry_point": "binary_search", "tests": "assert binary_search([1, 3, 5, 7, 9], 7) == 3\nassert binary_search([1, 3, 5, 7, 9], 4) == -1\nassert binary_search([], 1) == -1\nassert binary_search([2, 2, 2, 3], 2) == 0\nassert binary_search([1, 2, 4, 4, 4, 5], 4) == 2\n"}
12
+ {"id": "code-012", "kind": "code", "messages": [{"role": "system", "content": "You are an expert Python programmer. Reply with a single Python code block that defines the requested function. Use only the standard library. Do not include tests, examples or explanations."}, {"role": "user", "content": "Write a Python function `balanced_brackets(text: str) -> bool`.\n\nReturn True if every (, [ and { in `text` is closed by the matching bracket in the\ncorrect order. Characters other than brackets are ignored.\n\nReturn only the code."}], "max_tokens": 512, "entry_point": "balanced_brackets", "tests": "assert balanced_brackets(\"([]{})\") is True\nassert balanced_brackets(\"([)]\") is False\nassert balanced_brackets(\"f(x[0]) + {y}\") is True\nassert balanced_brackets(\"((\") is False\nassert balanced_brackets(\"\") is True\nassert balanced_brackets(\"}{\") is False\n"}
13
+ {"id": "code-013", "kind": "code", "messages": [{"role": "system", "content": "You are an expert Python programmer. Reply with a single Python code block that defines the requested function. Use only the standard library. Do not include tests, examples or explanations."}, {"role": "user", "content": "Write a Python function `camel_to_snake(name: str) -> str`.\n\nConvert a camelCase or PascalCase identifier to snake_case. A run of capitals is\ntreated as one word (an acronym), so \"parseHTTPResponse\" becomes\n\"parse_http_response\" and \"HTTPServer\" becomes \"http_server\". Digits stay attached\nto the preceding word.\n\nReturn only the code."}], "max_tokens": 512, "entry_point": "camel_to_snake", "tests": "assert camel_to_snake(\"camelCase\") == \"camel_case\"\nassert camel_to_snake(\"PascalCase\") == \"pascal_case\"\nassert camel_to_snake(\"parseHTTPResponse\") == \"parse_http_response\"\nassert camel_to_snake(\"HTTPServer\") == \"http_server\"\nassert camel_to_snake(\"version2Update\") == \"version2_update\"\nassert camel_to_snake(\"simple\") == \"simple\"\n"}
14
+ {"id": "code-014", "kind": "code", "messages": [{"role": "system", "content": "You are an expert Python programmer. Reply with a single Python code block that defines the requested function. Use only the standard library. Do not include tests, examples or explanations."}, {"role": "user", "content": "Write a Python function `primes_up_to(limit: int) -> list[int]`.\n\nReturn all prime numbers less than or equal to `limit`, in ascending order. Return an\nempty list when `limit` < 2. It must handle limit = 100000 quickly.\n\nReturn only the code."}], "max_tokens": 512, "entry_point": "primes_up_to", "tests": "assert primes_up_to(10) == [2, 3, 5, 7]\nassert primes_up_to(1) == []\nassert primes_up_to(2) == [2]\nassert len(primes_up_to(100000)) == 9592\n"}
15
+ {"id": "code-015", "kind": "code", "messages": [{"role": "system", "content": "You are an expert Python programmer. Reply with a single Python code block that defines the requested function. Use only the standard library. Do not include tests, examples or explanations."}, {"role": "user", "content": "Write a Python function `median(values: list[float]) -> float`.\n\nReturn the median of a non-empty list of numbers as a float. For an even number of\nvalues, return the mean of the two middle values. Do not modify the input list.\nRaise ValueError for an empty list.\n\nReturn only the code."}], "max_tokens": 512, "entry_point": "median", "tests": "assert median([3, 1, 2]) == 2.0\nassert median([4, 1, 3, 2]) == 2.5\nassert median([7]) == 7.0\ndata = [5, 1, 4]\nmedian(data)\nassert data == [5, 1, 4]\ntry:\n median([])\nexcept ValueError:\n pass\nelse:\n raise AssertionError(\"expected ValueError\")\n"}
16
+ {"id": "code-016", "kind": "code", "messages": [{"role": "system", "content": "You are an expert Python programmer. Reply with a single Python code block that defines the requested function. Use only the standard library. Do not include tests, examples or explanations."}, {"role": "user", "content": "Write a Python function `rotate_right(items: list, k: int) -> list`.\n\nReturn a new list with the elements of `items` rotated k positions to the right.\nk may be larger than the length or negative (a negative k rotates left). An empty\nlist stays empty.\n\nReturn only the code."}], "max_tokens": 512, "entry_point": "rotate_right", "tests": "assert rotate_right([1, 2, 3, 4, 5], 2) == [4, 5, 1, 2, 3]\nassert rotate_right([1, 2, 3], 4) == [3, 1, 2]\nassert rotate_right([1, 2, 3], -1) == [2, 3, 1]\nassert rotate_right([], 3) == []\nassert rotate_right([1, 2], 0) == [1, 2]\n"}
17
+ {"id": "code-017", "kind": "code", "messages": [{"role": "system", "content": "You are an expert Python programmer. Reply with a single Python code block that defines the requested function. Use only the standard library. Do not include tests, examples or explanations."}, {"role": "user", "content": "Write a Python function `dedupe(items: list) -> list`.\n\nReturn a new list with duplicate elements removed, keeping the first occurrence of\neach and preserving the original order. Elements are hashable.\n\nReturn only the code."}], "max_tokens": 512, "entry_point": "dedupe", "tests": "assert dedupe([3, 1, 3, 2, 1]) == [3, 1, 2]\nassert dedupe([]) == []\nassert dedupe([\"b\", \"a\", \"b\", \"c\", \"a\"]) == [\"b\", \"a\", \"c\"]\nassert dedupe([1, 1, 1]) == [1]\n"}
18
+ {"id": "code-018", "kind": "code", "messages": [{"role": "system", "content": "You are an expert Python programmer. Reply with a single Python code block that defines the requested function. Use only the standard library. Do not include tests, examples or explanations."}, {"role": "user", "content": "Write a Python function `parse_query(query: str) -> dict[str, list[str]]`.\n\nParse a URL query string such as \"a=1&b=2&a=3\" into a dict that maps each key to the\nlist of its values in order of appearance. A parameter without \"=\" has the value \"\".\nEmpty segments (for example from \"&&\") are skipped. Only the first \"=\" in a segment\nseparates key from value. Do not decode percent escapes.\n\nReturn only the code."}], "max_tokens": 512, "entry_point": "parse_query", "tests": "assert parse_query(\"a=1&b=2&a=3\") == {\"a\": [\"1\", \"3\"], \"b\": [\"2\"]}\nassert parse_query(\"\") == {}\nassert parse_query(\"flag&x=\") == {\"flag\": [\"\"], \"x\": [\"\"]}\nassert parse_query(\"k=a=b&&k=c\") == {\"k\": [\"a=b\", \"c\"]}\n"}
19
+ {"id": "code-019", "kind": "code", "messages": [{"role": "system", "content": "You are an expert Python programmer. Reply with a single Python code block that defines the requested function. Use only the standard library. Do not include tests, examples or explanations."}, {"role": "user", "content": "Write a Python function `format_bytes(size: int) -> str`.\n\nFormat a non-negative byte count using binary units B, KiB, MiB, GiB and TiB. Use\nthe largest unit for which the value is at least 1. Bytes are shown as an integer\n(\"512 B\"); other units with exactly one decimal place (\"1.5 KiB\").\n\nReturn only the code."}], "max_tokens": 512, "entry_point": "format_bytes", "tests": "assert format_bytes(0) == \"0 B\"\nassert format_bytes(1023) == \"1023 B\"\nassert format_bytes(1024) == \"1.0 KiB\"\nassert format_bytes(1536) == \"1.5 KiB\"\nassert format_bytes(5 * 1024**3) == \"5.0 GiB\"\nassert format_bytes(3 * 1024**5) == \"3072.0 TiB\"\n"}
20
+ {"id": "code-020", "kind": "code", "messages": [{"role": "system", "content": "You are an expert Python programmer. Reply with a single Python code block that defines the requested function. Use only the standard library. Do not include tests, examples or explanations."}, {"role": "user", "content": "Write a Python function `longest_common_prefix(words: list[str]) -> str`.\n\nReturn the longest string that is a prefix of every word in `words`. Return \"\" for\nan empty list.\n\nReturn only the code."}], "max_tokens": 512, "entry_point": "longest_common_prefix", "tests": "assert longest_common_prefix([\"flower\", \"flow\", \"flight\"]) == \"fl\"\nassert longest_common_prefix([\"dog\", \"racecar\", \"car\"]) == \"\"\nassert longest_common_prefix([]) == \"\"\nassert longest_common_prefix([\"same\"]) == \"same\"\nassert longest_common_prefix([\"ab\", \"a\", \"abc\"]) == \"a\"\n"}
21
+ {"id": "code-021", "kind": "code", "messages": [{"role": "system", "content": "You are an expert Python programmer. Reply with a single Python code block that defines the requested function. Use only the standard library. Do not include tests, examples or explanations."}, {"role": "user", "content": "Write a Python function `spiral_order(matrix: list[list[int]]) -> list[int]`.\n\nReturn the elements of a rectangular matrix in clockwise spiral order, starting at\nthe top-left corner. An empty matrix gives an empty list.\n\nReturn only the code."}], "max_tokens": 512, "entry_point": "spiral_order", "tests": "assert spiral_order([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) == [1, 2, 3, 6, 9, 8, 7, 4, 5]\nassert spiral_order([[1, 2, 3, 4], [5, 6, 7, 8]]) == [1, 2, 3, 4, 8, 7, 6, 5]\nassert spiral_order([[1], [2], [3]]) == [1, 2, 3]\nassert spiral_order([]) == []\n"}
22
+ {"id": "code-022", "kind": "code", "messages": [{"role": "system", "content": "You are an expert Python programmer. Reply with a single Python code block that defines the requested function. Use only the standard library. Do not include tests, examples or explanations."}, {"role": "user", "content": "Write a Python function `compare_versions(a: str, b: str) -> int`.\n\nCompare two dotted version strings made of non-negative integers, such as \"1.10.0\"\nand \"1.9\". Return 1 if a is newer, -1 if b is newer and 0 if they are equal. Missing\ntrailing parts count as 0, so \"1.0\" equals \"1\".\n\nReturn only the code."}], "max_tokens": 512, "entry_point": "compare_versions", "tests": "assert compare_versions(\"1.10.0\", \"1.9\") == 1\nassert compare_versions(\"1.0\", \"1\") == 0\nassert compare_versions(\"2.0.1\", \"2.0.10\") == -1\nassert compare_versions(\"0.0.1\", \"0.0.1\") == 0\nassert compare_versions(\"3\", \"2.99.99\") == 1\n"}
23
+ {"id": "code-023", "kind": "code", "messages": [{"role": "system", "content": "You are an expert Python programmer. Reply with a single Python code block that defines the requested function. Use only the standard library. Do not include tests, examples or explanations."}, {"role": "user", "content": "Write a Python function `luhn_valid(number: str) -> bool`.\n\nReturn True if `number` passes the Luhn checksum. Spaces are allowed and ignored.\nAny other non-digit character, or fewer than two digits, makes it invalid.\n\nReturn only the code."}], "max_tokens": 512, "entry_point": "luhn_valid", "tests": "assert luhn_valid(\"4539 3195 0343 6467\") is True\nassert luhn_valid(\"8273 1232 7352 0569\") is False\nassert luhn_valid(\"059\") is True\nassert luhn_valid(\"0\") is False\nassert luhn_valid(\"055a 444 285\") is False\n"}
24
+ {"id": "code-024", "kind": "code", "messages": [{"role": "system", "content": "You are an expert Python programmer. Reply with a single Python code block that defines the requested function. Use only the standard library. Do not include tests, examples or explanations."}, {"role": "user", "content": "Write a Python function `group_anagrams(words: list[str]) -> list[list[str]]`.\n\nGroup words that are anagrams of each other (same letters, case-sensitive). Sort the\nwords inside each group alphabetically, and sort the groups by their first word.\n\nReturn only the code."}], "max_tokens": 512, "entry_point": "group_anagrams", "tests": "assert group_anagrams([\"eat\", \"tea\", \"tan\", \"ate\", \"nat\", \"bat\"]) == [\n [\"ate\", \"eat\", \"tea\"],\n [\"bat\"],\n [\"nat\", \"tan\"],\n]\nassert group_anagrams([]) == []\nassert group_anagrams([\"a\"]) == [[\"a\"]]\nassert group_anagrams([\"ab\", \"ba\", \"Ab\"]) == [[\"Ab\"], [\"ab\", \"ba\"]]\n"}
25
+ {"id": "code-025", "kind": "code", "messages": [{"role": "system", "content": "You are an expert Python programmer. Reply with a single Python code block that defines the requested function. Use only the standard library. Do not include tests, examples or explanations."}, {"role": "user", "content": "Write a Python function `fibonacci(n: int) -> int`.\n\nReturn the n-th Fibonacci number with fibonacci(0) == 0 and fibonacci(1) == 1. It\nmust handle n = 1000 quickly. Raise ValueError for negative n.\n\nReturn only the code."}], "max_tokens": 512, "entry_point": "fibonacci", "tests": "assert fibonacci(0) == 0\nassert fibonacci(1) == 1\nassert fibonacci(10) == 55\nassert fibonacci(90) == 2880067194370816120\nassert len(str(fibonacci(1000))) == 209\n"}
26
+ {"id": "code-026", "kind": "code", "messages": [{"role": "system", "content": "You are an expert Python programmer. Reply with a single Python code block that defines the requested function. Use only the standard library. Do not include tests, examples or explanations."}, {"role": "user", "content": "Write a Python function `moving_average(values: list[float], window: int) -> list[float]`.\n\nReturn the simple moving averages of `values` over a sliding window of size\n`window`, one result per full window. Return an empty list if there are fewer values\nthan `window`. Raise ValueError if window < 1.\n\nReturn only the code."}], "max_tokens": 512, "entry_point": "moving_average", "tests": "assert moving_average([1, 2, 3, 4, 5], 2) == [1.5, 2.5, 3.5, 4.5]\nassert moving_average([10, 20, 30], 3) == [20.0]\nassert moving_average([1, 2], 3) == []\ntry:\n moving_average([1, 2, 3], 0)\nexcept ValueError:\n pass\nelse:\n raise AssertionError(\"expected ValueError\")\n"}
27
+ {"id": "code-027", "kind": "code", "messages": [{"role": "system", "content": "You are an expert Python programmer. Reply with a single Python code block that defines the requested function. Use only the standard library. Do not include tests, examples or explanations."}, {"role": "user", "content": "Write a Python function `word_count(text: str) -> dict[str, int]`.\n\nCount how often each word occurs in `text`. A word is a maximal run of ASCII letters\nor apostrophes; comparison is case-insensitive and keys are lowercase. Apostrophes at\nthe start or end of a word are removed, and words that become empty are dropped.\n\nReturn only the code."}], "max_tokens": 512, "entry_point": "word_count", "tests": "assert word_count(\"The cat and the hat.\") == {\"the\": 2, \"cat\": 1, \"and\": 1, \"hat\": 1}\nassert word_count(\"\") == {}\nassert word_count(\"Don't stop, DON'T!\") == {\"don't\": 2, \"stop\": 1}\nassert word_count(\"'quoted' words 42\") == {\"quoted\": 1, \"words\": 1}\n"}
28
+ {"id": "code-028", "kind": "code", "messages": [{"role": "system", "content": "You are an expert Python programmer. Reply with a single Python code block that defines the requested function. Use only the standard library. Do not include tests, examples or explanations."}, {"role": "user", "content": "Write a Python function `add_binary(a: str, b: str) -> str`.\n\nAdd two non-negative integers given as binary strings and return the sum as a\nbinary string without leading zeros (the sum zero is \"0\"). Do not use int(x, 2) or\nbin().\n\nReturn only the code."}], "max_tokens": 512, "entry_point": "add_binary", "tests": "assert add_binary(\"11\", \"1\") == \"100\"\nassert add_binary(\"1010\", \"1011\") == \"10101\"\nassert add_binary(\"0\", \"0\") == \"0\"\nassert add_binary(\"0001\", \"1\") == \"10\"\n"}
29
+ {"id": "code-029", "kind": "code", "messages": [{"role": "system", "content": "You are an expert Python programmer. Reply with a single Python code block that defines the requested function. Use only the standard library. Do not include tests, examples or explanations."}, {"role": "user", "content": "Write a Python function `transpose(matrix: list[list[int]]) -> list[list[int]]`.\n\nReturn the transpose of a rectangular matrix given as a list of rows. The transpose\nof an empty matrix is an empty list.\n\nReturn only the code."}], "max_tokens": 512, "entry_point": "transpose", "tests": "assert transpose([[1, 2, 3], [4, 5, 6]]) == [[1, 4], [2, 5], [3, 6]]\nassert transpose([[7]]) == [[7]]\nassert transpose([]) == []\nassert transpose([[1], [2]]) == [[1, 2]]\n"}
30
+ {"id": "code-030", "kind": "code", "messages": [{"role": "system", "content": "You are an expert Python programmer. Reply with a single Python code block that defines the requested function. Use only the standard library. Do not include tests, examples or explanations."}, {"role": "user", "content": "Write a Python function `chunk(items: list, size: int) -> list[list]`.\n\nSplit `items` into consecutive chunks of length `size`; the last chunk may be\nshorter. Raise ValueError if size < 1.\n\nReturn only the code."}], "max_tokens": 512, "entry_point": "chunk", "tests": "assert chunk([1, 2, 3, 4, 5], 2) == [[1, 2], [3, 4], [5]]\nassert chunk([], 3) == []\nassert chunk([1, 2, 3], 5) == [[1, 2, 3]]\ntry:\n chunk([1], 0)\nexcept ValueError:\n pass\nelse:\n raise AssertionError(\"expected ValueError\")\n"}
31
+ {"id": "code-031", "kind": "code", "messages": [{"role": "system", "content": "You are an expert Python programmer. Reply with a single Python code block that defines the requested function. Use only the standard library. Do not include tests, examples or explanations."}, {"role": "user", "content": "Write a Python function `int_to_words(n: int) -> str`.\n\nSpell out an integer from 0 to 999 in lowercase English words. Use a hyphen between\ntens and units (\"forty-two\") and no \"and\" (\"one hundred five\").\n\nReturn only the code."}], "max_tokens": 512, "entry_point": "int_to_words", "tests": "assert int_to_words(0) == \"zero\"\nassert int_to_words(13) == \"thirteen\"\nassert int_to_words(42) == \"forty-two\"\nassert int_to_words(105) == \"one hundred five\"\nassert int_to_words(990) == \"nine hundred ninety\"\nassert int_to_words(711) == \"seven hundred eleven\"\n"}
32
+ {"id": "code-032", "kind": "code", "messages": [{"role": "system", "content": "You are an expert Python programmer. Reply with a single Python code block that defines the requested function. Use only the standard library. Do not include tests, examples or explanations."}, {"role": "user", "content": "Write a Python function `top_k_frequent(items: list[str], k: int) -> list[str]`.\n\nReturn the k most frequent strings in `items`, most frequent first. Break ties\nalphabetically. If there are fewer than k distinct strings, return all of them.\n\nReturn only the code."}], "max_tokens": 512, "entry_point": "top_k_frequent", "tests": "assert top_k_frequent([\"a\", \"b\", \"a\", \"c\", \"b\", \"a\"], 2) == [\"a\", \"b\"]\nassert top_k_frequent([\"x\", \"y\", \"z\"], 2) == [\"x\", \"y\"]\nassert top_k_frequent([\"b\", \"a\", \"b\", \"a\", \"c\"], 3) == [\"a\", \"b\", \"c\"]\nassert top_k_frequent([], 1) == []\nassert top_k_frequent([\"q\"], 5) == [\"q\"]\n"}
@@ -0,0 +1,34 @@
1
+ {"id": "json-001", "kind": "json", "messages": [{"role": "system", "content": "You convert text into structured data. Reply with a single JSON object and nothing else: no prose, no Markdown, no code fences."}, {"role": "user", "content": "Classify the sentiment of this review as \"positive\", \"negative\" or \"mixed\".\n\nReview: \"The battery lasts two full days, but the screen scratches far too easily.\"\n\nReturn an object with one key, \"sentiment\". Answer with JSON only."}], "max_tokens": 64, "json_schema": {"type": "object", "properties": {"sentiment": {"type": "string", "enum": ["positive", "negative", "mixed"]}}, "required": ["sentiment"], "additionalProperties": false}}
2
+ {"id": "json-002", "kind": "json", "messages": [{"role": "system", "content": "You convert text into structured data. Reply with a single JSON object and nothing else: no prose, no Markdown, no code fences."}, {"role": "user", "content": "Extract the invoice details from the text below.\n\nInvoice INV-2024-0117 from Brightline Supplies, issued 2024-03-14, payable in USD.\n3 x Espresso beans 1kg at 18.50 each\n2 x Paper cups, pack of 100, at 6.25 each\nTotal due: 68.00\n\nReturn an object with keys \"invoice_number\", \"vendor\", \"issue_date\" (YYYY-MM-DD), \"currency\" (one of \"USD\", \"EUR\", \"GBP\"), \"line_items\" (array of objects with \"description\", \"quantity\" as an integer and \"unit_price\" as a number) and \"total\" (number). Answer with JSON only."}], "max_tokens": 384, "json_schema": {"type": "object", "properties": {"invoice_number": {"type": "string", "pattern": "^INV-\\d{4}-\\d{4}$"}, "vendor": {"type": "string", "minLength": 1}, "issue_date": {"type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$"}, "currency": {"type": "string", "enum": ["USD", "EUR", "GBP"]}, "line_items": {"type": "array", "items": {"type": "object", "properties": {"description": {"type": "string", "minLength": 1}, "quantity": {"type": "integer", "minimum": 1}, "unit_price": {"type": "number", "exclusiveMinimum": 0}}, "required": ["description", "quantity", "unit_price"], "additionalProperties": false}, "minItems": 2, "maxItems": 2}, "total": {"type": "number", "minimum": 67.99, "maximum": 68.01}}, "required": ["invoice_number", "vendor", "issue_date", "currency", "line_items", "total"], "additionalProperties": false}}
3
+ {"id": "json-003", "kind": "json", "messages": [{"role": "system", "content": "You convert text into structured data. Reply with a single JSON object and nothing else: no prose, no Markdown, no code fences."}, {"role": "user", "content": "Parse this log line.\n\n2024-05-02T13:45:07Z ERROR [payment-service] Timeout after 3000 ms calling https://api.bank.example/charge (attempt 3/5)\n\nReturn an object with keys \"timestamp\" (copy it exactly), \"level\" (one of \"DEBUG\", \"INFO\", \"WARN\", \"ERROR\"), \"service\", \"duration_ms\" (integer), \"attempt\" (integer) and \"max_attempts\" (integer). Answer with JSON only."}], "max_tokens": 192, "json_schema": {"type": "object", "properties": {"timestamp": {"type": "string", "pattern": "^2024-05-02T13:45:07Z$"}, "level": {"type": "string", "enum": ["DEBUG", "INFO", "WARN", "ERROR"]}, "service": {"type": "string", "pattern": "^payment-service$"}, "duration_ms": {"type": "integer", "minimum": 3000, "maximum": 3000}, "attempt": {"type": "integer", "minimum": 3, "maximum": 3}, "max_attempts": {"type": "integer", "minimum": 5, "maximum": 5}}, "required": ["timestamp", "level", "service", "duration_ms", "attempt", "max_attempts"], "additionalProperties": false}}
4
+ {"id": "json-004", "kind": "json", "messages": [{"role": "system", "content": "You convert text into structured data. Reply with a single JSON object and nothing else: no prose, no Markdown, no code fences."}, {"role": "user", "content": "Read the email and fill in the fields.\n\nFrom: Priya Natarajan <priya.n@lumenworks.io>\nSubject: Quick sync on the Q3 roadmap\n\nHi Sam, could we meet on 2025-07-09 to go over the Q3 roadmap? Any time after 14:00 works for me. Thanks, Priya\n\nReturn an object with keys \"sender_name\", \"sender_email\", \"intent\" (one of \"meeting_request\", \"complaint\", \"invoice_question\", \"other\") and \"proposed_date\" (YYYY-MM-DD). Answer with JSON only."}], "max_tokens": 192, "json_schema": {"type": "object", "properties": {"sender_name": {"type": "string", "minLength": 1}, "sender_email": {"type": "string", "pattern": "^priya\\.n@lumenworks\\.io$"}, "intent": {"type": "string", "enum": ["meeting_request", "complaint", "invoice_question", "other"]}, "proposed_date": {"type": "string", "pattern": "^2025-07-09$"}}, "required": ["sender_name", "sender_email", "intent", "proposed_date"], "additionalProperties": false}}
5
+ {"id": "json-005", "kind": "json", "messages": [{"role": "system", "content": "You convert text into structured data. Reply with a single JSON object and nothing else: no prose, no Markdown, no code fences."}, {"role": "user", "content": "Extract the product listing.\n\nAeroflex Trail Runner 2 by Northpeak. Lightweight trail shoe with a rock plate. Price: 129.99 EUR. Available colors: black, olive, orange. Currently out of stock. Customer rating 4.6 out of 5.\n\nReturn an object with keys \"name\", \"brand\", \"price\" (number), \"currency\", \"in_stock\" (boolean), \"colors\" (array of lowercase color names) and \"rating\" (number from 0 to 5). Answer with JSON only."}], "max_tokens": 384, "json_schema": {"type": "object", "properties": {"name": {"type": "string", "minLength": 1}, "brand": {"type": "string", "pattern": "^Northpeak$"}, "price": {"type": "number", "minimum": 129.99, "maximum": 129.99}, "currency": {"type": "string", "pattern": "^EUR$"}, "in_stock": {"const": false}, "colors": {"type": "array", "items": {"type": "string", "enum": ["black", "olive", "orange"]}, "minItems": 3, "maxItems": 3}, "rating": {"type": "number", "minimum": 0, "maximum": 5}}, "required": ["name", "brand", "price", "currency", "in_stock", "colors", "rating"], "additionalProperties": false}}
6
+ {"id": "json-006", "kind": "json", "messages": [{"role": "system", "content": "You convert text into structured data. Reply with a single JSON object and nothing else: no prose, no Markdown, no code fences."}, {"role": "user", "content": "Is the following sentence a question? Return {\"is_question\": true} or {\"is_question\": false}.\n\nSentence: \"Tell me where the station is.\"\n\nAnswer with JSON only."}], "max_tokens": 32, "json_schema": {"type": "object", "properties": {"is_question": {"type": "boolean"}}, "required": ["is_question"], "additionalProperties": false}}
7
+ {"id": "json-007", "kind": "json", "messages": [{"role": "system", "content": "You convert text into structured data. Reply with a single JSON object and nothing else: no prose, no Markdown, no code fences."}, {"role": "user", "content": "Turn this calendar text into structured events.\n\nMon 2025-02-03 09:30 Standup (15 min)\nMon 2025-02-03 13:00 Design review with Ana (60 min)\nTue 2025-02-04 16:45 Dentist (45 min)\n\nReturn an object with key \"events\": an array of objects with \"date\" (YYYY-MM-DD), \"start\" (HH:MM, 24-hour), \"title\" and \"duration_minutes\" (integer). Answer with JSON only."}], "max_tokens": 384, "json_schema": {"type": "object", "properties": {"events": {"type": "array", "items": {"type": "object", "properties": {"date": {"type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$"}, "start": {"type": "string", "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"}, "title": {"type": "string", "minLength": 1}, "duration_minutes": {"type": "integer", "minimum": 1, "maximum": 600}}, "required": ["date", "start", "title", "duration_minutes"], "additionalProperties": false}, "minItems": 3, "maxItems": 3}}, "required": ["events"], "additionalProperties": false}}
8
+ {"id": "json-008", "kind": "json", "messages": [{"role": "system", "content": "You convert text into structured data. Reply with a single JSON object and nothing else: no prose, no Markdown, no code fences."}, {"role": "user", "content": "Label each customer review with its sentiment.\n\n1. Arrived a day early and works perfectly.\n2. Stopped charging after a week.\n3. It is fine. Nothing special.\n4. Customer support replaced it within hours, great experience.\n\nReturn an object with key \"reviews\": an array of objects with \"id\" (the review number as an integer) and \"sentiment\" (one of \"positive\", \"negative\", \"neutral\"), in the same order. Answer with JSON only."}], "max_tokens": 256, "json_schema": {"type": "object", "properties": {"reviews": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "integer", "minimum": 1, "maximum": 4}, "sentiment": {"type": "string", "enum": ["positive", "negative", "neutral"]}}, "required": ["id", "sentiment"], "additionalProperties": false}, "minItems": 4, "maxItems": 4}}, "required": ["reviews"], "additionalProperties": false}}
9
+ {"id": "json-009", "kind": "json", "messages": [{"role": "system", "content": "You convert text into structured data. Reply with a single JSON object and nothing else: no prose, no Markdown, no code fences."}, {"role": "user", "content": "Split this US postal address into parts.\n\n1450 Larkspur Avenue, Apt 3B, Boulder, CO 80302\n\nReturn an object with keys \"street\" (including the apartment), \"city\", \"state\" (two-letter code), \"zip\" (five digits as a string) and \"country\" (always \"US\"). Answer with JSON only."}], "max_tokens": 192, "json_schema": {"type": "object", "properties": {"street": {"type": "string", "minLength": 1}, "city": {"type": "string", "pattern": "^Boulder$"}, "state": {"type": "string", "pattern": "^CO$"}, "zip": {"type": "string", "pattern": "^80302$"}, "country": {"const": "US"}}, "required": ["street", "city", "state", "zip", "country"], "additionalProperties": false}}
10
+ {"id": "json-010", "kind": "json", "messages": [{"role": "system", "content": "You convert text into structured data. Reply with a single JSON object and nothing else: no prose, no Markdown, no code fences."}, {"role": "user", "content": "A train covers 180 km in 2.5 hours at constant speed. What is its speed in km/h?\n\nReturn an object with keys \"speed\" (number) and \"unit\" (the string \"km/h\"). Answer with JSON only."}], "max_tokens": 64, "json_schema": {"type": "object", "properties": {"speed": {"type": "number", "minimum": 71.99, "maximum": 72.01}, "unit": {"const": "km/h"}}, "required": ["speed", "unit"], "additionalProperties": false}}
11
+ {"id": "json-011", "kind": "json", "messages": [{"role": "system", "content": "You convert text into structured data. Reply with a single JSON object and nothing else: no prose, no Markdown, no code fences."}, {"role": "user", "content": "Extract the recipe.\n\nLemon yogurt cake, serves 8. You need 250 g flour, 200 g sugar, 3 eggs, 240 ml plain yogurt, 120 ml vegetable oil and 2 tsp baking powder. Whisk the wet ingredients, fold in the dry ones, then bake for 45 minutes at 180 C.\n\nReturn an object with keys \"title\", \"servings\" (integer), \"ingredients\" (array of objects with \"name\", \"amount\" (number) and \"unit\" (one of \"g\", \"ml\", \"tsp\", \"piece\"; use \"piece\" for the eggs)) and \"steps\" (array of short strings, at least 3). Answer with JSON only."}], "max_tokens": 512, "json_schema": {"type": "object", "properties": {"title": {"type": "string", "minLength": 1}, "servings": {"type": "integer", "minimum": 8, "maximum": 8}, "ingredients": {"type": "array", "items": {"type": "object", "properties": {"name": {"type": "string", "minLength": 1}, "amount": {"type": "number", "exclusiveMinimum": 0}, "unit": {"type": "string", "enum": ["g", "ml", "tsp", "piece"]}}, "required": ["name", "amount", "unit"], "additionalProperties": false}, "minItems": 6, "maxItems": 6}, "steps": {"type": "array", "items": {"type": "string", "minLength": 1}, "minItems": 3}}, "required": ["title", "servings", "ingredients", "steps"], "additionalProperties": false}}
12
+ {"id": "json-012", "kind": "json", "messages": [{"role": "system", "content": "You convert text into structured data. Reply with a single JSON object and nothing else: no prose, no Markdown, no code fences."}, {"role": "user", "content": "List every email address that appears in this text, in order of appearance.\n\nSend the draft to editor@quarterly.example and copy legal@quarterly.example. Replies from j.ortiz@freelance.example should be forwarded too.\n\nReturn an object with key \"emails\" (array of strings). Answer with JSON only."}], "max_tokens": 128, "json_schema": {"type": "object", "properties": {"emails": {"type": "array", "items": {"type": "string", "pattern": "^[^@\\s]+@[^@\\s]+\\.[a-z]{2,}$"}, "minItems": 3, "maxItems": 3}}, "required": ["emails"], "additionalProperties": false}}
13
+ {"id": "json-013", "kind": "json", "messages": [{"role": "system", "content": "You convert text into structured data. Reply with a single JSON object and nothing else: no prose, no Markdown, no code fences."}, {"role": "user", "content": "Triage this support ticket.\n\n\"Our whole team has been locked out of the dashboard since 08:00 and we have a client demo in an hour. Password resets are not arriving.\"\n\nReturn an object with keys \"priority\" (one of \"low\", \"medium\", \"high\", \"urgent\"), \"category\" (one of \"billing\", \"access\", \"bug\", \"feature_request\"), \"needs_human\" (boolean) and \"summary\" (at most 120 characters). Answer with JSON only."}], "max_tokens": 192, "json_schema": {"type": "object", "properties": {"priority": {"type": "string", "enum": ["low", "medium", "high", "urgent"]}, "category": {"type": "string", "enum": ["billing", "access", "bug", "feature_request"]}, "needs_human": {"type": "boolean"}, "summary": {"type": "string", "minLength": 1, "maxLength": 120}}, "required": ["priority", "category", "needs_human", "summary"], "additionalProperties": false}}
14
+ {"id": "json-014", "kind": "json", "messages": [{"role": "system", "content": "You convert text into structured data. Reply with a single JSON object and nothing else: no prose, no Markdown, no code fences."}, {"role": "user", "content": "Convert this CSV to JSON.\n\nname,age,city\nAna,34,Lisbon\nBo,27,Oslo\nChen,45,Taipei\n\nReturn an object with key \"rows\": an array of objects with \"name\", \"age\" (integer) and \"city\". Answer with JSON only."}], "max_tokens": 192, "json_schema": {"type": "object", "properties": {"rows": {"type": "array", "items": {"type": "object", "properties": {"name": {"type": "string", "minLength": 1}, "age": {"type": "integer", "minimum": 27, "maximum": 45}, "city": {"type": "string", "minLength": 1}}, "required": ["name", "age", "city"], "additionalProperties": false}, "minItems": 3, "maxItems": 3}}, "required": ["rows"], "additionalProperties": false}}
15
+ {"id": "json-015", "kind": "json", "messages": [{"role": "system", "content": "You convert text into structured data. Reply with a single JSON object and nothing else: no prose, no Markdown, no code fences."}, {"role": "user", "content": "Extract the flight booking.\n\nBooking reference QX7R2M. Passengers: Elena Brandt, Tomas Brandt.\nFlight LH2041 from FRA to OSL departing 2025-08-17 07:05.\nReturn flight LH2046 from OSL to FRA departing 2025-08-24 18:40.\n\nReturn an object with keys \"booking_reference\", \"passengers\" (array of full names) and \"segments\" (array of objects with \"flight_number\", \"origin\" and \"destination\" as three-letter airport codes, \"date\" (YYYY-MM-DD) and \"departure_time\" (HH:MM)). Answer with JSON only."}], "max_tokens": 384, "json_schema": {"type": "object", "properties": {"booking_reference": {"type": "string", "pattern": "^QX7R2M$"}, "passengers": {"type": "array", "items": {"type": "string", "minLength": 1}, "minItems": 2, "maxItems": 2}, "segments": {"type": "array", "items": {"type": "object", "properties": {"flight_number": {"type": "string", "pattern": "^LH20(41|46)$"}, "origin": {"type": "string", "pattern": "^(FRA|OSL)$"}, "destination": {"type": "string", "pattern": "^(FRA|OSL)$"}, "date": {"type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$"}, "departure_time": {"type": "string", "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"}}, "required": ["flight_number", "origin", "destination", "date", "departure_time"], "additionalProperties": false}, "minItems": 2, "maxItems": 2}}, "required": ["booking_reference", "passengers", "segments"], "additionalProperties": false}}
16
+ {"id": "json-016", "kind": "json", "messages": [{"role": "system", "content": "You convert text into structured data. Reply with a single JSON object and nothing else: no prose, no Markdown, no code fences."}, {"role": "user", "content": "Convert 100 degrees Celsius to Fahrenheit and Kelvin.\n\nReturn an object with keys \"fahrenheit\" and \"kelvin\", both numbers. Answer with JSON only."}], "max_tokens": 64, "json_schema": {"type": "object", "properties": {"fahrenheit": {"type": "number", "minimum": 211.99, "maximum": 212.01}, "kelvin": {"type": "number", "minimum": 373.14, "maximum": 373.16}}, "required": ["fahrenheit", "kelvin"], "additionalProperties": false}}
17
+ {"id": "json-017", "kind": "json", "messages": [{"role": "system", "content": "You convert text into structured data. Reply with a single JSON object and nothing else: no prose, no Markdown, no code fences."}, {"role": "user", "content": "Describe the departments in this company memo.\n\nHalvorsen Robotics has three departments. Engineering, led by Mira Okafor, has 42 people. Sales, led by Daniel Reyes, has 17 people. Operations, led by Yuki Tanaka, has 9 people.\n\nReturn an object with keys \"company\" and \"departments\" (array of objects with \"name\", \"head\" and \"headcount\" (integer)), plus \"total_headcount\" (integer). Answer with JSON only."}], "max_tokens": 384, "json_schema": {"type": "object", "properties": {"company": {"type": "string", "minLength": 1}, "departments": {"type": "array", "items": {"type": "object", "properties": {"name": {"type": "string", "minLength": 1}, "head": {"type": "string", "minLength": 1}, "headcount": {"type": "integer", "minimum": 1}}, "required": ["name", "head", "headcount"], "additionalProperties": false}, "minItems": 3, "maxItems": 3}, "total_headcount": {"type": "integer", "minimum": 68, "maximum": 68}}, "required": ["company", "departments", "total_headcount"], "additionalProperties": false}}
18
+ {"id": "json-018", "kind": "json", "messages": [{"role": "system", "content": "You convert text into structured data. Reply with a single JSON object and nothing else: no prose, no Markdown, no code fences."}, {"role": "user", "content": "Categorize each bank transaction.\n\n2025-01-03 GREENLEAF MARKET -54.20\n2025-01-04 CITY TRANSIT PASS -75.00\n2025-01-05 SALARY ACME CORP 3200.00\n2025-01-06 STREAMFLIX MONTHLY -12.99\n\nReturn an object with key \"transactions\": an array of objects with \"date\" (YYYY-MM-DD), \"amount\" (number, negative for spending) and \"category\" (one of \"groceries\", \"transport\", \"income\", \"subscriptions\"). Answer with JSON only."}], "max_tokens": 384, "json_schema": {"type": "object", "properties": {"transactions": {"type": "array", "items": {"type": "object", "properties": {"date": {"type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$"}, "amount": {"type": "number", "minimum": -100, "maximum": 5000}, "category": {"type": "string", "enum": ["groceries", "transport", "income", "subscriptions"]}}, "required": ["date", "amount", "category"], "additionalProperties": false}, "minItems": 4, "maxItems": 4}}, "required": ["transactions"], "additionalProperties": false}}
19
+ {"id": "json-019", "kind": "json", "messages": [{"role": "system", "content": "You convert text into structured data. Reply with a single JSON object and nothing else: no prose, no Markdown, no code fences."}, {"role": "user", "content": "Detect the language of this sentence: \"Wo ist der naechste Bahnhof?\"\n\nReturn an object with key \"language\" set to an ISO 639-1 code such as \"en\", \"es\", \"de\", \"fr\" or \"it\". Answer with JSON only."}], "max_tokens": 32, "json_schema": {"type": "object", "properties": {"language": {"type": "string", "pattern": "^[a-z]{2}$"}}, "required": ["language"], "additionalProperties": false}}
20
+ {"id": "json-020", "kind": "json", "messages": [{"role": "system", "content": "You convert text into structured data. Reply with a single JSON object and nothing else: no prose, no Markdown, no code fences."}, {"role": "user", "content": "Rewrite this configuration as JSON.\n\nserver:\n host: 0.0.0.0\n port: 8443\n tls: true\nworkers: 4\nlog_level: warning\nallowed_origins:\n - https://app.example\n - https://admin.example\n\nKeep the same keys and nesting. Use numbers and booleans where the values are numbers and booleans. Answer with JSON only."}], "max_tokens": 256, "json_schema": {"type": "object", "properties": {"server": {"type": "object", "properties": {"host": {"type": "string", "pattern": "^0\\.0\\.0\\.0$"}, "port": {"type": "integer", "minimum": 8443, "maximum": 8443}, "tls": {"const": true}}, "required": ["host", "port", "tls"], "additionalProperties": false}, "workers": {"type": "integer", "minimum": 4, "maximum": 4}, "log_level": {"type": "string", "enum": ["debug", "info", "warning", "error"]}, "allowed_origins": {"type": "array", "items": {"type": "string", "pattern": "^https://"}, "minItems": 2, "maxItems": 2}}, "required": ["server", "workers", "log_level", "allowed_origins"], "additionalProperties": false}}
21
+ {"id": "json-021", "kind": "json", "messages": [{"role": "system", "content": "You convert text into structured data. Reply with a single JSON object and nothing else: no prose, no Markdown, no code fences."}, {"role": "user", "content": "Pull the action items out of these meeting notes.\n\n- Lena will send the revised budget by 2025-04-11.\n- Marco to book the venue for the offsite, deadline 2025-04-18.\n- We agreed the logo stays as it is.\n- Ines owns the customer survey, due 2025-05-02.\n\nReturn an object with key \"action_items\": an array of objects with \"owner\", \"task\" and \"due\" (YYYY-MM-DD). Decisions that are not tasks must be left out. Answer with JSON only."}], "max_tokens": 320, "json_schema": {"type": "object", "properties": {"action_items": {"type": "array", "items": {"type": "object", "properties": {"owner": {"type": "string", "enum": ["Lena", "Marco", "Ines"]}, "task": {"type": "string", "minLength": 1}, "due": {"type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$"}}, "required": ["owner", "task", "due"], "additionalProperties": false}, "minItems": 3, "maxItems": 3}}, "required": ["action_items"], "additionalProperties": false}}
22
+ {"id": "json-022", "kind": "json", "messages": [{"role": "system", "content": "You convert text into structured data. Reply with a single JSON object and nothing else: no prose, no Markdown, no code fences."}, {"role": "user", "content": "Extract the contract dates.\n\nThis agreement starts on March 3, 2025 and remains in force until September 30, 2025, unless terminated earlier with 30 days written notice.\n\nReturn an object with keys \"start_date\" and \"end_date\" (both YYYY-MM-DD) and \"notice_days\" (integer). Answer with JSON only."}], "max_tokens": 96, "json_schema": {"type": "object", "properties": {"start_date": {"type": "string", "pattern": "^2025-03-03$"}, "end_date": {"type": "string", "pattern": "^2025-09-30$"}, "notice_days": {"type": "integer", "minimum": 30, "maximum": 30}}, "required": ["start_date", "end_date", "notice_days"], "additionalProperties": false}}
23
+ {"id": "json-023", "kind": "json", "messages": [{"role": "system", "content": "You convert text into structured data. Reply with a single JSON object and nothing else: no prose, no Markdown, no code fences."}, {"role": "user", "content": "Summarize this job posting.\n\nSenior Data Engineer, fully remote within the EU. You will build streaming pipelines in Python and Scala on Kafka and Spark. At least 5 years of experience required. Salary 85,000 to 105,000 EUR per year.\n\nReturn an object with keys \"title\", \"remote\" (boolean), \"min_years_experience\" (integer), \"skills\" (array of at least 3 strings) and \"salary\" (object with \"min\", \"max\" as integers and \"currency\"). Answer with JSON only."}], "max_tokens": 384, "json_schema": {"type": "object", "properties": {"title": {"type": "string", "minLength": 1}, "remote": {"const": true}, "min_years_experience": {"type": "integer", "minimum": 5, "maximum": 5}, "skills": {"type": "array", "items": {"type": "string", "minLength": 1}, "minItems": 3}, "salary": {"type": "object", "properties": {"min": {"type": "integer", "minimum": 85000, "maximum": 85000}, "max": {"type": "integer", "minimum": 105000, "maximum": 105000}, "currency": {"const": "EUR"}}, "required": ["min", "max", "currency"], "additionalProperties": false}}, "required": ["title", "remote", "min_years_experience", "skills", "salary"], "additionalProperties": false}}
24
+ {"id": "json-024", "kind": "json", "messages": [{"role": "system", "content": "You convert text into structured data. Reply with a single JSON object and nothing else: no prose, no Markdown, no code fences."}, {"role": "user", "content": "Count the vowels (a, e, i, o, u) in the word \"education\".\n\nReturn an object with keys \"word\" and \"vowel_count\" (integer). Answer with JSON only."}], "max_tokens": 48, "json_schema": {"type": "object", "properties": {"word": {"type": "string", "pattern": "^education$"}, "vowel_count": {"type": "integer", "minimum": 5, "maximum": 5}}, "required": ["word", "vowel_count"], "additionalProperties": false}}
25
+ {"id": "json-025", "kind": "json", "messages": [{"role": "system", "content": "You convert text into structured data. Reply with a single JSON object and nothing else: no prose, no Markdown, no code fences."}, {"role": "user", "content": "Extract the shipping notification.\n\nYour order #A-58213 has shipped with Parcelway. Tracking number PW123456789NL. Contents: 1 x mechanical keyboard, 2 x USB-C cable. Expected delivery 2025-11-21.\n\nReturn an object with keys \"order_id\", \"carrier\", \"tracking_number\", \"items\" (array of objects with \"name\" and \"quantity\" as an integer) and \"expected_delivery\" (YYYY-MM-DD). Answer with JSON only."}], "max_tokens": 384, "json_schema": {"type": "object", "properties": {"order_id": {"type": "string", "pattern": "^#?A-58213$"}, "carrier": {"type": "string", "minLength": 1}, "tracking_number": {"type": "string", "pattern": "^PW123456789NL$"}, "items": {"type": "array", "items": {"type": "object", "properties": {"name": {"type": "string", "minLength": 1}, "quantity": {"type": "integer", "minimum": 1, "maximum": 2}}, "required": ["name", "quantity"], "additionalProperties": false}, "minItems": 2, "maxItems": 2}, "expected_delivery": {"type": "string", "pattern": "^2025-11-21$"}}, "required": ["order_id", "carrier", "tracking_number", "items", "expected_delivery"], "additionalProperties": false}}
26
+ {"id": "json-026", "kind": "json", "messages": [{"role": "system", "content": "You convert text into structured data. Reply with a single JSON object and nothing else: no prose, no Markdown, no code fences."}, {"role": "user", "content": "Group these files by extension.\n\nreport.pdf, notes.txt, photo.jpg, summary.pdf, todo.txt, scan.pdf\n\nReturn an object with keys \"pdf\", \"txt\" and \"jpg\", each an array of file names. Answer with JSON only."}], "max_tokens": 160, "json_schema": {"type": "object", "properties": {"pdf": {"type": "array", "items": {"type": "string", "pattern": "\\.pdf$"}, "minItems": 3, "maxItems": 3}, "txt": {"type": "array", "items": {"type": "string", "pattern": "\\.txt$"}, "minItems": 2, "maxItems": 2}, "jpg": {"type": "array", "items": {"type": "string", "pattern": "\\.jpg$"}, "minItems": 1, "maxItems": 1}}, "required": ["pdf", "txt", "jpg"], "additionalProperties": false}}
27
+ {"id": "json-027", "kind": "json", "messages": [{"role": "system", "content": "You convert text into structured data. Reply with a single JSON object and nothing else: no prose, no Markdown, no code fences."}, {"role": "user", "content": "Describe the HTTP request below.\n\nPOST /api/v2/orders?dry_run=true HTTP/1.1\nHost: shop.example\nContent-Type: application/json\nContent-Length: 48\n\nReturn an object with keys \"method\", \"path\" (without the query string), \"query\" (object mapping each parameter to its string value), \"host\" and \"content_length\" (integer). Answer with JSON only."}], "max_tokens": 192, "json_schema": {"type": "object", "properties": {"method": {"type": "string", "enum": ["GET", "POST", "PUT", "PATCH", "DELETE"]}, "path": {"type": "string", "pattern": "^/api/v2/orders$"}, "query": {"type": "object", "properties": {"dry_run": {"type": "string", "pattern": "^true$"}}, "required": ["dry_run"], "additionalProperties": false}, "host": {"type": "string", "pattern": "^shop\\.example$"}, "content_length": {"type": "integer", "minimum": 48, "maximum": 48}}, "required": ["method", "path", "query", "host", "content_length"], "additionalProperties": false}}
28
+ {"id": "json-028", "kind": "json", "messages": [{"role": "system", "content": "You convert text into structured data. Reply with a single JSON object and nothing else: no prose, no Markdown, no code fences."}, {"role": "user", "content": "A shop sells pencils at 0.40 each and notebooks at 2.75 each. Kim buys 6 pencils and 3 notebooks and pays with a 20 note.\n\nReturn an object with keys \"total_cost\" and \"change\", both numbers. Answer with JSON only."}], "max_tokens": 64, "json_schema": {"type": "object", "properties": {"total_cost": {"type": "number", "minimum": 10.649, "maximum": 10.651}, "change": {"type": "number", "minimum": 9.349, "maximum": 9.351}}, "required": ["total_cost", "change"], "additionalProperties": false}}
29
+ {"id": "json-029", "kind": "json", "messages": [{"role": "system", "content": "You convert text into structured data. Reply with a single JSON object and nothing else: no prose, no Markdown, no code fences."}, {"role": "user", "content": "Extract the medication schedule.\n\nTake amoxicillin 500 mg three times a day for 7 days. Take ibuprofen 200 mg only when needed, at most 4 times a day.\n\nReturn an object with key \"medications\": an array of objects with \"name\", \"dose_mg\" (integer), \"max_per_day\" (integer) and \"as_needed\" (boolean). Answer with JSON only."}], "max_tokens": 256, "json_schema": {"type": "object", "properties": {"medications": {"type": "array", "items": {"type": "object", "properties": {"name": {"type": "string", "enum": ["amoxicillin", "ibuprofen"]}, "dose_mg": {"type": "integer", "minimum": 200, "maximum": 500}, "max_per_day": {"type": "integer", "minimum": 3, "maximum": 4}, "as_needed": {"type": "boolean"}}, "required": ["name", "dose_mg", "max_per_day", "as_needed"], "additionalProperties": false}, "minItems": 2, "maxItems": 2}}, "required": ["medications"], "additionalProperties": false}}
30
+ {"id": "json-030", "kind": "json", "messages": [{"role": "system", "content": "You convert text into structured data. Reply with a single JSON object and nothing else: no prose, no Markdown, no code fences."}, {"role": "user", "content": "Parse this semantic version string: 3.12.0-rc.2+build.417\n\nReturn an object with keys \"major\", \"minor\", \"patch\" (integers), \"prerelease\" (string) and \"build\" (string). Answer with JSON only."}], "max_tokens": 96, "json_schema": {"type": "object", "properties": {"major": {"type": "integer", "minimum": 3, "maximum": 3}, "minor": {"type": "integer", "minimum": 12, "maximum": 12}, "patch": {"type": "integer", "minimum": 0, "maximum": 0}, "prerelease": {"type": "string", "pattern": "^rc\\.2$"}, "build": {"type": "string", "pattern": "^build\\.417$"}}, "required": ["major", "minor", "patch", "prerelease", "build"], "additionalProperties": false}}
31
+ {"id": "json-031", "kind": "json", "messages": [{"role": "system", "content": "You convert text into structured data. Reply with a single JSON object and nothing else: no prose, no Markdown, no code fences."}, {"role": "user", "content": "Build a family tree from this text.\n\nRosa has two children, Ivan and Clara. Ivan has one daughter, Mei. Clara has no children.\n\nReturn an object with key \"root\": a person object with \"name\" and \"children\" (an array of person objects with the same shape; use an empty array when there are no children). Answer with JSON only."}], "max_tokens": 256, "json_schema": {"type": "object", "properties": {"root": {"type": "object", "properties": {"name": {"type": "string", "pattern": "^Rosa$"}, "children": {"type": "array", "items": {"type": "object", "properties": {"name": {"type": "string", "enum": ["Ivan", "Clara"]}, "children": {"type": "array", "items": {"type": "object", "properties": {"name": {"type": "string", "pattern": "^Mei$"}, "children": {"type": "array", "items": {"type": "string"}, "minItems": 0, "maxItems": 0}}, "required": ["name", "children"], "additionalProperties": false}, "minItems": 0, "maxItems": 1}}, "required": ["name", "children"], "additionalProperties": false}, "minItems": 2, "maxItems": 2}}, "required": ["name", "children"], "additionalProperties": false}}, "required": ["root"], "additionalProperties": false}}
32
+ {"id": "json-032", "kind": "json", "messages": [{"role": "system", "content": "You convert text into structured data. Reply with a single JSON object and nothing else: no prose, no Markdown, no code fences."}, {"role": "user", "content": "Pick the answer to this multiple-choice question.\n\nWhich planet has the shortest year?\nA) Venus B) Mercury C) Mars D) Earth\n\nReturn an object with keys \"choice\" (one of \"A\", \"B\", \"C\", \"D\") and \"confidence\" (one of \"low\", \"medium\", \"high\"). Answer with JSON only."}], "max_tokens": 48, "json_schema": {"type": "object", "properties": {"choice": {"type": "string", "enum": ["A", "B", "C", "D"]}, "confidence": {"type": "string", "enum": ["low", "medium", "high"]}}, "required": ["choice", "confidence"], "additionalProperties": false}}
33
+ {"id": "json-033", "kind": "json", "messages": [{"role": "system", "content": "You convert text into structured data. Reply with a single JSON object and nothing else: no prose, no Markdown, no code fences."}, {"role": "user", "content": "Extract the hotel reservation.\n\nDear guest, your stay at Hotel Miramar is confirmed: check-in 2025-06-12, check-out 2025-06-15, one double room for 2 adults, breakfast included, total 465.00 EUR.\n\nReturn an object with keys \"hotel\", \"check_in\", \"check_out\" (YYYY-MM-DD), \"nights\" (integer), \"guests\" (integer), \"breakfast\" (boolean) and \"price_per_night\" (number). Answer with JSON only."}], "max_tokens": 192, "json_schema": {"type": "object", "properties": {"hotel": {"type": "string", "minLength": 1}, "check_in": {"type": "string", "pattern": "^2025-06-12$"}, "check_out": {"type": "string", "pattern": "^2025-06-15$"}, "nights": {"type": "integer", "minimum": 3, "maximum": 3}, "guests": {"type": "integer", "minimum": 2, "maximum": 2}, "breakfast": {"const": true}, "price_per_night": {"type": "number", "minimum": 154.99, "maximum": 155.01}}, "required": ["hotel", "check_in", "check_out", "nights", "guests", "breakfast", "price_per_night"], "additionalProperties": false}}
34
+ {"id": "json-034", "kind": "json", "messages": [{"role": "system", "content": "You convert text into structured data. Reply with a single JSON object and nothing else: no prose, no Markdown, no code fences."}, {"role": "user", "content": "Classify each word by part of speech.\n\nWords: quickly, mountain, sing, blue, under\n\nReturn an object with key \"words\": an array of objects with \"word\" and \"pos\" (one of \"noun\", \"verb\", \"adjective\", \"adverb\", \"preposition\"), in the given order. Answer with JSON only."}], "max_tokens": 192, "json_schema": {"type": "object", "properties": {"words": {"type": "array", "items": {"type": "object", "properties": {"word": {"type": "string", "minLength": 1}, "pos": {"type": "string", "enum": ["noun", "verb", "adjective", "adverb", "preposition"]}}, "required": ["word", "pos"], "additionalProperties": false}, "minItems": 5, "maxItems": 5}}, "required": ["words"], "additionalProperties": false}}
@@ -0,0 +1,41 @@
1
+ {"id": "score-001", "text": "The lighthouse keeper had kept the same routine for thirty-one years. Every evening at dusk he climbed the iron stairs, wiped the salt from the great lens, and lit the lamp. On the night the supply boat failed to arrive, he noticed something unusual on the horizon: a second light, low and steady, where no ship should have been. He watched it for an hour before he decided to"}
2
+ {"id": "score-002", "text": "Sourdough bread relies on a culture of wild yeast and lactic acid bacteria rather than commercial yeast. The bacteria produce acids that give the loaf its tangy flavor and help it keep longer, while the yeast produces the carbon dioxide that makes the dough rise. Because the culture works slowly, most bakers mix the dough in the evening and let it ferment overnight in a cool kitchen. The next morning, the dough should have roughly doubled in size, and"}
3
+ {"id": "score-003", "text": "When the city first proposed closing the main street to cars, most shop owners were against it. They worried that customers would not walk two blocks from the nearest parking garage. A year later, foot traffic had risen by a third, and several of the loudest critics had added outdoor seating. The lesson the council drew from the experiment was not that cars are bad for business, but that"}
4
+ {"id": "score-004", "text": "Dear Mr. Alvarez,\n\nThank you for your letter of 12 March regarding the delayed delivery of your order. I have looked into the matter with our warehouse team, and I am sorry to report that the delay was caused by an error on our side. Your order was packed correctly but was assigned to the wrong regional carrier. To make up for the inconvenience, we would like to"}
5
+ {"id": "score-005", "text": "The history of timekeeping is a history of ever smaller errors. Sundials drift with the seasons, water clocks with the temperature, and pendulum clocks with the slightest change in the length of the rod. The quartz crystal, which vibrates at a precise frequency when an electric current is applied, made accurate time cheap enough for every wristwatch. Atomic clocks went further still, defining the second itself in terms of"}
6
+ {"id": "score-006", "text": "Maya opened the old notebook she had found in the attic. The first pages were recipes written in her grandmother's careful handwriting, but halfway through the entries changed. There were dates, names she did not recognize, and a list of addresses in a city her grandmother had never mentioned. On the last page, underlined twice, was a single sentence:"}
7
+ {"id": "score-007", "text": "## Configuration\n\nThe server reads its settings from `config.toml` in the working directory. Every setting can also be overridden with an environment variable whose name is the setting name in uppercase, prefixed with `APP_`. For example, `APP_PORT=9000` overrides `port`. Values from the environment always take priority over the file. If neither source provides a value, the built-in default is used. The following settings are required in production:\n\n- `database_url`:"}
8
+ {"id": "score-008", "text": "To rotate an API key without downtime, first create a second key in the dashboard and deploy it to every service that calls the API. Both keys remain valid during this period. Once your logs show that no requests are using the old key, revoke it from the dashboard. Note that revocation takes effect within sixty seconds, so any service still using the old key at that point will"}
9
+ {"id": "score-009", "text": "Garbage collection in the JVM is divided into generations. Most objects die young, so new allocations go into the young generation, which is collected frequently and cheaply. Objects that survive several young collections are promoted to the old generation, which is collected less often because a full scan is expensive. Tuning the collector usually starts with measuring the allocation rate and the"}
10
+ {"id": "score-010", "text": "A database index speeds up reads at the cost of slower writes and extra storage. When a row is inserted, every index on the table must be updated as well. For this reason, adding an index to every column is rarely a good idea. A better approach is to look at the slowest queries in production, check which columns appear in their WHERE clauses and joins, and"}
11
+ {"id": "score-011", "text": "def load_settings(path):\n \"\"\"Read key=value pairs from a file, skipping blank lines and comments.\"\"\"\n settings = {}\n with open(path, encoding=\"utf-8\") as handle:\n for line_number, raw in enumerate(handle, start=1):\n line = raw.strip()\n if not line or line.startswith(\"#\"):\n continue\n if \"=\" not in line:\n raise ValueError(f\"line {line_number}: expected key=value\")\n key, value = line.split(\"=\", 1)\n "}
12
+ {"id": "score-012", "text": "class LRUCache:\n def __init__(self, capacity: int) -> None:\n if capacity < 1:\n raise ValueError(\"capacity must be positive\")\n self.capacity = capacity\n self._items: dict[str, object] = {}\n\n def get(self, key: str) -> object | None:\n if key not in self._items:\n return None\n value = self._items.pop(key)\n self._items[key] = value\n return value\n\n def put(self, key: str, value: object) -> None:\n "}
13
+ {"id": "score-013", "text": "import statistics\n\n\ndef summarize(samples: list[float]) -> dict[str, float]:\n \"\"\"Return basic statistics for a list of latency samples in milliseconds.\"\"\"\n if not samples:\n raise ValueError(\"no samples\")\n ordered = sorted(samples)\n p95_index = int(0.95 * (len(ordered) - 1))\n return {\n \"count\": len(ordered),\n \"mean\": statistics.fmean(ordered),\n "}
14
+ {"id": "score-014", "text": "export async function fetchWithRetry(url, options = {}, retries = 3) {\n let lastError;\n for (let attempt = 0; attempt <= retries; attempt++) {\n try {\n const response = await fetch(url, options);\n if (response.status >= 500) {\n throw new Error(`server error ${response.status}`);\n }\n return response;\n } catch (error) {\n lastError = error;\n const delay = 2 ** attempt * 100;\n "}
15
+ {"id": "score-015", "text": "interface User {\n id: number;\n name: string;\n email: string;\n roles: string[];\n}\n\nfunction hasRole(user: User, role: string): boolean {\n return user.roles.includes(role);\n}\n\nfunction groupByRole(users: User[]): Map<string, User[]> {\n const groups = new Map<string, User[]>();\n for (const user of users) {\n for (const role of user.roles) {\n "}
16
+ {"id": "score-016", "text": "use std::collections::HashMap;\n\n/// Counts how many times each word appears in the input, ignoring case.\npub fn word_counts(text: &str) -> HashMap<String, usize> {\n let mut counts = HashMap::new();\n for word in text.split_whitespace() {\n let normalized = word\n .trim_matches(|c: char| !c.is_alphanumeric())\n .to_lowercase();\n if normalized.is_empty() {\n continue;\n }\n "}
17
+ {"id": "score-017", "text": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"time\"\n)\n\nfunc healthHandler(w http.ResponseWriter, r *http.Request) {\n\tif r.Method != http.MethodGet {\n\t\thttp.Error(w, \"method not allowed\", http.StatusMethodNotAllowed)\n\t\treturn\n\t}\n\tw.Header().Set(\"Content-Type\", \"application/json\")\n\tfmt.Fprintf(w, `{\"status\":\"ok\",\"time\":\"%s\"}`, time.Now().UTC().Format(time.RFC3339))\n}\n\nfunc main() {\n\tmux := http.NewServeMux()\n\t"}
18
+ {"id": "score-018", "text": "-- Monthly revenue per product category for the last full year.\nSELECT\n date_trunc('month', o.created_at) AS month,\n p.category,\n SUM(oi.quantity * oi.unit_price) AS revenue\nFROM orders AS o\nJOIN order_items AS oi ON oi.order_id = o.id\nJOIN products AS p ON p.id = oi.product_id\nWHERE o.status = 'completed'\n AND o.created_at >= date_trunc('year', now()) - interval '1 year'\n AND "}
19
+ {"id": "score-019", "text": "#!/usr/bin/env bash\nset -euo pipefail\n\n# Back up a directory into a dated tarball and keep only the newest seven.\nsource_dir=\"${1:?usage: backup.sh SOURCE_DIR DEST_DIR}\"\ndest_dir=\"${2:?usage: backup.sh SOURCE_DIR DEST_DIR}\"\nstamp=\"$(date +%Y-%m-%d)\"\narchive=\"${dest_dir}/backup-${stamp}.tar.gz\"\n\nmkdir -p \"${dest_dir}\"\ntar -czf \"${archive}\" -C \"${source_dir}\" .\n\n# Delete everything except the seven most recent archives.\n"}
20
+ {"id": "score-020", "text": "#include <stdio.h>\n#include <string.h>\n\n/* Reverse a string in place and return it. */\nchar *reverse(char *s) {\n size_t len = strlen(s);\n for (size_t i = 0; i < len / 2; i++) {\n char tmp = s[i];\n s[i] = s[len - 1 - i];\n s[len - 1 - i] = tmp;\n }\n return s;\n}\n\nint main(void) {\n char word[] = \"quantization\";\n "}
21
+ {"id": "score-021", "text": "Problem: A rectangle has a perimeter of 36 cm and its length is twice its width. Find its area.\n\nSolution: Let the width be w. Then the length is 2w, and the perimeter is 2(w + 2w) = 6w. Setting 6w = 36 gives w = 6, so the length is 12. The area is therefore"}
22
+ {"id": "score-022", "text": "Theorem. There are infinitely many prime numbers.\n\nProof. Suppose, for contradiction, that there are only finitely many primes p_1, p_2, ..., p_n. Consider the number N = p_1 p_2 ... p_n + 1. N is greater than 1, so it has at least one prime factor q. Since q is prime, it must be one of the p_i. But then q divides both N and the product p_1 p_2 ... p_n, so"}
23
+ {"id": "score-023", "text": "To differentiate f(x) = x^2 sin(x), we use the product rule, which states that the derivative of u(x)v(x) is u'(x)v(x) + u(x)v'(x). Here u(x) = x^2 and v(x) = sin(x), so u'(x) = 2x and v'(x) = cos(x). Substituting these into the rule gives"}
24
+ {"id": "score-024", "text": "The expected value of a fair six-sided die is (1 + 2 + 3 + 4 + 5 + 6) / 6 = 3.5. If we roll two dice and add the results, linearity of expectation tells us the expected sum is 7, even though the two rolls are independent and the distribution of the sum is not uniform. The variance of a single die is 35/12, and because the rolls are independent, the variance of the sum is"}
25
+ {"id": "score-025", "text": "{\n \"name\": \"quantdiff-demo\",\n \"version\": \"0.3.1\",\n \"description\": \"Compare quantized builds of a local model on your own prompts\",\n \"license\": \"Apache-2.0\",\n \"private\": true,\n \"type\": \"module\",\n \"engines\": {\n \"node\": \">=20\"\n },\n \"scripts\": {\n \"build\": \"tsc -p .\",\n \"test\": \"vitest run\",\n \"lint\": \"eslint src\"\n },\n \"dependencies\": {\n \"zod\": \"^3.23.0\"\n },\n \"devDependencies\": {\n \"typescript\": \"^5.5.0\",\n "}
26
+ {"id": "score-026", "text": "apiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: web\n labels:\n app: web\nspec:\n replicas: 3\n selector:\n matchLabels:\n app: web\n template:\n metadata:\n labels:\n app: web\n spec:\n containers:\n - name: web\n image: registry.example/web:1.8.2\n ports:\n - containerPort: 8080\n env:\n - name: LOG_LEVEL\n value: info\n readinessProbe:\n httpGet:\n path: /healthz\n port: 8080\n resources:\n "}
27
+ {"id": "score-027", "text": "id,date,region,product,units,unit_price\n1001,2025-01-02,north,widget,12,4.50\n1002,2025-01-02,south,gadget,3,19.99\n1003,2025-01-03,north,gadget,7,19.99\n1004,2025-01-03,east,widget,20,4.50\n1005,2025-01-04,west,gizmo,1,89.00\n1006,2025-01-04,south,widget,15,4.50\n1007,2025-01-05,east,gizmo,2,89.00\n1008,2025-01-05,north,widget,9,4.50\n1009,2025-01-06,west,gadget,4,19.99\n1010,2025-01-06,south,gizmo,1,89.00\n1011,2025-01-07,"}
28
+ {"id": "score-028", "text": "INTERVIEWER: You spent ten years building bridges before you started teaching. What made you switch?\n\nENGINEER: Honestly, it was a single conversation with an intern. She asked me why we had used a particular steel grade, and I realized I could not explain it without saying \"because that is how we always do it.\"\n\nINTERVIEWER: And that bothered you.\n\nENGINEER: It bothered me a lot. So I"}
29
+ {"id": "score-029", "text": "\"Are you sure this is the right train?\" Leo asked, looking at the empty platform.\n\n\"The board said platform four,\" Nadia replied. \"And this is platform four.\"\n\n\"The board also said it leaves at 6:10. It is 6:25.\"\n\nNadia checked her phone, then the board again, then her phone. \"Okay,\" she said slowly, \"there is a chance that"}
30
+ {"id": "score-030", "text": "Customer: Hi, I was charged twice for my subscription this month.\nAgent: I am sorry about that. Could you tell me the last four digits of the card that was charged?\nCustomer: It ends in 4417.\nAgent: Thank you. I can see two payments of 9.99 on the 3rd. The second one was a duplicate caused by a payment retry on our side. I have"}
31
+ {"id": "score-031", "text": "La biblioteca municipal abrio sus puertas en 1923 gracias a la donacion de un comerciante local que queria que todos los vecinos tuvieran acceso a los libros. Durante decadas fue el unico lugar del pueblo con calefaccion en invierno, por lo que muchas familias pasaban alli las tardes. Hoy en dia, ademas de prestar libros, ofrece talleres de informatica y clases de idiomas, y su director asegura que"}
32
+ {"id": "score-032", "text": "Para preparar una buena tortilla de patatas, primero hay que pelar y cortar las patatas en laminas finas. Despues se frien a fuego medio en abundante aceite de oliva, junto con la cebolla, hasta que esten tiernas pero sin dorarse. Mientras tanto, se baten los huevos con una pizca de sal. Cuando las patatas esten listas,"}
33
+ {"id": "score-033", "text": "Die Energiewende stellt Deutschland vor grosse Herausforderungen. Wind- und Solaranlagen liefern Strom nicht gleichmaessig, sondern abhaengig vom Wetter. Deshalb braucht das Netz Speicher, flexible Kraftwerke und mehr Leitungen von Norden nach Sueden, wo besonders viel Strom verbraucht wird. Viele Experten sind sich einig, dass der Ausbau der Netze in den letzten Jahren"}
34
+ {"id": "score-034", "text": "Sehr geehrte Damen und Herren,\n\nhiermit moechte ich mich um die ausgeschriebene Stelle als Softwareentwicklerin in Ihrem Team in Leipzig bewerben. In meiner bisherigen Taetigkeit habe ich vor allem Webanwendungen mit Python und TypeScript entwickelt und dabei eng mit Designern und Produktmanagern zusammengearbeitet. Besonders interessiert mich an Ihrem Unternehmen,"}
35
+ {"id": "score-035", "text": "人工智能技术在过去十年中发展迅速,尤其是在自然语言处理领域。大型语言模型能够根据上下文生成流畅的文本,回答问题,甚至编写程序代码。然而,这些模型也存在一些问题,例如有时会生成不准确的信息,而且训练和运行它们需要大量的计算资源。为了让模型能够在普通电脑上运行,研究人员提出了量化的方法,也就是"}
36
+ {"id": "score-036", "text": "我第一次去北京是在一个寒冷的冬天。下了火车以后,我按照朋友给的地址找到了一家小饭馆。老板是一位热情的老人,他看我冻得发抖,马上给我端来一碗热腾腾的饺子。那天晚上我们聊了很久,他告诉我"}
37
+ {"id": "score-037", "text": "भारत में मानसून का मौसम किसानों के लिए बहुत महत्वपूर्ण होता है। देश की अधिकांश खेती बारिश पर निर्भर करती है, इसलिए अगर मानसून देर से आता है या कम बारिश होती है, तो फसलों पर इसका सीधा असर पड़ता है। पिछले कुछ वर्षों में मौसम के बदलते स्वरूप ने वैज्ञानिकों को चिंता में डाल दिया है, क्योंकि"}
38
+ {"id": "score-038", "text": "मेरी दादी हर रविवार सुबह जल्दी उठकर पूरे परिवार के लिए आलू के पराठे बनाती थीं। रसोई से आने वाली खुशबू से ही हम सब बच्चे जाग जाते थे। उनका कहना था कि अच्छे खाने का असली राज़ मसालों में नहीं, बल्कि"}
39
+ {"id": "score-039", "text": "Section 4. Termination. Either party may terminate this Agreement upon thirty (30) days written notice to the other party. Either party may terminate this Agreement immediately if the other party materially breaches any provision of this Agreement and fails to cure such breach within fifteen (15) days after receiving written notice of the breach. Upon termination, the Customer shall"}
40
+ {"id": "score-040", "text": "Abstract. We study the effect of weight quantization on the factual recall of medium-sized language models. Using a set of 2,000 short questions with unambiguous answers, we compare 16-bit weights with 8-bit, 5-bit and 4-bit variants of the same checkpoints. We find that accuracy degrades only slightly at 8 and 5 bits, but that 4-bit variants lose between"}
41
+ {"id": "score-041", "text": "GENEVA, 14 May. Delegates from more than forty countries agreed on Thursday to a new framework for sharing data on glacier melt, after three days of negotiations that several participants described as unusually constructive. The agreement commits signatories to publish measurements from their monitoring stations within six months of collection. Critics, however, pointed out that"}
@@ -0,0 +1,32 @@
1
+ {"id": "tools-001", "kind": "tools", "messages": [{"role": "system", "content": "You are a helpful assistant with access to tools. Call a tool only when it is needed to answer the request. If you can answer directly, answer in plain text without calling any tool."}, {"role": "user", "content": "What is the weather like in Lisbon right now?"}], "max_tokens": 256, "tools": [{"name": "get_current_weather", "description": "Get the current weather conditions for a city.", "parameters": {"type": "object", "properties": {"city": {"type": "string", "description": "City name only, without country or region, for example Berlin."}, "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]}}, "required": ["city"], "additionalProperties": false}}], "expected_tool": "get_current_weather", "expected_arguments": {"city": "Lisbon"}}
2
+ {"id": "tools-002", "kind": "tools", "messages": [{"role": "system", "content": "You are a helpful assistant with access to tools. Call a tool only when it is needed to answer the request. If you can answer directly, answer in plain text without calling any tool."}, {"role": "user", "content": "What is 2 + 2?"}], "max_tokens": 256, "tools": [{"name": "get_current_weather", "description": "Get the current weather conditions for a city.", "parameters": {"type": "object", "properties": {"city": {"type": "string", "description": "City name only, without country or region, for example Berlin."}, "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]}}, "required": ["city"], "additionalProperties": false}}], "expected_tool": null}
3
+ {"id": "tools-003", "kind": "tools", "messages": [{"role": "system", "content": "You are a helpful assistant with access to tools. Call a tool only when it is needed to answer the request. If you can answer directly, answer in plain text without calling any tool."}, {"role": "user", "content": "Convert 12 kilometers to miles."}], "max_tokens": 256, "tools": [{"name": "convert_units", "description": "Convert a physical quantity between units of length, mass or temperature.", "parameters": {"type": "object", "properties": {"value": {"type": "number"}, "from_unit": {"type": "string", "enum": ["km", "mi", "m", "ft", "kg", "lb", "celsius", "fahrenheit"]}, "to_unit": {"type": "string", "enum": ["km", "mi", "m", "ft", "kg", "lb", "celsius", "fahrenheit"]}}, "required": ["value", "from_unit", "to_unit"], "additionalProperties": false}}, {"name": "convert_currency", "description": "Convert an amount of money between currencies at today's exchange rate.", "parameters": {"type": "object", "properties": {"amount": {"type": "number"}, "from_currency": {"type": "string", "pattern": "^[A-Z]{3}$", "description": "ISO 4217 code."}, "to_currency": {"type": "string", "pattern": "^[A-Z]{3}$", "description": "ISO 4217 code."}}, "required": ["amount", "from_currency", "to_currency"], "additionalProperties": false}}], "expected_tool": "convert_units", "expected_arguments": {"value": 12, "from_unit": "km", "to_unit": "mi"}}
4
+ {"id": "tools-004", "kind": "tools", "messages": [{"role": "system", "content": "You are a helpful assistant with access to tools. Call a tool only when it is needed to answer the request. If you can answer directly, answer in plain text without calling any tool."}, {"role": "user", "content": "How much is 250 euros in Japanese yen?"}], "max_tokens": 256, "tools": [{"name": "convert_units", "description": "Convert a physical quantity between units of length, mass or temperature.", "parameters": {"type": "object", "properties": {"value": {"type": "number"}, "from_unit": {"type": "string", "enum": ["km", "mi", "m", "ft", "kg", "lb", "celsius", "fahrenheit"]}, "to_unit": {"type": "string", "enum": ["km", "mi", "m", "ft", "kg", "lb", "celsius", "fahrenheit"]}}, "required": ["value", "from_unit", "to_unit"], "additionalProperties": false}}, {"name": "convert_currency", "description": "Convert an amount of money between currencies at today's exchange rate.", "parameters": {"type": "object", "properties": {"amount": {"type": "number"}, "from_currency": {"type": "string", "pattern": "^[A-Z]{3}$", "description": "ISO 4217 code."}, "to_currency": {"type": "string", "pattern": "^[A-Z]{3}$", "description": "ISO 4217 code."}}, "required": ["amount", "from_currency", "to_currency"], "additionalProperties": false}}], "expected_tool": "convert_currency", "expected_arguments": {"amount": 250, "from_currency": "EUR", "to_currency": "JPY"}}
5
+ {"id": "tools-005", "kind": "tools", "messages": [{"role": "system", "content": "You are a helpful assistant with access to tools. Call a tool only when it is needed to answer the request. If you can answer directly, answer in plain text without calling any tool."}, {"role": "user", "content": "Will I need an umbrella in Seattle over the next 3 days?"}], "max_tokens": 256, "tools": [{"name": "get_current_weather", "description": "Get the current weather conditions for a city.", "parameters": {"type": "object", "properties": {"city": {"type": "string", "description": "City name only, without country or region, for example Berlin."}, "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]}}, "required": ["city"], "additionalProperties": false}}, {"name": "get_weather_forecast", "description": "Get the daily weather forecast for the coming days in a city.", "parameters": {"type": "object", "properties": {"city": {"type": "string", "description": "City name only, without country or region, for example Berlin."}, "days": {"type": "integer", "minimum": 1, "maximum": 10, "description": "Number of days to forecast."}}, "required": ["city", "days"], "additionalProperties": false}}], "expected_tool": "get_weather_forecast", "expected_arguments": {"city": "Seattle", "days": 3}}
6
+ {"id": "tools-006", "kind": "tools", "messages": [{"role": "system", "content": "You are a helpful assistant with access to tools. Call a tool only when it is needed to answer the request. If you can answer directly, answer in plain text without calling any tool."}, {"role": "user", "content": "Find me flights from SFO to JFK on 2025-09-14 for 2 passengers in business class."}], "max_tokens": 256, "tools": [{"name": "search_flights", "description": "Search for available flights between two airports on a date.", "parameters": {"type": "object", "properties": {"origin": {"type": "string", "pattern": "^[A-Z]{3}$", "description": "Three-letter IATA airport code."}, "destination": {"type": "string", "pattern": "^[A-Z]{3}$", "description": "Three-letter IATA airport code."}, "date": {"type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$", "description": "Date in YYYY-MM-DD format."}, "passengers": {"type": "integer", "minimum": 1, "maximum": 9}, "cabin": {"type": "string", "enum": ["economy", "premium_economy", "business", "first"]}}, "required": ["origin", "destination", "date"], "additionalProperties": false}}, {"name": "get_flight_status", "description": "Get the live status of a specific flight by its flight number.", "parameters": {"type": "object", "properties": {"flight_number": {"type": "string", "pattern": "^[A-Z0-9]{2}\\d{1,4}$"}, "date": {"type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$", "description": "Date in YYYY-MM-DD format."}}, "required": ["flight_number"], "additionalProperties": false}}, {"name": "get_current_weather", "description": "Get the current weather conditions for a city.", "parameters": {"type": "object", "properties": {"city": {"type": "string", "description": "City name only, without country or region, for example Berlin."}, "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]}}, "required": ["city"], "additionalProperties": false}}], "expected_tool": "search_flights", "expected_arguments": {"origin": "SFO", "destination": "JFK", "date": "2025-09-14", "passengers": 2, "cabin": "business"}}
7
+ {"id": "tools-007", "kind": "tools", "messages": [{"role": "system", "content": "You are a helpful assistant with access to tools. Call a tool only when it is needed to answer the request. If you can answer directly, answer in plain text without calling any tool."}, {"role": "user", "content": "Translate the word 'thank you' into French."}], "max_tokens": 256, "tools": [{"name": "get_current_weather", "description": "Get the current weather conditions for a city.", "parameters": {"type": "object", "properties": {"city": {"type": "string", "description": "City name only, without country or region, for example Berlin."}, "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]}}, "required": ["city"], "additionalProperties": false}}, {"name": "create_calendar_event", "description": "Create a new event in the user's calendar.", "parameters": {"type": "object", "properties": {"title": {"type": "string"}, "date": {"type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$", "description": "Date in YYYY-MM-DD format."}, "start_time": {"type": "string", "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$", "description": "24-hour HH:MM."}, "duration_minutes": {"type": "integer", "minimum": 5, "maximum": 1440}}, "required": ["title", "date", "start_time", "duration_minutes"], "additionalProperties": false}}], "expected_tool": null}
8
+ {"id": "tools-008", "kind": "tools", "messages": [{"role": "system", "content": "You are a helpful assistant with access to tools. Call a tool only when it is needed to answer the request. If you can answer directly, answer in plain text without calling any tool."}, {"role": "user", "content": "Is flight BA287 on time?"}], "max_tokens": 256, "tools": [{"name": "search_flights", "description": "Search for available flights between two airports on a date.", "parameters": {"type": "object", "properties": {"origin": {"type": "string", "pattern": "^[A-Z]{3}$", "description": "Three-letter IATA airport code."}, "destination": {"type": "string", "pattern": "^[A-Z]{3}$", "description": "Three-letter IATA airport code."}, "date": {"type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$", "description": "Date in YYYY-MM-DD format."}, "passengers": {"type": "integer", "minimum": 1, "maximum": 9}, "cabin": {"type": "string", "enum": ["economy", "premium_economy", "business", "first"]}}, "required": ["origin", "destination", "date"], "additionalProperties": false}}, {"name": "get_flight_status", "description": "Get the live status of a specific flight by its flight number.", "parameters": {"type": "object", "properties": {"flight_number": {"type": "string", "pattern": "^[A-Z0-9]{2}\\d{1,4}$"}, "date": {"type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$", "description": "Date in YYYY-MM-DD format."}}, "required": ["flight_number"], "additionalProperties": false}}], "expected_tool": "get_flight_status", "expected_arguments": {"flight_number": "BA287"}}
9
+ {"id": "tools-009", "kind": "tools", "messages": [{"role": "system", "content": "You are a helpful assistant with access to tools. Call a tool only when it is needed to answer the request. If you can answer directly, answer in plain text without calling any tool."}, {"role": "user", "content": "Add a meeting called Budget review to my calendar on 2025-03-18 at 15:30 for 45 minutes."}], "max_tokens": 256, "tools": [{"name": "list_calendar_events", "description": "List the events already in the user's calendar on a given date.", "parameters": {"type": "object", "properties": {"date": {"type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$", "description": "Date in YYYY-MM-DD format."}}, "required": ["date"], "additionalProperties": false}}, {"name": "create_calendar_event", "description": "Create a new event in the user's calendar.", "parameters": {"type": "object", "properties": {"title": {"type": "string"}, "date": {"type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$", "description": "Date in YYYY-MM-DD format."}, "start_time": {"type": "string", "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$", "description": "24-hour HH:MM."}, "duration_minutes": {"type": "integer", "minimum": 5, "maximum": 1440}}, "required": ["title", "date", "start_time", "duration_minutes"], "additionalProperties": false}}], "expected_tool": "create_calendar_event", "expected_arguments": {"title": "Budget review", "date": "2025-03-18", "start_time": "15:30", "duration_minutes": 45}}
10
+ {"id": "tools-010", "kind": "tools", "messages": [{"role": "system", "content": "You are a helpful assistant with access to tools. Call a tool only when it is needed to answer the request. If you can answer directly, answer in plain text without calling any tool."}, {"role": "user", "content": "What do I have scheduled on 2025-03-18?"}], "max_tokens": 256, "tools": [{"name": "list_calendar_events", "description": "List the events already in the user's calendar on a given date.", "parameters": {"type": "object", "properties": {"date": {"type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$", "description": "Date in YYYY-MM-DD format."}}, "required": ["date"], "additionalProperties": false}}, {"name": "create_calendar_event", "description": "Create a new event in the user's calendar.", "parameters": {"type": "object", "properties": {"title": {"type": "string"}, "date": {"type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$", "description": "Date in YYYY-MM-DD format."}, "start_time": {"type": "string", "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$", "description": "24-hour HH:MM."}, "duration_minutes": {"type": "integer", "minimum": 5, "maximum": 1440}}, "required": ["title", "date", "start_time", "duration_minutes"], "additionalProperties": false}}], "expected_tool": "list_calendar_events", "expected_arguments": {"date": "2025-03-18"}}
11
+ {"id": "tools-011", "kind": "tools", "messages": [{"role": "system", "content": "You are a helpful assistant with access to tools. Call a tool only when it is needed to answer the request. If you can answer directly, answer in plain text without calling any tool."}, {"role": "user", "content": "Write a haiku about autumn leaves."}], "max_tokens": 256, "tools": [{"name": "search_flights", "description": "Search for available flights between two airports on a date.", "parameters": {"type": "object", "properties": {"origin": {"type": "string", "pattern": "^[A-Z]{3}$", "description": "Three-letter IATA airport code."}, "destination": {"type": "string", "pattern": "^[A-Z]{3}$", "description": "Three-letter IATA airport code."}, "date": {"type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$", "description": "Date in YYYY-MM-DD format."}, "passengers": {"type": "integer", "minimum": 1, "maximum": 9}, "cabin": {"type": "string", "enum": ["economy", "premium_economy", "business", "first"]}}, "required": ["origin", "destination", "date"], "additionalProperties": false}}, {"name": "get_flight_status", "description": "Get the live status of a specific flight by its flight number.", "parameters": {"type": "object", "properties": {"flight_number": {"type": "string", "pattern": "^[A-Z0-9]{2}\\d{1,4}$"}, "date": {"type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$", "description": "Date in YYYY-MM-DD format."}}, "required": ["flight_number"], "additionalProperties": false}}], "expected_tool": null}
12
+ {"id": "tools-012", "kind": "tools", "messages": [{"role": "system", "content": "You are a helpful assistant with access to tools. Call a tool only when it is needed to answer the request. If you can answer directly, answer in plain text without calling any tool."}, {"role": "user", "content": "Show me the 5 most recent orders that were cancelled."}], "max_tokens": 256, "tools": [{"name": "query_orders", "description": "Look up orders in the store database.", "parameters": {"type": "object", "properties": {"status": {"type": "string", "enum": ["pending", "shipped", "delivered", "cancelled"]}, "customer_id": {"type": "integer", "minimum": 1}, "limit": {"type": "integer", "minimum": 1, "maximum": 100}}, "required": [], "additionalProperties": false}}, {"name": "get_customer", "description": "Fetch one customer record by its numeric id.", "parameters": {"type": "object", "properties": {"customer_id": {"type": "integer", "minimum": 1}}, "required": ["customer_id"], "additionalProperties": false}}], "expected_tool": "query_orders", "expected_arguments": {"status": "cancelled", "limit": 5}}
13
+ {"id": "tools-013", "kind": "tools", "messages": [{"role": "system", "content": "You are a helpful assistant with access to tools. Call a tool only when it is needed to answer the request. If you can answer directly, answer in plain text without calling any tool."}, {"role": "user", "content": "Pull up the record for customer 40912."}], "max_tokens": 256, "tools": [{"name": "query_orders", "description": "Look up orders in the store database.", "parameters": {"type": "object", "properties": {"status": {"type": "string", "enum": ["pending", "shipped", "delivered", "cancelled"]}, "customer_id": {"type": "integer", "minimum": 1}, "limit": {"type": "integer", "minimum": 1, "maximum": 100}}, "required": [], "additionalProperties": false}}, {"name": "get_customer", "description": "Fetch one customer record by its numeric id.", "parameters": {"type": "object", "properties": {"customer_id": {"type": "integer", "minimum": 1}}, "required": ["customer_id"], "additionalProperties": false}}], "expected_tool": "get_customer", "expected_arguments": {"customer_id": 40912}}
14
+ {"id": "tools-014", "kind": "tools", "messages": [{"role": "system", "content": "You are a helpful assistant with access to tools. Call a tool only when it is needed to answer the request. If you can answer directly, answer in plain text without calling any tool."}, {"role": "user", "content": "Open the file /home/dana/notes/roadmap.md and show me what it says."}], "max_tokens": 256, "tools": [{"name": "search_files", "description": "Search the user's files by name or content.", "parameters": {"type": "object", "properties": {"query": {"type": "string"}, "extension": {"type": "string", "enum": ["pdf", "docx", "xlsx", "txt", "md", "py"]}, "modified_after": {"type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$", "description": "Date in YYYY-MM-DD format."}}, "required": ["query"], "additionalProperties": false}}, {"name": "read_file", "description": "Read the contents of a file at an exact path.", "parameters": {"type": "object", "properties": {"path": {"type": "string", "description": "Absolute file path."}}, "required": ["path"], "additionalProperties": false}}], "expected_tool": "read_file", "expected_arguments": {"path": "/home/dana/notes/roadmap.md"}}
15
+ {"id": "tools-015", "kind": "tools", "messages": [{"role": "system", "content": "You are a helpful assistant with access to tools. Call a tool only when it is needed to answer the request. If you can answer directly, answer in plain text without calling any tool."}, {"role": "user", "content": "Search my files for \"payroll\", only xlsx spreadsheets modified after 2025-01-01."}], "max_tokens": 256, "tools": [{"name": "search_files", "description": "Search the user's files by name or content.", "parameters": {"type": "object", "properties": {"query": {"type": "string"}, "extension": {"type": "string", "enum": ["pdf", "docx", "xlsx", "txt", "md", "py"]}, "modified_after": {"type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$", "description": "Date in YYYY-MM-DD format."}}, "required": ["query"], "additionalProperties": false}}, {"name": "read_file", "description": "Read the contents of a file at an exact path.", "parameters": {"type": "object", "properties": {"path": {"type": "string", "description": "Absolute file path."}}, "required": ["path"], "additionalProperties": false}}], "expected_tool": "search_files", "expected_arguments": {"query": "payroll", "extension": "xlsx", "modified_after": "2025-01-01"}}
16
+ {"id": "tools-016", "kind": "tools", "messages": [{"role": "system", "content": "You are a helpful assistant with access to tools. Call a tool only when it is needed to answer the request. If you can answer directly, answer in plain text without calling any tool."}, {"role": "user", "content": "What is the capital of Japan?"}], "max_tokens": 256, "tools": [{"name": "get_stock_price", "description": "Get the latest trading price for a stock ticker symbol.", "parameters": {"type": "object", "properties": {"symbol": {"type": "string", "pattern": "^[A-Z]{1,5}$"}}, "required": ["symbol"], "additionalProperties": false}}, {"name": "get_exchange_rate", "description": "Get today's exchange rate between two currencies without converting an amount.", "parameters": {"type": "object", "properties": {"base": {"type": "string", "pattern": "^[A-Z]{3}$"}, "quote": {"type": "string", "pattern": "^[A-Z]{3}$"}}, "required": ["base", "quote"], "additionalProperties": false}}], "expected_tool": null}
17
+ {"id": "tools-017", "kind": "tools", "messages": [{"role": "system", "content": "You are a helpful assistant with access to tools. Call a tool only when it is needed to answer the request. If you can answer directly, answer in plain text without calling any tool."}, {"role": "user", "content": "What is Apple trading at right now? The ticker is AAPL."}], "max_tokens": 256, "tools": [{"name": "get_stock_price", "description": "Get the latest trading price for a stock ticker symbol.", "parameters": {"type": "object", "properties": {"symbol": {"type": "string", "pattern": "^[A-Z]{1,5}$"}}, "required": ["symbol"], "additionalProperties": false}}, {"name": "get_exchange_rate", "description": "Get today's exchange rate between two currencies without converting an amount.", "parameters": {"type": "object", "properties": {"base": {"type": "string", "pattern": "^[A-Z]{3}$"}, "quote": {"type": "string", "pattern": "^[A-Z]{3}$"}}, "required": ["base", "quote"], "additionalProperties": false}}], "expected_tool": "get_stock_price", "expected_arguments": {"symbol": "AAPL"}}
18
+ {"id": "tools-018", "kind": "tools", "messages": [{"role": "system", "content": "You are a helpful assistant with access to tools. Call a tool only when it is needed to answer the request. If you can answer directly, answer in plain text without calling any tool."}, {"role": "user", "content": "What is today's exchange rate from US dollars to Swiss francs?"}], "max_tokens": 256, "tools": [{"name": "get_stock_price", "description": "Get the latest trading price for a stock ticker symbol.", "parameters": {"type": "object", "properties": {"symbol": {"type": "string", "pattern": "^[A-Z]{1,5}$"}}, "required": ["symbol"], "additionalProperties": false}}, {"name": "get_exchange_rate", "description": "Get today's exchange rate between two currencies without converting an amount.", "parameters": {"type": "object", "properties": {"base": {"type": "string", "pattern": "^[A-Z]{3}$"}, "quote": {"type": "string", "pattern": "^[A-Z]{3}$"}}, "required": ["base", "quote"], "additionalProperties": false}}, {"name": "convert_currency", "description": "Convert an amount of money between currencies at today's exchange rate.", "parameters": {"type": "object", "properties": {"amount": {"type": "number"}, "from_currency": {"type": "string", "pattern": "^[A-Z]{3}$", "description": "ISO 4217 code."}, "to_currency": {"type": "string", "pattern": "^[A-Z]{3}$", "description": "ISO 4217 code."}}, "required": ["amount", "from_currency", "to_currency"], "additionalProperties": false}}], "expected_tool": "get_exchange_rate", "expected_arguments": {"base": "USD", "quote": "CHF"}}
19
+ {"id": "tools-019", "kind": "tools", "messages": [{"role": "system", "content": "You are a helpful assistant with access to tools. Call a tool only when it is needed to answer the request. If you can answer directly, answer in plain text without calling any tool."}, {"role": "user", "content": "Show me my unread emails from billing@cloudhost.example."}], "max_tokens": 256, "tools": [{"name": "send_email", "description": "Send an email on behalf of the user.", "parameters": {"type": "object", "properties": {"to": {"type": "string", "description": "Recipient email address."}, "subject": {"type": "string"}, "body": {"type": "string"}}, "required": ["to", "subject", "body"], "additionalProperties": false}}, {"name": "search_email", "description": "Search the user's mailbox.", "parameters": {"type": "object", "properties": {"sender": {"type": "string", "description": "Sender email address."}, "unread_only": {"type": "boolean"}, "limit": {"type": "integer", "minimum": 1, "maximum": 50}}, "required": [], "additionalProperties": false}}], "expected_tool": "search_email", "expected_arguments": {"sender": "billing@cloudhost.example", "unread_only": true}}
20
+ {"id": "tools-020", "kind": "tools", "messages": [{"role": "system", "content": "You are a helpful assistant with access to tools. Call a tool only when it is needed to answer the request. If you can answer directly, answer in plain text without calling any tool."}, {"role": "user", "content": "Email ops@acme.example with the subject 'Deploy done' and the body 'Version 2.4.1 is live.'"}], "max_tokens": 256, "tools": [{"name": "send_email", "description": "Send an email on behalf of the user.", "parameters": {"type": "object", "properties": {"to": {"type": "string", "description": "Recipient email address."}, "subject": {"type": "string"}, "body": {"type": "string"}}, "required": ["to", "subject", "body"], "additionalProperties": false}}, {"name": "search_email", "description": "Search the user's mailbox.", "parameters": {"type": "object", "properties": {"sender": {"type": "string", "description": "Sender email address."}, "unread_only": {"type": "boolean"}, "limit": {"type": "integer", "minimum": 1, "maximum": 50}}, "required": [], "additionalProperties": false}}], "expected_tool": "send_email", "expected_arguments": {"to": "ops@acme.example", "subject": "Deploy done", "body": "Version 2.4.1 is live."}}
21
+ {"id": "tools-021", "kind": "tools", "messages": [{"role": "system", "content": "You are a helpful assistant with access to tools. Call a tool only when it is needed to answer the request. If you can answer directly, answer in plain text without calling any tool."}, {"role": "user", "content": "Set a timer for 25 minutes."}], "max_tokens": 256, "tools": [{"name": "set_timer", "description": "Start a countdown timer.", "parameters": {"type": "object", "properties": {"minutes": {"type": "integer", "minimum": 1, "maximum": 1440}, "label": {"type": "string"}}, "required": ["minutes"], "additionalProperties": false}}, {"name": "set_alarm", "description": "Set an alarm for a clock time.", "parameters": {"type": "object", "properties": {"time": {"type": "string", "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$", "description": "24-hour HH:MM."}}, "required": ["time"], "additionalProperties": false}}], "expected_tool": "set_timer", "expected_arguments": {"minutes": 25}}
22
+ {"id": "tools-022", "kind": "tools", "messages": [{"role": "system", "content": "You are a helpful assistant with access to tools. Call a tool only when it is needed to answer the request. If you can answer directly, answer in plain text without calling any tool."}, {"role": "user", "content": "Wake me up at 06:45 tomorrow."}], "max_tokens": 256, "tools": [{"name": "set_timer", "description": "Start a countdown timer.", "parameters": {"type": "object", "properties": {"minutes": {"type": "integer", "minimum": 1, "maximum": 1440}, "label": {"type": "string"}}, "required": ["minutes"], "additionalProperties": false}}, {"name": "set_alarm", "description": "Set an alarm for a clock time.", "parameters": {"type": "object", "properties": {"time": {"type": "string", "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$", "description": "24-hour HH:MM."}}, "required": ["time"], "additionalProperties": false}}], "expected_tool": "set_alarm", "expected_arguments": {"time": "06:45"}}
23
+ {"id": "tools-023", "kind": "tools", "messages": [{"role": "system", "content": "You are a helpful assistant with access to tools. Call a tool only when it is needed to answer the request. If you can answer directly, answer in plain text without calling any tool."}, {"role": "user", "content": "How many days are there in a leap year?"}], "max_tokens": 256, "tools": [{"name": "set_timer", "description": "Start a countdown timer.", "parameters": {"type": "object", "properties": {"minutes": {"type": "integer", "minimum": 1, "maximum": 1440}, "label": {"type": "string"}}, "required": ["minutes"], "additionalProperties": false}}, {"name": "set_alarm", "description": "Set an alarm for a clock time.", "parameters": {"type": "object", "properties": {"time": {"type": "string", "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$", "description": "24-hour HH:MM."}}, "required": ["time"], "additionalProperties": false}}, {"name": "list_calendar_events", "description": "List the events already in the user's calendar on a given date.", "parameters": {"type": "object", "properties": {"date": {"type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$", "description": "Date in YYYY-MM-DD format."}}, "required": ["date"], "additionalProperties": false}}], "expected_tool": null}
24
+ {"id": "tools-024", "kind": "tools", "messages": [{"role": "system", "content": "You are a helpful assistant with access to tools. Call a tool only when it is needed to answer the request. If you can answer directly, answer in plain text without calling any tool."}, {"role": "user", "content": "What would the monthly payment be on a 300000 loan at 6.5 percent annual interest over 30 years?"}], "max_tokens": 256, "tools": [{"name": "calculate_loan_payment", "description": "Compute the fixed monthly payment of an amortizing loan.", "parameters": {"type": "object", "properties": {"principal": {"type": "number", "exclusiveMinimum": 0}, "annual_rate_percent": {"type": "number", "minimum": 0, "maximum": 100}, "years": {"type": "integer", "minimum": 1, "maximum": 50}}, "required": ["principal", "annual_rate_percent", "years"], "additionalProperties": false}}, {"name": "convert_currency", "description": "Convert an amount of money between currencies at today's exchange rate.", "parameters": {"type": "object", "properties": {"amount": {"type": "number"}, "from_currency": {"type": "string", "pattern": "^[A-Z]{3}$", "description": "ISO 4217 code."}, "to_currency": {"type": "string", "pattern": "^[A-Z]{3}$", "description": "ISO 4217 code."}}, "required": ["amount", "from_currency", "to_currency"], "additionalProperties": false}}, {"name": "describe_numbers", "description": "Compute summary statistics for a list of numbers.", "parameters": {"type": "object", "properties": {"numbers": {"type": "array", "items": {"type": "number"}, "minItems": 1}, "statistic": {"type": "string", "enum": ["mean", "median", "stdev", "sum"]}}, "required": ["numbers", "statistic"], "additionalProperties": false}}], "expected_tool": "calculate_loan_payment", "expected_arguments": {"principal": 300000, "annual_rate_percent": 6.5, "years": 30}}
25
+ {"id": "tools-025", "kind": "tools", "messages": [{"role": "system", "content": "You are a helpful assistant with access to tools. Call a tool only when it is needed to answer the request. If you can answer directly, answer in plain text without calling any tool."}, {"role": "user", "content": "What is the median of 7, 3, 9, 1 and 12?"}], "max_tokens": 256, "tools": [{"name": "calculate_loan_payment", "description": "Compute the fixed monthly payment of an amortizing loan.", "parameters": {"type": "object", "properties": {"principal": {"type": "number", "exclusiveMinimum": 0}, "annual_rate_percent": {"type": "number", "minimum": 0, "maximum": 100}, "years": {"type": "integer", "minimum": 1, "maximum": 50}}, "required": ["principal", "annual_rate_percent", "years"], "additionalProperties": false}}, {"name": "describe_numbers", "description": "Compute summary statistics for a list of numbers.", "parameters": {"type": "object", "properties": {"numbers": {"type": "array", "items": {"type": "number"}, "minItems": 1}, "statistic": {"type": "string", "enum": ["mean", "median", "stdev", "sum"]}}, "required": ["numbers", "statistic"], "additionalProperties": false}}], "expected_tool": "describe_numbers", "expected_arguments": {"numbers": [7, 3, 9, 1, 12], "statistic": "median"}}
26
+ {"id": "tools-026", "kind": "tools", "messages": [{"role": "system", "content": "You are a helpful assistant with access to tools. Call a tool only when it is needed to answer the request. If you can answer directly, answer in plain text without calling any tool."}, {"role": "user", "content": "Translate 'Where is the train station?' into German."}], "max_tokens": 256, "tools": [{"name": "translate_text", "description": "Translate text into another language.", "parameters": {"type": "object", "properties": {"text": {"type": "string"}, "target_language": {"type": "string", "enum": ["es", "fr", "de", "it", "ja", "pt"]}}, "required": ["text", "target_language"], "additionalProperties": false}}, {"name": "search_files", "description": "Search the user's files by name or content.", "parameters": {"type": "object", "properties": {"query": {"type": "string"}, "extension": {"type": "string", "enum": ["pdf", "docx", "xlsx", "txt", "md", "py"]}, "modified_after": {"type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$", "description": "Date in YYYY-MM-DD format."}}, "required": ["query"], "additionalProperties": false}}], "expected_tool": "translate_text", "expected_arguments": {"text": "Where is the train station?", "target_language": "de"}}
27
+ {"id": "tools-027", "kind": "tools", "messages": [{"role": "system", "content": "You are a helpful assistant with access to tools. Call a tool only when it is needed to answer the request. If you can answer directly, answer in plain text without calling any tool."}, {"role": "user", "content": "Convert 98.6 degrees Fahrenheit to Celsius."}], "max_tokens": 256, "tools": [{"name": "convert_units", "description": "Convert a physical quantity between units of length, mass or temperature.", "parameters": {"type": "object", "properties": {"value": {"type": "number"}, "from_unit": {"type": "string", "enum": ["km", "mi", "m", "ft", "kg", "lb", "celsius", "fahrenheit"]}, "to_unit": {"type": "string", "enum": ["km", "mi", "m", "ft", "kg", "lb", "celsius", "fahrenheit"]}}, "required": ["value", "from_unit", "to_unit"], "additionalProperties": false}}, {"name": "convert_currency", "description": "Convert an amount of money between currencies at today's exchange rate.", "parameters": {"type": "object", "properties": {"amount": {"type": "number"}, "from_currency": {"type": "string", "pattern": "^[A-Z]{3}$", "description": "ISO 4217 code."}, "to_currency": {"type": "string", "pattern": "^[A-Z]{3}$", "description": "ISO 4217 code."}}, "required": ["amount", "from_currency", "to_currency"], "additionalProperties": false}}, {"name": "get_current_weather", "description": "Get the current weather conditions for a city.", "parameters": {"type": "object", "properties": {"city": {"type": "string", "description": "City name only, without country or region, for example Berlin."}, "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]}}, "required": ["city"], "additionalProperties": false}}], "expected_tool": "convert_units", "expected_arguments": {"value": 98.6, "from_unit": "fahrenheit", "to_unit": "celsius"}}
28
+ {"id": "tools-028", "kind": "tools", "messages": [{"role": "system", "content": "You are a helpful assistant with access to tools. Call a tool only when it is needed to answer the request. If you can answer directly, answer in plain text without calling any tool."}, {"role": "user", "content": "Explain in one sentence what a prime number is."}], "max_tokens": 256, "tools": [{"name": "describe_numbers", "description": "Compute summary statistics for a list of numbers.", "parameters": {"type": "object", "properties": {"numbers": {"type": "array", "items": {"type": "number"}, "minItems": 1}, "statistic": {"type": "string", "enum": ["mean", "median", "stdev", "sum"]}}, "required": ["numbers", "statistic"], "additionalProperties": false}}, {"name": "calculate_loan_payment", "description": "Compute the fixed monthly payment of an amortizing loan.", "parameters": {"type": "object", "properties": {"principal": {"type": "number", "exclusiveMinimum": 0}, "annual_rate_percent": {"type": "number", "minimum": 0, "maximum": 100}, "years": {"type": "integer", "minimum": 1, "maximum": 50}}, "required": ["principal", "annual_rate_percent", "years"], "additionalProperties": false}}], "expected_tool": null}
29
+ {"id": "tools-029", "kind": "tools", "messages": [{"role": "system", "content": "You are a helpful assistant with access to tools. Call a tool only when it is needed to answer the request. If you can answer directly, answer in plain text without calling any tool."}, {"role": "user", "content": "What's the temperature in Toronto at the moment, in fahrenheit please?"}], "max_tokens": 256, "tools": [{"name": "get_weather_forecast", "description": "Get the daily weather forecast for the coming days in a city.", "parameters": {"type": "object", "properties": {"city": {"type": "string", "description": "City name only, without country or region, for example Berlin."}, "days": {"type": "integer", "minimum": 1, "maximum": 10, "description": "Number of days to forecast."}}, "required": ["city", "days"], "additionalProperties": false}}, {"name": "get_current_weather", "description": "Get the current weather conditions for a city.", "parameters": {"type": "object", "properties": {"city": {"type": "string", "description": "City name only, without country or region, for example Berlin."}, "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]}}, "required": ["city"], "additionalProperties": false}}, {"name": "convert_units", "description": "Convert a physical quantity between units of length, mass or temperature.", "parameters": {"type": "object", "properties": {"value": {"type": "number"}, "from_unit": {"type": "string", "enum": ["km", "mi", "m", "ft", "kg", "lb", "celsius", "fahrenheit"]}, "to_unit": {"type": "string", "enum": ["km", "mi", "m", "ft", "kg", "lb", "celsius", "fahrenheit"]}}, "required": ["value", "from_unit", "to_unit"], "additionalProperties": false}}], "expected_tool": "get_current_weather", "expected_arguments": {"city": "Toronto", "unit": "fahrenheit"}}
30
+ {"id": "tools-030", "kind": "tools", "messages": [{"role": "system", "content": "You are a helpful assistant with access to tools. Call a tool only when it is needed to answer the request. If you can answer directly, answer in plain text without calling any tool."}, {"role": "user", "content": "List all orders for customer 7731 that have already been delivered."}], "max_tokens": 256, "tools": [{"name": "get_customer", "description": "Fetch one customer record by its numeric id.", "parameters": {"type": "object", "properties": {"customer_id": {"type": "integer", "minimum": 1}}, "required": ["customer_id"], "additionalProperties": false}}, {"name": "query_orders", "description": "Look up orders in the store database.", "parameters": {"type": "object", "properties": {"status": {"type": "string", "enum": ["pending", "shipped", "delivered", "cancelled"]}, "customer_id": {"type": "integer", "minimum": 1}, "limit": {"type": "integer", "minimum": 1, "maximum": 100}}, "required": [], "additionalProperties": false}}, {"name": "search_email", "description": "Search the user's mailbox.", "parameters": {"type": "object", "properties": {"sender": {"type": "string", "description": "Sender email address."}, "unread_only": {"type": "boolean"}, "limit": {"type": "integer", "minimum": 1, "maximum": 50}}, "required": [], "additionalProperties": false}}], "expected_tool": "query_orders", "expected_arguments": {"status": "delivered", "customer_id": 7731}}
31
+ {"id": "tools-031", "kind": "tools", "messages": [{"role": "system", "content": "You are a helpful assistant with access to tools. Call a tool only when it is needed to answer the request. If you can answer directly, answer in plain text without calling any tool."}, {"role": "user", "content": "I need economy seats for 3 people from LHR to DXB on 2025-12-20. What is available?"}], "max_tokens": 256, "tools": [{"name": "get_flight_status", "description": "Get the live status of a specific flight by its flight number.", "parameters": {"type": "object", "properties": {"flight_number": {"type": "string", "pattern": "^[A-Z0-9]{2}\\d{1,4}$"}, "date": {"type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$", "description": "Date in YYYY-MM-DD format."}}, "required": ["flight_number"], "additionalProperties": false}}, {"name": "search_flights", "description": "Search for available flights between two airports on a date.", "parameters": {"type": "object", "properties": {"origin": {"type": "string", "pattern": "^[A-Z]{3}$", "description": "Three-letter IATA airport code."}, "destination": {"type": "string", "pattern": "^[A-Z]{3}$", "description": "Three-letter IATA airport code."}, "date": {"type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$", "description": "Date in YYYY-MM-DD format."}, "passengers": {"type": "integer", "minimum": 1, "maximum": 9}, "cabin": {"type": "string", "enum": ["economy", "premium_economy", "business", "first"]}}, "required": ["origin", "destination", "date"], "additionalProperties": false}}, {"name": "convert_currency", "description": "Convert an amount of money between currencies at today's exchange rate.", "parameters": {"type": "object", "properties": {"amount": {"type": "number"}, "from_currency": {"type": "string", "pattern": "^[A-Z]{3}$", "description": "ISO 4217 code."}, "to_currency": {"type": "string", "pattern": "^[A-Z]{3}$", "description": "ISO 4217 code."}}, "required": ["amount", "from_currency", "to_currency"], "additionalProperties": false}}], "expected_tool": "search_flights", "expected_arguments": {"origin": "LHR", "destination": "DXB", "date": "2025-12-20", "passengers": 3, "cabin": "economy"}}
32
+ {"id": "tools-032", "kind": "tools", "messages": [{"role": "system", "content": "You are a helpful assistant with access to tools. Call a tool only when it is needed to answer the request. If you can answer directly, answer in plain text without calling any tool."}, {"role": "user", "content": "Rewrite this sentence so it sounds more polite: 'Send me the file now.'"}], "max_tokens": 256, "tools": [{"name": "send_email", "description": "Send an email on behalf of the user.", "parameters": {"type": "object", "properties": {"to": {"type": "string", "description": "Recipient email address."}, "subject": {"type": "string"}, "body": {"type": "string"}}, "required": ["to", "subject", "body"], "additionalProperties": false}}, {"name": "read_file", "description": "Read the contents of a file at an exact path.", "parameters": {"type": "object", "properties": {"path": {"type": "string", "description": "Absolute file path."}}, "required": ["path"], "additionalProperties": false}}, {"name": "search_files", "description": "Search the user's files by name or content.", "parameters": {"type": "object", "properties": {"query": {"type": "string"}, "extension": {"type": "string", "enum": ["pdf", "docx", "xlsx", "txt", "md", "py"]}, "modified_after": {"type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$", "description": "Date in YYYY-MM-DD format."}}, "required": ["query"], "additionalProperties": false}}], "expected_tool": null}