SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2304.11406 · 2023

LaMP: When Large Language Models Meet Personalization

arXiv · PDF · Open in the Atlas

Code that ran

12 of 13 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 11 have no contract verdict; 1 failure of our instrument; 1 no recorded run), measured 2026-11-23; 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/2304.11406.json · badge: /api/ran/2304.11406.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
Bingo-W/Personalisation-in-LLM community (classifier label)
classifier basis not recorded on the link
11 ran · 1 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 0 no recorded run
FunctionStatusWhere it lives
add_double_quote Ran
ran on a synthesized input
Bingo-W/Personalisation-in-LLM/data_process/lamp_prompt.py
code served (permissive licence) · get_code("b853890170bdd63b")
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

def add_double_quote(text):
    return '"' + text + '"'

ARGS = {
    "text": "hello world"
}
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
bm25_for_LaMP_2 Ran
ran on a synthesized input
Bingo-W/Personalisation-in-LLM/retrival_models/bm25.py
code served (permissive licence) · get_code("ea15f50f0290cb27")
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 numpy as np
from collections import OrderedDict, Counter

# Construct valid arguments for bm25_for_LaMP_2

# Create a minimal task_input string with description
task_input = "Some context description: machine learning is great"

# Create a profile list with dictionaries containing 'description' and 'tag' fields
profile = [
    {
        'description': 'machine learning algorithms for data science',
        'tag': 'ML data science'
    },
    {
        'description': 'deep learning neural networks',
        'tag': 'deep learning AI'
    },
    {
        'description': 'natural language processing text analysis',
        'tag': 'NLP text'
    },
    {
        'description': 'computer vision image recognition',
        'tag': 'vision images'
    },
]

# Set other parameters
retrieve_num = 2
retrieval_ablation = 'both'  # can be 'both' or 'decouple'
target_index = 0

# Create ARGS dictionary
ARGS = {
    'task_input': task_input,
    'profile': profile,
    'retrieve_num': retrieve_num,
    'retrieval_ablation': retrieval_ablation,
    'target_index': target_index
}
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
bm25_for_LaMP_2_old Ran
ran on a synthesized input
Bingo-W/Personalisation-in-LLM/retrival_models/bm25.py
code served (permissive licence) · get_code("e8b485a887f3a97c")
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 numpy as np
from collections import OrderedDict, Counter

# Set seed for reproducibility
np.random.seed(0)

# Create minimal profile data structure
profile = [
    {
        'text': 'machine learning is fascinating and powerful',
        'title': 'AI Article One',
        'category': 'technology science'
    },
    {
        'text': 'deep neural networks improve performance',
        'title': 'Neural Nets',
        'category': 'machine learning'
    },
    {
        'text': 'computer vision applications expand rapidly',
        'title': 'Vision Systems',
        'category': 'computer science'
    },
    {
        'text': 'natural language processing advances',
        'title': 'NLP Progress',
        'category': 'artificial intelligence'
    }
]

# Create task_input with an article to match
task_input = "article: machine learning is fascinating and powerful"

ARGS = {
    'task_input': task_input,
    'profile': profile,
    'retrieve_num': 2,
    'retrieval_ablation': 'both',
    'target_index': 0
}
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
build_random_fn Ran
ran on a synthesized input
Bingo-W/Personalisation-in-LLM/retrival_models/random_selection.py
code served (permissive licence) · get_code("24c2f3f44b2eb90f")
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 function. 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

# Analyze the function:
# - build_random_fn takes config dict as parameter
# - config needs 'random_seed' key (used in random.seed())
# - The returned function random_in_user takes task_input, profile, retrieve_num
# - profile is used with len() and random.sample()
# - retrieve_num is converted to int

# Create a minimal config dict
config = {
    'random_seed': 42
}

ARGS = {
    'config': config
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
construct_for_llama2 Ran
ran on a synthesized input
Bingo-W/Personalisation-in-LLM/data_process/utils.py
code served (permissive licence) · get_code("e0c399c2fee303db")
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.

from collections import OrderedDict

# Test case 1: LaMP_2 task (has anchor)
original_input_1 = "Some context here article: This is the article content"
task_name_1 = "LaMP_2"

# Test case 2: LaMP_1 task (no anchor, None)
original_input_2 = "Some input text without anchor"
task_name_2 = "LaMP_1"

# Test case 3: LaMP_3 task (has anchor)
original_input_3 = "Some context review: This is a review"
task_name_3 = "LaMP_3"

ARGS = {
    "original_input": original_input_1,
    "task_name": task_name_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 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
contact Ran
ran on a synthesized input
Bingo-W/Personalisation-in-LLM/data_process/lamp_prompt.py
code served (permissive licence) · get_code("3904f6728f0da676")
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

torch.manual_seed(0)

# The function takes profile_entries (iterable of strings) and join_words (string)
# It joins the entries with the join_words separator
# We need to provide an iterable of items that can be converted to strings

profile_entries = ["Alice", "Bob", "Charlie"]
join_words = ', and '

ARGS = {
    'profile_entries': profile_entries,
    'join_words': join_words,
}
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
extract_quote Ran
ran on a synthesized input
Bingo-W/Personalisation-in-LLM/retrival_models/utils.py
code served (permissive licence) · get_code("4d32a60c24f98603")
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

def extract_quote(sentence):
    """
    Find all the part with the double quote
    : param sentence: the input sentence
    : return : the list of the match part
    """
    pattern = '"([^"]*)"'
    matches = re.findall(pattern, sentence)
    return matches

ARGS = {
    "sentence": 'Hello "world" and "python" are great'
}
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 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
list_merge Ran
ran on a synthesized input
Bingo-W/Personalisation-in-LLM/data_process/utils.py
code served (permissive licence) · get_code("6e3557815a51535b")
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 int; 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

torch.manual_seed(0)

# The function list_merge takes a list of lists and merges them into a single list
# It iterates through each sublist and extends the result with elements from each sublist
# We need to provide a list of lists as the argument

# Create several small lists with different types of elements
list1 = [1, 2, 3]
list2 = [4, 5]
list3 = [6, 7, 8, 9]

list_of_list = [list1, list2, list3]

ARGS = {
    "list_of_list": list_of_list
}
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 list, ndim 1, dtype family int — 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
mean_pooling Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from chenyiqun/MMOA-RAG
pointer only; the stored copy get_code serves, from chenyiqun/MMOA-RAG, is pointer only (licence: NONE) · get_code("fe0e2df4d9cb5edd")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

merge_user_profile Ran
ran on a synthesized input
Bingo-W/Personalisation-in-LLM/data_process/utils.py
code served (permissive licence) · get_code("0d2320ebef045b45")
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.

from collections import OrderedDict

# Construct profile items - each is a list of dicts with various keys
# The function zips two profile lists and merges them based on output_index

# Create profile_list_a: a list of items, each item is a list of profile dicts
profile_list_a = [
    [
        {'LaMP_1': 'value1', 'tag': 'tag_a1', 'score': 5, 'title': 'title_a1', 'text': 'text_a1'},
        {'LaMP_1': 'value2', 'tag': 'tag_a2', 'score': 4, 'title': 'title_a2', 'text': 'text_a2'},
    ],
    [
        {'LaMP_1': 'value3', 'tag': 'tag_a3', 'score': 3, 'title': 'title_a3', 'text': 'text_a3'},
        {'LaMP_1': 'value4', 'tag': 'tag_a4', 'score': 2, 'title': 'title_a4', 'text': 'text_a4'},
    ],
]

# Create profile_list_b: similar structure with different values to merge
profile_list_b = [
    [
        {'LaMP_1': 'value1_b', 'tag': 'tag_b1', 'score': 9, 'title': 'title_b1', 'text': 'text_b1'},
        {'LaMP_1': 'value2_b', 'tag': 'tag_b2', 'score': 8, 'title': 'title_b2', 'text': 'text_b2'},
    ],
    [
        {'LaMP_1': 'value3_b', 'tag': 'tag_b3', 'score': 7, 'title': 'title_b3', 'text': 'text_b3'},
        {'LaMP_1': 'value4_b', 'tag': 'tag_b4', 'score': 6, 'title': 'title_b4', 'text': 'text_b4'},
    ],
]

# Choose a task_name that has a valid output_index
task_name = 'LaMP_2'

ARGS = {
    'profile_list_a': profile_list_a,
    'profile_list_b': profile_list_b,
    'task_name': task_name,
}
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
random_in_user Ran
ran on a synthesized input
Bingo-W/Personalisation-in-LLM/retrival_models/random_selection.py
code served (permissive licence) · get_code("a92fdabe69c67804")
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 random
import torch

torch.manual_seed(0)

# Analyze the function:
# - task_input: passed but not used in the function body
# - profile: must support len() and random.sample(), so a list or similar sequence
# - retrieve_num: converted to int, used for comparison and random.sample()

# task_input can be anything since it's not used
task_input = "some_task_input"

# profile should be a list of items that can be sampled
profile = ["item_1", "item_2", "item_3", "item_4", "item_5"]

# retrieve_num should be an int (or convertible to int)
retrieve_num = 2

ARGS = {
    "task_input": task_input,
    "profile": profile,
    "retrieve_num": retrieve_num,
}
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 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
reorder_list_middle Ran
ran on a synthesized input
Bingo-W/Personalisation-in-LLM/data_process/lamp_prompt.py
code served (permissive licence) · get_code("e26359c5ce67f9d1")
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 int; 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

torch.manual_seed(0)

# Analyze the function: it takes original_list as parameter
# The function operates on a list, accessing elements by index
# It doesn't require any special objects, just a list

# Create a simple list to test the function
original_list = [10, 20, 30, 40, 50, 60, 70, 80]

ARGS = {
    "original_list": original_list
}
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 list, ndim 1, dtype family int — 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
bm25_for_LaMP_1 Not yet run
unverified (harvested, no recorded run)
Bingo-W/Personalisation-in-LLM/retrival_models/bm25.py
code served (permissive licence) · get_code("23f0b1f0e49789e5")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 1 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 12 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
mean_pooling 15 other papers
15 later
2305.18395 (2023-05)
Knowledge-Augmented Reasoning Distillation for Small Language Models in Knowledge-Intensive Tasks
2308.04275 (2023-08)
In-Context Alignment: Chat with Vanilla Language Models Before Fine-Tuning
2310.04408 (2023-10)
RECOMP: Improving Retrieval-Augmented LMs with Compression and Selective Augmentation
and 12 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-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

This paper highlights the importance of personalization in large language models and introduces the LaMP benchmark -- a novel benchmark for training and evaluating language models for producing personalized outputs. LaMP offers a comprehensive evaluation framework with diverse language tasks and multiple entries for each user profile. It consists of seven personalized tasks, spanning three text classification and four text generation tasks. We additionally propose two retrieval augmentation approaches that retrieve personal items from each user profile for personalizing language model outputs. To this aim, we study various retrieval models, including term matching, semantic matching, and time-aware methods. Extensive experiments on LaMP for zero-shot and fine-tuned language models demonstrate the efficacy of the proposed retrieval augmentation approach and highlight the impact of personalization in various natural language tasks.

For agents

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

get_harvested_code_for_paper("2304.11406")
get_code_for_paper("2304.11406")
have("2304.11406")

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

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

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

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

Connect an agent — have() is free.