SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2204.01959 · 2022

Data Augmentation for Intent Classification with Off-the-shelf Large Language Models

arXiv · PDF · Open in the Atlas

Code that ran

7 of 10 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 6 have no contract verdict; 1 failure of our instrument; 3 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/2204.01959.json · badge: /api/ran/2204.01959.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
elementai/data-augmentation-with-llms canonical (classifier label)
classifier basis not recorded on the link
7 ran · 3 no recorded run
FunctionStatusWhere it lives
compile_results Ran
ran on a synthesized input
elementai/data-augmentation-with-llms/runners/compile_results.py
code served (permissive licence) · get_code("a71ad2709e49eaa1")
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 os
import json
import tempfile
import shutil

# Create a temporary directory structure with necessary files
temp_dir = tempfile.mkdtemp()

# Create experiment subdirectories
folder_list = ['exp_1', 'exp_2']
for folder in folder_list:
    folder_path = os.path.join(temp_dir, folder)
    os.makedirs(folder_path, exist_ok=True)
    code_path = os.path.join(folder_path, 'code')
    os.makedirs(code_path, exist_ok=True)
    
    # Create exp_dict.json
    exp_dict = {
        'dataset': {
            'name': 'clinc_oos',
            'config': 'full_default',
            'oos_id': 0
        },
        'exp_type': 'baseline'
    }
    with open(os.path.join(folder_path, 'exp_dict.json'), 'w') as f:
        json.dump(exp_dict, f)
    
    # Create results.json
    results = {
        'experiment': {
            'test_accuracy': 0.85,
            'valid_accuracy': 0.83,
            'test_inscope_accuracy': 0.88,
            'valid_inscope_accuracy': 0.86,
            'test_oos_recall': 0.75,
            'valid_oos_recall': 0.73,
            'overall': {
                'test_inscope_accuracy': 0.88,
                'valid_inscope_accuracy': 0.86,
                'test_oos_recall': 0.75,
                'valid_oos_recall': 0.73
            },
            'few_shot': {
                'test_accuracy': 0.80,
                'valid_accuracy': 0.78
            }
        }
    }
    with open(os.path.join(code_path, 'results.json'), 'w') as f:
        json.dump(results, f)

ARGS = {
    'folder_list': folder_list,
    'exp_dir': temp_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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
fmt Ran
ran on a synthesized input
elementai/data-augmentation-with-llms/runners/compile_results.py
code served (permissive licence) · get_code("47b1f7854f607d9f")
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 str. 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 numpy as np

def fmt(xs):
    return f'{np.mean(xs):.2f} ({np.std(xs):.2f})'

# xs should be an array-like that np.mean() and np.std() can operate on
xs = np.array([1.5, 2.3, 3.1, 2.8, 1.9])

ARGS = {
    'xs': xs
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
get_data_dict Ran
ran on a synthesized input
elementai/data-augmentation-with-llms/utils/data_utils/hwu64_utils.py
code served (permissive licence) · get_code("e21dc00b769aac77")
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 os
import pandas as pd
import tempfile
import shutil

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

# Create a sample CSV file for the 'train' split
train_data = {
    'text': ['hello world', 'goodbye world'],
    'category': ['greet', 'farewell']
}
train_df = pd.DataFrame(train_data)
train_df.to_csv(os.path.join(temp_dir, 'train.csv'), index=False)

# Define name2id mapping
name2id = {
    'greet': '0',
    'farewell': '1'
}

# Construct ARGS dict with all required parameters
ARGS = {
    'path_base': temp_dir,
    'split': 'train',
    'name2id': name2id
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — 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
get_only_chars Ran
ran; our contract draft was wrong, not the code
elementai/data-augmentation-with-llms/utils/data_utils/eda_utils.py
code served (permissive licence) · get_code("f15117422b72cf43")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned str. 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

# The function takes a single parameter 'line' which is a string
# It processes the string by removing certain characters, replacing others,
# converting to lowercase, and cleaning up spaces

line = "Hello, World! This is a test-string with 'quotes' and—dashes.\n\tAnd tabs."

ARGS = {
    'line': line
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
gptj_complete Ran
ran on a synthesized input
elementai/data-augmentation-with-llms/utils/data_utils/augment_slices.py
code served (permissive licence) · get_code("c516938250ca27b0")
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. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 torch
import torch.nn as nn

torch.manual_seed(0)

class MockTokenizer:
    def __init__(self):
        self.vocab_size = 50257
    
    def __call__(self, text, return_tensors=None):
        # Return a mock tokenized output
        if return_tensors == 'pt':
            return MockTokenizerOutput(torch.randint(0, self.vocab_size, (1, 8)))
        return [1, 2, 3]
    
    def encode(self, text):
        # Return a mock token for newline
        return [50256]
    
    def batch_decode(self, token_ids, skip_special_tokens=False):
        # Return mock sentences with proper formatting
        batch_size = token_ids.shape[0]
        return [f"Example 0: Sample sentence {i}\nExample 1: Generated text {i}" for i in range(batch_size)]


class MockTokenizerOutput:
    def __init__(self, input_ids):
        self.input_ids = input_ids
    
    def to(self, device):
        self.input_ids = self.input_ids.to(device)
        return self


class MockGPTJ(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(8, 50257)
    
    def generate(self, input_ids, do_sample=True, max_length=16, temperature=1.0, 
                 eos_token_id=None, num_return_sequences=1, pad_token_id=None, 
                 top_k=0, top_p=1.0):
        # Return mock generated tokens
        batch_size = num_return_sequences
        return torch.randint(0, 50257, (batch_size, max_length))


prompt = "Example 0: Sample\nExample 1:"
n = 3
temp = 0.9
model = MockGPTJ()
tokenizer = MockTokenizer()
top_k = 50
top_p = 0.95

ARGS = {
    'prompt': prompt,
    'n': n,
    'temp': temp,
    'model': model,
    'tokenizer': tokenizer,
    'top_k': top_k,
    'top_p': top_p
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
openai, torch — 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
load_dataset_slices Ran
ran on a synthesized input
elementai/data-augmentation-with-llms/utils/data_utils/augment_slices.py
code served (permissive licence) · get_code("6644e45fa8204287")
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 os
import gc
import torch
import pickle
import tempfile
import shutil

torch.manual_seed(0)

# Create a temporary directory structure that mimics the expected layout
temp_dir = tempfile.mkdtemp()
data_root = temp_dir
data_name = "test_dataset"
full_dir = os.path.join(data_root, data_name, "full")
os.makedirs(full_dir, exist_ok=True)

# Create a simple pickle file with dummy data
dummy_data = {
    "train": [(torch.randn(2, 4), torch.randint(0, 2, (2,))) for _ in range(3)],
    "test": [(torch.randn(2, 4), torch.randint(0, 2, (2,))) for _ in range(2)],
}

pkl_path = os.path.join(full_dir, "data_full_suite.pkl")
with open(pkl_path, "wb") as f:
    pickle.dump(dummy_data, f)

ARGS = {
    "data_root": data_root,
    "data_name": data_name,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
openai, torch — 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
segregate_sub_folders Ran
ran on a synthesized input
elementai/data-augmentation-with-llms/runners/compile_results.py
code served (permissive licence) · get_code("7fa8a4756763ccbc")
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 os
import json
import tempfile
import shutil
from collections import defaultdict

# Create a temporary directory structure with mock experiment folders
temp_dir = tempfile.mkdtemp()

# Create mock experiment folders with exp_dict.json files
exp_folders = [
    {
        'folder_name': 'exp_001',
        'exp_dict': {
            'dataset': {'name': 'dataset_a'},
            'exp_type': 'baseline',
            'run#': 1
        }
    },
    {
        'folder_name': 'exp_002',
        'exp_dict': {
            'dataset': {'name': 'dataset_b'},
            'exp_type': 'gpt_finetuned',
            'gpt3_engine': 'text-davinci-003',
            'gpt3_temp': 0.7,
            'run#': 1
        }
    },
    {
        'folder_name': 'exp_003',
        'exp_dict': {
            'dataset': {'name': 'dataset_a'},
            'exp_type': 'baseline_oracle',
            'run#': 2
        }
    },
    {
        'folder_name': 'exp_004',
        'exp_dict': {
            'dataset': {'name': 'dataset_c'},
            'exp_type': 'gpt_finetuned',
            'gpt3_engine': 'text-davinci-002',
            'gpt3_temp': 1.0,
            'run#': 1
        }
    }
]

# Create the folder structure
for exp_info in exp_folders:
    folder_path = os.path.join(temp_dir, exp_info['folder_name'])
    os.makedirs(folder_path, exist_ok=True)
    
    exp_dict_path = os.path.join(folder_path, 'exp_dict.json')
    with open(exp_dict_path, 'w') as f:
        json.dump(exp_info['exp_dict'], f)

ARGS = {
    'exp_dir': temp_dir
}
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
get_synonyms Not yet run
unverified (harvested, no recorded run)
elementai/data-augmentation-with-llms/utils/data_utils/eda_utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from vano1205/efficientcl, is pointer only (licence: NONE) · get_code("461078e5a822e755")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from vano1205/efficientcl, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

openai_complete Not yet run
unverified (harvested, no recorded run)
elementai/data-augmentation-with-llms/utils/data_utils/augment_slices.py
code served (permissive licence) · get_code("56c4355e2e469224")
How it ran

no invocation recorded.

synonym_replacement Not yet run
unverified (harvested, no recorded run)
elementai/data-augmentation-with-llms/utils/data_utils/eda_utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from HenryPengZou/DeCrisisMB, is pointer only (licence: NONE) · get_code("56366bd6ff30a29a")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from HenryPengZou/DeCrisisMB, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 2 the same month, 3 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.

FunctionAlso present inEarliest-datedOthers named
get_only_chars 6 other papers
2 dated earlier, 4 later
1901.11196 (2019-01)
EDA: Easy Data Augmentation Techniques for Boosting Performance on Text Classification Tasks
2103.07552 (2021-03)
Few-Shot Text Classification with Triplet Networks, Data Augmentation, and Curriculum Learning
2205.01308 (2022-05)
Contrastive Learning for Prompt-Based Few-Shot Language Learners
and 3 more not named here
get_synonyms 6 other papers
2 dated earlier, 1 the same month, 3 later · 1 only as an assembly brick
2103.07552 (2021-03)
Few-Shot Text Classification with Triplet Networks, Data Augmentation, and Curriculum Learning
2109.05941 (2021-09)
Efficient Contrastive Learning via Novel Data Augmentation and Curriculum Learning
2204.11205 (2022-04)
EPiDA: An Easy Plug-in Data Augmentation Framework for High Performance Text Classification
and 3 more not named here
synonym_replacement 6 other papers
2 dated earlier, 1 the same month, 3 later · 1 only as an assembly brick
2103.07552 (2021-03)
Few-Shot Text Classification with Triplet Networks, Data Augmentation, and Curriculum Learning
2109.05941 (2021-09)
Efficient Contrastive Learning via Novel Data Augmentation and Curriculum Learning
2204.11205 (2022-04)
EPiDA: An Easy Plug-in Data Augmentation Framework for High Performance Text Classification
and 3 more not named here

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

Data augmentation is a widely employed technique to alleviate the problem of data scarcity. In this work, we propose a prompting-based approach to generate labelled training data for intent classification with off-the-shelf language models (LMs) such as GPT-3. An advantage of this method is that no task-specific LM-fine-tuning for data generation is required; hence the method requires no hyper-parameter tuning and is applicable even when the available training data is very scarce. We evaluate the proposed method in a few-shot setting on four diverse intent classification tasks. We find that GPT-generated data significantly boosts the performance of intent classifiers when intents in consideration are sufficiently distinct from each other. In tasks with semantically close intents, we observe that the generated data is less helpful. Our analysis shows that this is because GPT often generates utterances that belong to a closely-related intent instead of the desired one. We present preliminary evidence that a prompting-based GPT classifier could be helpful in filtering the generated data to enhance its quality.

For agents

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

get_harvested_code_for_paper("2204.01959")
get_code_for_paper("2204.01959")
have("2204.01959")

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

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

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

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

Connect an agent — have() is free.