Mem-PAL
November 26, 2025 ยท View on GitHub
The data and code of the paper "Mem-PAL: Towards Memory-based Personalized Dialogue Assistants for Long-term User-Agent Interaction" (AAAI 2026 Oral).
The Appendix of this paper is present in here.
PAL-Set Synthesis
Dataset (ZH & EN)
ZH version (Original)
The Chinese version of PAL-Set can be found in the ./data_synthesis_v2/data/input.json file. The dataset consists of a total of 100 users' dicts, with the keys being user ids. Each user dict contains two parts: history and query, which represent the history set and query set, respectively. Each set contains multiple samples, where:
sample_id: The id number of each sample.dialogue_timestamp: The timestamp when the current sample dialogue occurred.logs: A list containing all logs under the current sample, including the log timestampstimestampand log contentscontent. The list is ordered chronologically by the log timestamps, and all log timestamps occur earlier than the timestamp of the current dialogue.dialogue: The multi-turn dialogue corresponding to the current sample. Each turn of the dialogue includes one user utterance and one assistant reply. Each user or assistant utterance contains the dialogue actionactionand the utterance contentcontent.topics: The dialogue framework corresponding to each dialogue, which may include 1~3 topics. Each topic in the query set can serve as an evaluation sample for single-turn QA tasks (Requirement Restatement or Solution Proposal). The content of each topic includes:user_query: The initial vague user query of the topic.implicit_needs: A list containing 2 entries that are not explicitly mentioned in the user query but are intended to be inferred by the assistant.requirement: A detailed requirement description combined the user query and implicit needs in a sentence.solution: Contains two solutions that best align with the user's preferences (pos) and two solutions that least align with the user's preferences (neg).candidate_solutions: All 8 candidate solutions, each labeled with the user's feedback type.
In addition, each user's background, trait, and situations are also provided in the ./data_synthesis_v2/data directory.
EN version (Translated by LLM)
We also construct an English version of PAL-Set to facilitate use by non-Chinese speakers. We use the Deepseek-V3 to directly translate the original Chinese data, and the resulting English set can be found in the ./data_synthesis_v2/data_en directory. Note that for the English-translated version, we have not conducted a thorough manual review of certain details, such as the accuracy of field names in the JSON files or the fidelity of specific content translations. Therefore, we cannot guarantee that the English version is completely free of translation errors or inaccuracies.
Data Synthesis Pipeline
The code for the data synthesis process can be found in the ./data_synthesis_v2/code directory, where:
- 1) Background:
background.py - 2) Global Persona:
global_persona.py - 3) Situation & 4) Experience:
situation.py - 5) Dialogue Framework:
dialogue_framework.py - 6) Logs & Dialogues:
log.py&dialogue.py
Examples and templates of prompts for each step can be found in the ./data_synthesis_v2/prompt_template directory.
H2Memory Framework & Evaluation
The codes for constructing the H2Memory and performing each task using that memory on our PAL-Bench can be found in ./perassist_framework/code/memory_rag_v2/, while the corresponding prompts can be found in ./perassist_framework/prompt_template/memory_rag_v2/.
H2Memory Framework
- 1) Log Graph:
log_analysis.py - 2) Background:
background_summary.py - 3) Topic Outline:
dialogue_analysis.py - 4) Principle:
pinciple_extraction.py
Evaluation
Requirement Restatement
- code:
requirement_prediction_mamory_rag_v2.py - GPT-4 Evaluation Prompt:
./perassist_framework/code/evaluation/requirement_prediction_evaluation_prompt
Solution Proposal
Solution Generation:
- code:
solution_qa_mamory_rag_v2.py
Solution Selection:
- code:
solution_selection_mamory_rag_v2.py
Multi-turn Dialogue Interaction
- code:
dialogue_interaction_memory_rag_v2.py - The prompt of User-LLM and Evaluation-LLM of this task can be found in
./perassist_framework/code/dialogue_evaluation