SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2204.08426 · NAACL · 2022

CHAI: A CHatbot AI for Task-Oriented Dialogue with Offline Reinforcement Learning

Sergey Levine, Siddharth Verma, Justin Fu, Mengjiao Yang

arXiv · PDF · Open in the Atlas

Code that ran

4 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 4 have no contract verdict; 0 failures 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.08426.json · badge: /api/ran/2204.08426.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
siddharthverma314/chai-naacl-2022 canonical (classifier label)
classifier basis not recorded on the link
4 ran · 1 no recorded run
yifeizhou02/archer community
Papers with Code archive
0 ran · 2 no recorded run
FunctionStatusWhere it lives
generate_uuid Ran
ran on a synthesized input
siddharthverma314/chai-naacl-2022/cocoa/core/util.py
code served (permissive licence) · get_code("0b2ec4d5f7ded4de")
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 uuid

def generate_uuid(prefix):
    return prefix + '_' + str(uuid.uuid4())

ARGS = {
    'prefix': 'test_model'
}
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 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
is_entity Ran
ran on a synthesized input
siddharthverma314/chai-naacl-2022/cocoa/core/entity.py
code served (permissive licence) · get_code("79624785a930cf93")
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 bool, 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.

from collections import namedtuple

class CanonicalEntity(namedtuple('CanonicalEntity', ['value', 'type'])):
    __slots__ = ()

    def __str__(self):
        return '[%s]' % str(self.value)

class Entity(namedtuple('Entity', ['surface', 'canonical'])):
    __slots__ = ()

    @classmethod
    def from_elements(cls, surface=None, value=None, type=None):
        if value is None:
            value = surface
        return super(cls, Entity).__new__(cls, surface, CanonicalEntity(value, type))

    def __str__(self):
        return '[%s|%s]' % (str(self.surface), str(self.canonical.value))

def is_entity(x):
    return isinstance(x, Entity) or isinstance(x, CanonicalEntity)

# Test case 1: Entity instance
entity_obj = Entity.from_elements(surface="apple", value="FRUIT", type="noun")

# Test case 2: CanonicalEntity instance
canonical_obj = CanonicalEntity(value="book", type="noun")

# Test case 3: Non-entity object
non_entity = "random string"

ARGS = {
    'x': entity_obj
}
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 bool, 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
random_multinomial Ran
ran on a synthesized input
siddharthverma314/chai-naacl-2022/cocoa/core/util.py
code served (permissive licence) · get_code("051b6d3efcdab50c")
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 int, ndim 0, dtype family int, 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 random

random.seed(42)

# The function expects 'probs' to be an indexable sequence of numbers
# that sum to approximately 1.0 (since it's used as probabilities in a
# multinomial sampling algorithm). The function iterates through indices
# until the accumulated sum exceeds a random value in [0, 1).

probs = [0.2, 0.3, 0.25, 0.25]

ARGS = {
    "probs": probs
}
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 int, ndim 0, dtype family int, 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
read_json Ran
ran on a synthesized input
siddharthverma314/chai-naacl-2022/cocoa/core/util.py
code served (permissive licence) · get_code("51b941b0a4c27d3d")
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 json
import tempfile
import os

# Create a temporary JSON file with sample data
temp_dir = tempfile.mkdtemp()
json_path = os.path.join(temp_dir, "test.json")

sample_data = {
    "key1": "value1",
    "key2": [1, 2, 3],
    "key3": {"nested": "data"}
}

with open(json_path, 'w') as f:
    json.dump(sample_data, f)

ARGS = {
    "path": json_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 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
CHAIAgent Not yet run
unverified (harvested, no recorded run)
yifeizhou02/archer/archer/models/chai_agent.py
code served (permissive licence) · get_code("c413b3d673c5bb86")
How it ran

no invocation recorded.

DoubleCritic Not yet run
unverified (harvested, no recorded run)
yifeizhou02/archer/archer/models/chai_agent.py
code served (permissive licence) · get_code("3c707b3a78f390d0")
How it ran

no invocation recorded.

tokenize Not yet run
unverified (harvested, no recorded run)
siddharthverma314/chai-naacl-2022/cocoa/core/tokenizer.py
code served (permissive licence) · get_code("702b27974999a98a")
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, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 0 later) and 4 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
is_entity 2 other papers
2 dated earlier
1808.09637 (2018-08)
Decoupling Strategy and Generation in Negotiation Dialogues
2010.09954 (2020-10)
Improving Dialog Systems for Negotiation with Personality Modeling
tokenize 2 other papers
2 dated earlier
1808.09637 (2018-08)
Decoupling Strategy and Generation in Negotiation Dialogues
2010.09954 (2020-10)
Improving Dialog Systems for Negotiation with Personality Modeling
random_multinomial 1 other paper
1 dated earlier
1808.09637 (2018-08)
Decoupling Strategy and Generation in Negotiation Dialogues

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

Conventionally, generation of natural language for dialogue agents may be viewed as a statistical learning problem: determine the patterns in human-provided data and generate appropriate responses with similar statistical properties. However, dialogue can also be regarded as a goal directed process, where speakers attempt to accomplish a specific task. Reinforcement learning (RL) algorithms are designed specifically for solving such goal-directed problems, but the most direct way to apply RLthrough trial-and-error learning in human conversations, -is costly. In this paper, we study how offline reinforcement learning can instead be used to train dialogue agents entirely using static datasets collected from human speakers. Our experiments show that recently developed offline RL methods can be combined with language models to yield realistic dialogue agents that better accomplish task goals.

For agents

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

get_harvested_code_for_paper("2204.08426")
get_code_for_paper("2204.08426")
have("2204.08426")

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

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

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

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

Connect an agent — have() is free.