SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2406.05925 · 2024

Hello Again! LLM-powered Personalized Agent for Long-term Dialogue

arXiv · PDF · Open in the Atlas

Code that ran

5 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 4 failures of our instrument; 1 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/2406.05925.json · badge: /api/ran/2406.05925.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
leolee99/ld-agent canonical (classifier label)
classifier basis: census
5 ran · 1 no recorded run
FunctionStatusWhere it lives
calculate_dist_n Ran
ran, honoured the contract we drafted
leolee99/ld-agent/DataLoader/QuickEval.py
code served (permissive licence) · get_code("f385d6a7e27d464a")
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.

from nltk.util import ngrams

# Setup for calculate_dist_n function
# The function takes:
# - text: a string that will be split by whitespace
# - n: an integer specifying the n-gram size

# Create simple test arguments
text = "the quick brown fox jumps over the lazy dog the quick brown fox"
n = 2

ARGS = {
    "text": text,
    "n": n
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
nltk — 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
convert_seconds_to_full_time Ran
ran; our contract draft was wrong, not the code
leolee99/ld-agent/DataLoader/MSC.py
code served (permissive licence) · get_code("f80c6d5faeb44312")
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
import numpy as np

# The function convert_seconds_to_full_time takes a single parameter 'seconds'
# which should be a numeric value (int or float) representing time in seconds
# The function uses divmod on it, so it needs to be a number

ARGS = {
    'seconds': 3661  # 1 hour, 1 minute, 1 second as test 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 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_args Ran
ran; our contract draft was wrong, not the code
leolee99/ld-agent/config.py
code served (permissive licence) · get_code("1c44d93b78689fbc")
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 Namespace. 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 argparse
import sys
from io import StringIO

def get_args(description='Config of LD-Agent'):
    parser = argparse.ArgumentParser(description=description)
    parser.add_argument('--dataset', choices=['human', 'msc', 'cc', 'quickeval'], default='msc', help='Dataset which will be acted.')
    parser.add_argument('--data_path', type=str, default='dataset', help='Dataset path.')
    parser.add_argument('--data_name', type=str, default='sequential.json', help='Dataset path.')
    parser.add_argument('--id_set', type=str, default='id_set.json', help='Split of sessions and samples.')
    parser.add_argument('--memory_cache', nargs='?', default=None, help='Whether to use stored memories.')
    parser.add_argument('--relevance_memory_number', type=int, default=1, help='The number of retrieved relevance memory.')
    parser.add_argument('--context_memory_number', type=int, default=30, help='The max number of retrieved context memory.')
    parser.add_argument('--dist_thres', type=float, default=1.5, help='The distance threshold of relevance retrieval.')
    parser.add_argument('--ori_mem_query', type=bool, default=False, help='Whether to use original query.')
    parser.add_argument('--max_agent_personas', type=int, default=0, help='Select the latest N user personas.')
    parser.add_argument('--max_user_personas', type=int, default=0, help='Select the latest N user personas.')
    parser.add_argument('--client', choices=['chatgpt', 'chatglm'], default='chatglm', help='Client to use.')
    parser.add_argument('--model', type=str, default='gpt-3.5-turbo-1106', help='The model name: gpt-3.5-turbo-1106 for ChatGPT, THUDM/chatglm3-6b for ChatGLM.')
    parser.add_argument('--summary_model', type=str, default='default', help='The model for event summary.')
    parser.add_argument('--persona_model', type=str, default='default', help='The model for persona extraction.')
    parser.add_argument('--generation_model', type=str, default='default', help='The model for response generation.')
    parser.add_argument('--api_key', type=str, default='Your API Key', help='OpenAI API Key.')
    parser.add_argument('--max_input_length', type=int, default=2048, help='The number of maximum size of LLM input.')
    parser.add_argument('--max_output_length', type=int, default=64, help='The number of maximum size of LLM output.')
    parser.add_argument('--sampling', action='store_true', default=False, help='Whether to sample data.')
    parser.add_argument('--sampling_step', type=int, default=10, help='The number of sampling frequency.')
    parser.add_argument('--sampling_path', type=str, default='logs/sampling', help='The directory path of sampling')
    parser.add_argument('--sampling_file_name', type=str, default='train.json', help='The name of sampling')
    parser.add_argument('--usr_name', type=str, default='User', help='The name of user.')
    parser.add_argument('--agent_name', type=str, default='Agent', help='The name of agent')
    parser.add_argument('--log_step', type=int, default=10, help='The number of report frequency.')
    parser.add_argument('--generation_out', type=bool, default=False, help='Whether to output generated messages.')
    parser.add_argument('--test_num', type=int, default=0, help='The number of test samples, 0 indicates testing all samples.')
    parser.add_argument('--gpus', type=str, default='0', help='The gpus will be used.')
    parser.add_argument('--build_times', type=int, default=1, help='The times of building response.')
    parser.add_argument('--min_session', type=int, default=1, help='Indicating the session range.')
    parser.add_argument('--max_session', type=int, default=5, help='Indicating the session range.')
    args = parser.parse_args()
    return args

ARGS = {
    'description': 'Config of LD-Agent'
}
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 Namespace — a Namespace output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Namespace 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
process_batch Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
leolee99/ld-agent/Trainer/lora_tune.py
code served (permissive licence) · get_code("31316bb1bf2a96b2")
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 torch
from collections.abc import Mapping, Sequence

torch.manual_seed(0)

class MockTokenizer:
    def __init__(self):
        self.eos_token_id = 2
        self._command_tokens = {
            '[gMASK]': 50256,
            'sop': 50257,
        }
    
    def get_command(self, cmd: str) -> int:
        return self._command_tokens[cmd]
    
    def build_single_message(self, role: str, prefix: str, content: str) -> list:
        # Return a small list of token ids
        return [100, 101, 102]


# Create test batch
batch = {
    'conversations': [
        [
            {'role': 'system', 'content': 'You are helpful'},
            {'role': 'user', 'content': 'Hello'},
            {'role': 'assistant', 'content': 'Hi there'},
        ],
        [
            {'role': 'user', 'content': 'How are you'},
            {'role': 'assistant', 'content': 'I am good'},
        ],
    ],
    'tools': None,
}

tokenizer = MockTokenizer()
max_input_length = 32
max_output_length = 16

ARGS = {
    'batch': batch,
    'tokenizer': tokenizer,
    'max_input_length': max_input_length,
    'max_output_length': max_output_length,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — 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
process_batch_eval Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
leolee99/ld-agent/Trainer/lora_tune.py
code served (permissive licence) · get_code("5abe708b88a719ff")
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 torch
from collections.abc import Mapping, Sequence

torch.manual_seed(0)

class StandInTokenizer:
    def __init__(self):
        self.eos_token_id = 2
        self._gMASK_id = 150000
        self._sop_id = 150001
    
    def get_command(self, cmd_name):
        if cmd_name == '[gMASK]':
            return self._gMASK_id
        elif cmd_name == 'sop':
            return self._sop_id
        return 0
    
    def build_single_message(self, role, meta, content):
        # Return a simple list of token ids
        # For user messages, return shorter list; for assistant, longer
        if role == 'assistant':
            return [100, 101, 102, 103]
        else:
            return [200, 201]

# Create a minimal batch
batch = {
    'conversations': [
        [
            {'role': 'user', 'content': 'Hello'},
            {'role': 'assistant', 'content': 'Hi there'}
        ],
        [
            {'role': 'user', 'content': 'How are you?'},
            {'role': 'assistant', 'content': 'I am well'}
        ]
    ]
}

tokenizer = StandInTokenizer()

ARGS = {
    'batch': batch,
    'tokenizer': tokenizer,
    'max_input_length': 50,
    'max_output_length': 30
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — 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
load_tokenizer_and_model Not yet run
unverified (harvested, no recorded run)
leolee99/ld-agent/Trainer/lora_tune.py
code served (permissive licence) · get_code("632dd3e505d6e594")
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, 6 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 3 the same month, 6 later) and 0 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
load_tokenizer_and_model 3 other papers
1 dated earlier, 1 the same month, 1 later
2210.02414 (2022-10)
GLM-130B: An Open Bilingual Pre-trained Model
2406.12793 (2024-06)
ChatGLM: A Family of Large Language Models from GLM-130B to GLM-4 All Tools
2025.naacl-long.272 (2025 (year only))
Hello Again! LLM-powered Personalized Agent for Long-term Dialogue
process_batch 2 other papers
1 the same month, 1 later
2406.12793 (2024-06)
ChatGLM: A Family of Large Language Models from GLM-130B to GLM-4 All Tools
2025.naacl-long.272 (2025 (year only))
Hello Again! LLM-powered Personalized Agent for Long-term Dialogue
process_batch_eval 2 other papers
1 the same month, 1 later
2406.12793 (2024-06)
ChatGLM: A Family of Large Language Models from GLM-130B to GLM-4 All Tools
2025.naacl-long.272 (2025 (year only))
Hello Again! LLM-powered Personalized Agent for Long-term Dialogue
calculate_dist_n 1 other paper
1 later
2025.naacl-long.272 (2025 (year only))
Hello Again! LLM-powered Personalized Agent for Long-term Dialogue
convert_seconds_to_full_time 1 other paper
1 later
2025.naacl-long.272 (2025 (year only))
Hello Again! LLM-powered Personalized Agent for Long-term Dialogue
get_args 1 other paper
1 later
2025.naacl-long.272 (2025 (year only))
Hello Again! LLM-powered Personalized Agent for Long-term Dialogue

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

Open-domain dialogue systems have seen remarkable advancements with the development of large language models (LLMs). Nonetheless, most existing dialogue systems predominantly focus on brief single-session interactions, neglecting the real-world demands for long-term companionship and personalized interactions with chatbots. Crucial to addressing this real-world need are event summary and persona management, which enable reasoning for appropriate long-term dialogue responses. Recent progress in the human-like cognitive and reasoning capabilities of LLMs suggests that LLM-based agents could significantly enhance automated perception, decision-making, and problem-solving. In response to this potential, we introduce a model-agnostic framework, the Long-term Dialogue Agent (LD-Agent), which incorporates three independently tunable modules dedicated to event perception, persona extraction, and response generation. For the event memory module, long and short-term memory banks are employed to separately focus on historical and ongoing sessions, while a topic-based retrieval mechanism is introduced to enhance the accuracy of memory retrieval. Furthermore, the persona module conducts dynamic persona modeling for both users and agents. The integration of retrieved memories and extracted personas is subsequently fed into the generator to induce appropriate responses. The effectiveness, generality, and cross-domain capabilities of LD-Agent are empirically demonstrated across various illustrative benchmarks, models, and tasks. The code is released at https://github.com/leolee99/LD-Agent.

For agents

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

get_harvested_code_for_paper("2406.05925")
get_code_for_paper("2406.05925")
have("2406.05925")

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

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

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

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

Connect an agent — have() is free.