SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.15491 · ACL · 2024

API-BLEND: A Comprehensive Corpora for Training and Benchmarking API LLMs

Soham Dan, Subhajit Chaudhury, Asim Munawar, Pavan Kapanipathi, Ibrahim Abdelaziz, Maxwell Crouse, Vinod Muthusamy, Sadhana Kumaravel, Kinjal Basu, Luis Lastras, Vernon Austel

arXiv · PDF · Open in the Atlas

Code that ran

5 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 5 failures of our instrument; 2 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2402.15491.json · badge: /api/ran/2402.15491.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
ibm/api-blend canonical (classifier label)
classifier basis: census
5 ran · 2 no recorded run
FunctionStatusWhere it lives
extract_nested_slots Ran
ran; our contract draft was wrong, not the code
ibm/api-blend/grammar-based-generation/SeqTopV2-data-gen.py
code served (permissive licence) · get_code("db518f6c2bc0187a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re

def extract_nested_slots(input_string):
    matches = []
    while True:
        match = re.search('\\[SL:([^][]+)\\s+([^][]+)\\]', input_string)
        if match:
            slot_name = match.group(1)
            slot_text = match.group(2)
            matches.append((slot_name, slot_text.strip()))
            input_string = input_string[:match.start()] + input_string[match.end():]
        else:
            break
    return matches

ARGS = {
    "input_string": "This is a sentence with [SL:name John Smith] and [SL:location New York] in it."
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
extract_raw_data Ran
ran; our contract draft was wrong, not the code
ibm/api-blend/llm-based-generation/llm-data-gen.py
code served (permissive licence) · get_code("65f427a22ae2f717")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json
import os
import tempfile
from pathlib import Path

# Create a temporary directory structure with test data
temp_dir = tempfile.mkdtemp()

# Create sample dialogue data files
sample_dialogue_1 = [
    {
        "dialogue_id": "dialogue_001",
        "turns": [
            {
                "speaker": "USER",
                "utterance": "I need a restaurant reservation",
                "frames": [
                    {
                        "state": {
                            "active_intent": "FindRestaurants",
                            "slot_values": {
                                "cuisine": ["Italian"],
                                "party_size": ["4"]
                            }
                        }
                    }
                ]
            },
            {
                "speaker": "BOT",
                "utterance": "I found some Italian restaurants for 4 people",
                "frames": []
            }
        ]
    }
]

sample_dialogue_2 = [
    {
        "dialogue_id": "dialogue_002",
        "turns": [
            {
                "speaker": "USER",
                "utterance": "Book me a table",
                "frames": [
                    {
                        "state": {
                            "active_intent": "BookRestaurant",
                            "slot_values": {
                                "time": ["19:00"],
                                "date": ["2024-01-15"]
                            }
                        }
                    }
                ]
            },
            {
                "speaker": "BOT",
                "utterance": "Table booked successfully",
                "frames": []
            }
        ]
    },
    {
        "dialogue_id": "dialogue_003",
        "turns": [
            {
                "speaker": "USER",
                "utterance": "Cancel that booking",
                "frames": [
                    {
                        "state": {
                            "active_intent": "NONE",
                            "slot_values": {}
                        }
                    }
                ]
            }
        ]
    }
]

# Write test data files
with open(os.path.join(temp_dir, "dialogues_001.json"), "w") as f:
    json.dump(sample_dialogue_1, f)

with open(os.path.join(temp_dir, "dialogues_002.json"), "w") as f:
    json.dump(sample_dialogue_2, f)

# Write schema.json (should be ignored)
with open(os.path.join(temp_dir, "schema.json"), "w") as f:
    json.dump({"schema": "data"}, f)

ARGS = {
    "raw_data_dir": temp_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_ontologies Ran
ran; our contract draft was wrong, not the code
ibm/api-blend/grammar-based-generation/SeqTopV2-data-gen.py
code served (permissive licence) · get_code("27884bec3b0bbee3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re

def get_ontologies(parsed_string):
    ontologies = {}
    text = re.sub('\\s*\\[\\s*', ' [ ', parsed_string)
    text = re.sub('\\s*\\]\\s*', ' ] ', text)
    left_sq_brackets = []
    intents = []
    for token in text.strip().split():
        if token == '[':
            if len(left_sq_brackets) > 0:
                left_sq_brackets[-1] += 1
        elif token == ']':
            left_sq_brackets[-1] -= 1
            if left_sq_brackets[-1] == 0:
                left_sq_brackets.pop()
                intents.pop()
        elif token.startswith('IN:'):
            if len(left_sq_brackets) > 0:
                left_sq_brackets[-1] -= 1
            left_sq_brackets.append(1)
            intent = token[len('IN:'):]
            intents.append(intent)
            ontologies[intent] = ontologies[intent] if intent in ontologies else []
        elif token.startswith('SL:'):
            slot = token[len('SL:'):]
            if slot not in ontologies[intents[-1]]:
                ontologies[intents[-1]].append(slot)
    return ontologies


# Test case 1: Simple intent with slots
parsed_string_1 = "[ IN:AddToPlaylist SL:music_item SL:playlist_owner ]"

# Test case 2: Multiple intents with nested brackets and slots
parsed_string_2 = "[ IN:GetWeather SL:location ] [ IN:PlayMusic SL:artist SL:album ]"

# Test case 3: Complex nesting
parsed_string_3 = "[ IN:BookFlight [ SL:destination SL:date ] SL:airline ]"

ARGS = {
    "parsed_string": parsed_string_1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
parse_string_to_tree Ran
ran; our contract draft was wrong, not the code
ibm/api-blend/grammar-based-generation/SeqTopV2-data-gen.py
code served (permissive licence) · get_code("7b943d0c651eb0d4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

ARGS = {
    'input_string': '[IN:greeting] Hello [SL:name] John [SL:time] morning ]'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
read_file Ran
ran; our contract draft was wrong, not the code
ibm/api-blend/grammar-based-generation/SeqSNIPS_SeqATIS-data-gen.py
code served (permissive licence) · get_code("5523c76f12760fc3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tempfile
import os

# Create a temporary file with the expected format for read_file
# Format: word slot pairs on separate lines, intent on a single line
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt', encoding='utf8')

# Write sample data in the format expected by read_file
temp_file.write("hello O\n")
temp_file.write("world O\n")
temp_file.write("greet\n")
temp_file.write("i O\n")
temp_file.write("want O\n")
temp_file.write("coffee/drink_type\n")
temp_file.write("please O\n")
temp_file.write("request\n")

temp_file.close()

file_path = temp_file.name

ARGS = {
    "file_path": file_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
generate_llm_paraphrase Not yet run
unverified (harvested, no recorded run)
ibm/api-blend/llm-based-generation/llm-data-gen.py
code served (permissive licence) · get_code("76682648b017f6ad")
How it ran

no invocation recorded.

split_string_on_delimiters Not yet run
unverified (harvested, no recorded run)
ibm/api-blend/grammar-based-generation/SeqSNIPS_SeqATIS-data-gen.py
code served (permissive licence) · get_code("af99d100a0f45e95")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 7 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

There is a growing need for Large Language Models (LLMs) to effectively use tools and external Application Programming Interfaces (APIs) to plan and complete tasks. As such, there is tremendous interest in methods that can acquire sufficient quantities of train and test data that involve calls to tools / APIs. Two lines of research have emerged as the predominant strategies for addressing this challenge. The first has focused on synthetic data generation techniques, while the second has involved curating task-adjacent datasets which can be transformed into API / Tool-based tasks. In this paper, we focus on the task of identifying, curating, and transforming existing datasets and, in turn, introduce API-BLEND, a large corpora for training and systematic testing of tool-augmented LLMs. The datasets mimic real-world scenarios involving API-tasks such as API / tool detection, slot filling, and sequencing of the detected APIs. We demonstrate the utility of the API-BLEND dataset for both training and benchmarking purposes 1 .

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2402.15491")
get_code_for_paper("2402.15491")
have("2402.15491")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2402.15491.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2402.15491.svg)](https://syntology.ai/paper/2402.15491)

Connect an agent — have() is free.