SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2022.findings-emnlp.193 · EMNLP Findings · 2022

In-Context Learning for Few-Shot Dialogue State Tracking

Noah Smith, Tianbao Xie, Yushi Hu, Mari Ostendorf, Chia-Hsuan Lee, Tao

Open in the Atlas

Code that ran

4 of 6 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 3 have no contract verdict; 1 failure of our instrument; 2 no recorded run), measured 2026-11-24; 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/2022.findings-emnlp.193.json · badge: /api/ran/2022.findings-emnlp.193.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
Yushi-Hu/IC-DST canonical (classifier label)
classifier basis: census
4 ran · 2 no recorded run
FunctionStatusWhere it lives
cast Ran
ran; our contract draft was wrong, not the code
Yushi-Hu/IC-DST/codegen_completion.py
pointer only (licence: MIT); the stored copy get_code serves, from datasec-lab/codebreaker, is pointer only (licence: NONE) · get_code("58a861ed3065cdb3")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from datasec-lab/codebreaker, 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. A run is recorded.

compute_acc Ran
ran on a synthesized input
Yushi-Hu/IC-DST/evaluate_metrics.py
code served (permissive licence) · get_code("7c658949b3affb4d")
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 float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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 numpy as np

torch.manual_seed(0)

# Analyzing the function:
# - gold: dict or list of strings in format "key-value"
# - pred: dict or list of strings in format "key-value"
# - n_slot: int (default 30)
# The function converts dicts to lists, then compares them as strings

# Create test data
gold_dict = {
    "hotel": "expensive",
    "restaurant": "italian",
    "train": "morning"
}

pred_dict = {
    "hotel": "expensive",
    "restaurant": "french",
    "taxi": "airport"
}

n_slot_value = 30

ARGS = {
    "gold": gold_dict,
    "pred": pred_dict,
    "n_slot": n_slot_value
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
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
compute_prf Ran
ran on a synthesized input
Yushi-Hu/IC-DST/evaluate_metrics.py
code served (permissive licence) · get_code("17ecefd229e9e91b")
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, 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 torch

# Analyze the function: it takes gold and pred which can be dicts or lists
# The function converts dicts to lists of formatted strings like 'k-v'
# Then it counts TP, FP, FN for precision/recall/F1 calculation

# Test case 1: both gold and pred as lists of strings
gold_list = ['entity1-type1', 'entity2-type2', 'entity3-type3']
pred_list = ['entity1-type1', 'entity2-type2', 'entity4-type4']

# Test case 2: both as dicts (will be converted to lists internally)
gold_dict = {'entity1': 'type1', 'entity2': 'type2', 'entity3': 'type3'}
pred_dict = {'entity1': 'type1', 'entity2': 'type2', 'entity4': 'type4'}

# Use the dict version for ARGS
ARGS = {
    'gold': gold_dict,
    'pred': pred_dict
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple 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
conversion Ran
ran on a synthesized input
Yushi-Hu/IC-DST/prompting.py
code served (permissive licence) · get_code("5deafd882c22eab9")
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 torch

# Test case 1: normal conversion (forward direction)
prompt_1 = "I want to leaveat 10am and arriveby 5pm with food italian"
ARGS = {
    "prompt": prompt_1,
    "reverse": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — 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
evaluate Not yet run
unverified (harvested, no recorded run)
Yushi-Hu/IC-DST/evaluate_metrics.py
code served (permissive licence) · get_code("c6a3da732f281d1b")
How it ran

no invocation recorded.

include_whitespace Not yet run
unverified (harvested, no recorded run)
Yushi-Hu/IC-DST/codegen_completion.py
code served (permissive licence) · get_code("f5761899e7fefe36")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 3 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 3 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
cast 2 other papers
1 later, 1 same year, order not determinable
2206.13517 (2022-06)
ProGen2: Exploring the Boundaries of Protein Language Models
2406.06822 (2024-06)
An LLM-Assisted Easy-to-Trigger Backdoor Attack on Code Completion Models: Injecting Disguised Vulnerabilities against Strong Detection
conversion 1 other paper
1 same year, order not determinable
2212.09741 (2022-12)
One Embedder, Any Task: Instruction-Finetuned Text Embeddings
include_whitespace 1 other paper
1 same year, order not determinable
2206.13517 (2022-06)
ProGen2: Exploring the Boundaries of Protein Language Models

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-24.

Repositories linked to this paper

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

Abstract

Collecting and annotating task-oriented dialogues is time-consuming and costly; thus, zero and few shot learning could greatly benefit dialogue state tracking (DST). In this work, we propose an in-context learning (ICL) framework for zero-shot and few-shot learning DST, where a large pre-trained language model (LM) takes a test instance and a few exemplars as input, and directly decodes the dialogue state without any parameter updates. To better leverage a tabular domain description in the LM prompt, we reformulate DST into a text-to-SQL problem. We also propose a novel approach to retrieve annotated dialogues as exemplars. Empirical results on MultiWOZ show that our method IC-DST substantially outperforms previous fine-tuned state-of-the-art models in fewshot settings. In addition, we test IC-DST in zero-shot settings, in which the model only takes a fixed task instruction as input, finding that it outperforms previous zero-shot methods by a large margin. 1

For agents

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

get_harvested_code_for_paper("2022.findings-emnlp.193")
get_code_for_paper("2022.findings-emnlp.193")
have("2022.findings-emnlp.193")

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

curl https://syntology.ai/api/ran/2022.findings-emnlp.193.json

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

[![Syntology run record](https://syntology.ai/api/ran/2022.findings-emnlp.193.svg)](https://syntology.ai/paper/2022.findings-emnlp.193)

Connect an agent — have() is free.