SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2506.20409 · EMNLP · 2025

TAPS: Tool-Augmented Personalisation via Structured Tagging

Jeffrey Dalton, Ekaterina Taktasheva

arXiv · PDF · Open in the Atlas

Code that ran

8 of 8 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; 8 failures of our instrument; 0 no recorded run), measured 2026-11-23; 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/2506.20409.json · badge: /api/ran/2506.20409.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
grill-lab/taps canonical (classifier label)
classifier basis: census
8 ran · 0 no recorded run
FunctionStatusWhere it lives
build_slot_value_pool Ran
ran; our contract draft was wrong, not the code
grill-lab/taps/src/experiments/tag_corruption.py
code served (permissive licence) · get_code("05cd17b1f7b02c97")
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
from collections import defaultdict

ACTION_REGEX = re.compile('\\[IN:([A-Z_]+)', re.DOTALL)
SLOT_REGEX = re.compile('\\[SL:([A-Z_]+)\\s+(.*?)\\]')

def find_tags(text):
    """Return list of (tag_type, span_start, span_end, content)"""
    tags = []
    for m in ACTION_REGEX.finditer(text):
        tags.append(('action', m.start(), m.end(), m.group(1)))
    for m in SLOT_REGEX.finditer(text):
        tags.append(('slot', m.start(), m.end(), (m.group(1), m.group(2).strip())))
    return tags

def build_slot_value_pool(dataset):
    pool = defaultdict(set)
    for text in dataset:
        for tag in find_tags(text):
            if tag[0] == 'slot':
                slot_name, slot_val = tag[3]
                pool[slot_name].add(slot_val)
    return {k: list(v) for k, v in pool.items()}

# Create a sample dataset with tagged text
dataset = [
    "User wants [IN:BOOK_FLIGHT with [SL:DESTINATION Paris]",
    "I need [IN:RESERVE_HOTEL for [SL:LOCATION New York] and [SL:CHECKIN tomorrow]",
    "Can I [IN:CANCEL_ORDER with [SL:ORDER_ID 12345] and [SL:REASON changed mind]",
    "[IN:SEARCH_FLIGHTS to [SL:DESTINATION London] for [SL:DATE next week]",
]

ARGS = {
    "dataset": dataset
}
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
choose_slot_name Ran
ran; our contract draft was wrong, not the code
grill-lab/taps/src/experiments/tag_corruption.py
code served (permissive licence) · get_code("77c8b8285a04fb29")
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 random
from sklearn.metrics.pairwise import cosine_similarity
import numpy as np


class MockEmbeddingModel:
    """Minimal mock model that implements the encode method."""
    
    def __init__(self):
        self.embedding_dim = 4
    
    def encode(self, texts, normalize_embeddings=False):
        """
        Return embeddings for input texts.
        texts: list of strings
        Returns: numpy array of shape (len(texts), embedding_dim)
        """
        embeddings = np.random.randn(len(texts), self.embedding_dim).astype(np.float32)
        
        if normalize_embeddings:
            embeddings = embeddings / (np.linalg.norm(embeddings, axis=1, keepdims=True) + 1e-8)
        
        return embeddings


random.seed(42)
np.random.seed(42)

# Create the mock model
model = MockEmbeddingModel()

# Create pool of slot names
pool = ["location", "person", "organization", "date"]

# Create span text
span_text = "New York"

# Define ARGS
ARGS = {
    "span_text": span_text,
    "pool": pool,
    "model": model
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — 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
convert_domain_kv_to_array Ran
ran; our contract draft was wrong, not the code
grill-lab/taps/src/evaluation/utils.py
code served (permissive licence) · get_code("51c7e6460c5e7bdb")
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 torch
import numpy as np

torch.manual_seed(0)

# Analyze the function:
# - domain: str - used with .lower() and string concatenation
# - key_value_pairs: dict - iterated over with .items(), keys and values are converted to strings and lowercased

ARGS = {
    "domain": "MyDomain",
    "key_value_pairs": {
        "key1": "Value1",
        "key2": 42,
        "key3": True
    }
}
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 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
find_tags Ran
ran; our contract draft was wrong, not the code
grill-lab/taps/src/experiments/tag_corruption.py
code served (permissive licence) · get_code("bfbc9a4355190d6c")
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. 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

ACTION_REGEX = re.compile('\\[IN:([A-Z_]+)', re.DOTALL)
SLOT_REGEX = re.compile('\\[SL:([A-Z_]+)\\s+(.*?)\\]')

def find_tags(text):
    """Return list of (tag_type, span_start, span_end, content)"""
    tags = []
    for m in ACTION_REGEX.finditer(text):
        tags.append(('action', m.start(), m.end(), m.group(1)))
    for m in SLOT_REGEX.finditer(text):
        tags.append(('slot', m.start(), m.end(), (m.group(1), m.group(2).strip())))
    return tags

# Test text with action and slot tags
test_text = "User says [IN:GET_WEATHER [SL:LOCATION New York] today] and [IN:SET_ALARM [SL:TIME 5pm]]"

ARGS = {
    'text': test_text
}
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 — a list 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
get_selection_data Ran
ran; our contract draft was wrong, not the code
grill-lab/taps/src/evaluation/utils.py
code served (permissive licence) · get_code("8d9305c81f31fd67")
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 pandas as pd

ARGS = {
    'data': pd.DataFrame({
        'applicable_standing_instructions': [
            [
                {'nl_instruction': 'turn off lights ', 'instruction_src': 'domain_a'},
                {'nl_instruction': 'lock door', 'instruction_src': 'domain_b'}
            ],
            [
                {'nl_instruction': 'set temperature ', 'instruction_src': 'domain_c'}
            ]
        ],
        'all_standing_instructions': [
            [
                {'nl_instruction': 'turn off lights ', 'instruction_src': 'domain_a'},
                {'nl_instruction': 'open window', 'instruction_src': 'domain_d'},
                {'nl_instruction': 'lock door', 'instruction_src': 'domain_b'}
            ],
            [
                {'nl_instruction': 'set temperature ', 'instruction_src': 'domain_c'},
                {'nl_instruction': 'adjust humidity', 'instruction_src': 'domain_e'}
            ]
        ],
        'example_id': ['ex_001', 'ex_002']
    })
}
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 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
get_targets Ran
ran; our contract draft was wrong, not the code
grill-lab/taps/src/evaluation/utils.py
code served (permissive licence) · get_code("ab4aae7c7ead57d7")
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 Series. 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 pandas as pd
import os
import tempfile
import json

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

# Create a test.jsonl file with sample data
test_data = [
    {
        "api_calls": ["call1", "call2"],
        "applicable_standing_instructions": ["instr1", "instr2"]
    },
    {
        "api_calls": ["call3"],
        "applicable_standing_instructions": ["instr3"]
    }
]

test_jsonl_path = os.path.join(temp_dir, 'test.jsonl')
with open(test_jsonl_path, 'w') as f:
    for item in test_data:
        f.write(json.dumps(item) + '\n')

# Define arguments for the function
ARGS = {
    'targets_dir': temp_dir,
    'return_instructions': False,
    'split': 'test'
}
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 Series — a Series output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Series output the recorded ndim 1 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
match_args Ran
ran; our contract draft was wrong, not the code
grill-lab/taps/src/evaluation/tagger_utils.py
code served (permissive licence) · get_code("3b1be99660cf75c6")
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 torch
import torch.nn as nn

# Analyzing the function match_args:
# - func: str - a string containing tokens separated by spaces
# - skip_to: int (default -1) - an index to skip to
# - debug: bool (default False) - whether to print debug info
#
# The function parses tokens looking for patterns like "[IN:function_name" and "arg_*"
# and "]" to delimit function arguments.
# It recursively calls itself with skip_to parameter.
# No models, tensors, or complex objects are actually used - just string parsing.

# Create a valid function string with the expected token patterns
func_string = "[IN:my_func arg_x arg_y ] [IN:other_func arg_a ]"

ARGS = {
    'func': func_string,
    'skip_to': -1,
    'debug': 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 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
parse2python Ran
ran; our contract draft was wrong, not the code
grill-lab/taps/src/evaluation/tagger_utils.py
code served (permissive licence) · get_code("9fa32a53680fc241")
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 re
import numpy as np

# Analyze the function parse2python to understand what it needs:
# - tagged_input: str - a string with regex patterns like [SL:...] and [IN:...]
# This function processes tagged strings and returns a list of formatted function calls

# Create a valid tagged_input string that the function can parse
tagged_input = '[IN: my_function [SL: ARG_NAME value1] arg_0 [SL: OTHER_ARG value2] arg_1]'

ARGS = {
    'tagged_input': tagged_input
}
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 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

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 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.

FunctionAlso present inEarliest-datedOthers named
convert_domain_kv_to_array 1 other paper
1 dated earlier
2311.09796 (2023-11)
Interpreting User Requests in the Context of Natural Language Standing Instructions

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

Repositories linked to this paper

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

Abstract

Recent advancements in tool-augmented large language models have enabled them to interact with external tools, enhancing their ability to perform complex user tasks. However, existing approaches overlook the role of personalisation in guiding tool use. This work investigates how user preferences can be effectively integrated into goal-oriented dialogue agents. Through extensive analysis, we identify key weaknesses in the ability of LLMs to personalise tool use. To this end, we introduce TAPS, a novel solution that enhances personalised tool use by leveraging a structured tagging tool and an uncertainty-based tool detector. TAPS significantly improves the ability of LLMs to incorporate user preferences, achieving the new state-of-the-art for open source models on the NLSI task 1 . we learn": Towards personalized dialogue without pre-defined profiles through in-dialogue learning. In

For agents

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

get_harvested_code_for_paper("2506.20409")
get_code_for_paper("2506.20409")
have("2506.20409")

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

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

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

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

Connect an agent — have() is free.