PerQA / README.md
pchristm's picture
Update README.md
ee5b518 verified
|
Raw
History Blame Contribute Delete
6.31 kB
---
license: cc-by-4.0
task_categories:
- question-answering
language:
- en
tags:
- personal-data
- temporal-reasoning
- synthetic
size_categories:
- 10K<n<100K
configs:
- config_name: questions
data_files:
- split: train
path: questions/train.parquet
- split: validation
path: questions/validation.parquet
- split: test
path: questions/test.parquet
- config_name: personas
data_files:
- split: train
path: personas/data.parquet
- config_name: canonicalized_events
data_files:
- split: train
path: canonicalized_events/train.parquet
- split: validation
path: canonicalized_events/validation.parquet
- split: test
path: canonicalized_events/test.parquet
- config_name: observable_events
data_files:
- split: train
path: observable_events/train.parquet
- split: validation
path: observable_events/validation.parquet
- split: test
path: observable_events/test.parquet
pretty_name: PerQA
---
# PerQA
PerQA is a benchmark for question answering (QA) over personal data, which appears in heterogeneous form.
Each **persona** has demographic profile data, a canonicalized event log (structured events loadable via DBs), a corresponding **observable event** log (verbalized and thus realistic events, in natural surface forms), and natural-language questions answerable with SQL over those events.
Observable events stem from different source types: social media posts, calendar data, mails, workout history, streaming behavior (movies, tv series, music), and online purchases.
The QA system has to tap into those different personal data sources for answering questions that involve complexities such as joins, grouping, or temporal filters.
Please find further information, a demo and code for our ReQAP QA system on our project webpage: [https://reqap.mpi-inf.mpg.de](https://reqap.mpi-inf.mpg.de).
## Splits
The data is split at the persona and question level (personas and questions are unique within splits):
| Split | Personas | Questions (approx.) |
|-------|----------|---------------------|
| train | 12 | 14,300 |
| validation | 2 | 275 |
| test | 6 | 3,000 |
## Dataset configs
The dataset consists of four parts:
| Name | Description |
|--------|-------------|
| `questions` | NL questions with SQL queries and gold answers |
| `personas` | One row per persona; `profile` is a JSON string of the full profile object |
| `canonicalized_events` | Canonicalized events (for deriving the ground-truth) |
| `observable_events` | Derived observable events (realistic events in natural surface forms), linked via `canonicalized_event_id` |
## Loading
```python
from datasets import load_dataset
questions = load_dataset("pchristm/PerQA", "questions")
personas = load_dataset("pchristm/PerQA", "personas")
canonicalized = load_dataset("pchristm/PerQA", "canonicalized_events", split="train")
observable = load_dataset("pchristm/PerQA", "observable_events", split="test")
```
Filter events or questions for one persona:
```python
pid = "train_persona_0"
q = questions["train"].filter(lambda row: row["persona_id"] == pid)
events = canonicalized.filter(lambda row: row["persona_id"] == pid)
persona = json.loads(personas.filter(lambda row: row["persona_id"] == pid)[0]["profile"])
```
JSON columns (`answers`, `profile`, `event_data`, `properties_mentioned`) are stored as JSON strings in Parquet for schema stability. Parse them after loading:
```python
import json
row = questions["train"][0]
answers = json.loads(row["answers"]) if row["answers"] else None
```
## Questions schema
| Field | Type | Description |
|-------|------|-------------|
| `id` | string | Unique id, e.g. `train_persona_0-question_0` |
| `q_id` | int | Index within persona |
| `persona_id` | string | Split-local persona id |
| `original_persona` | string | Source pool id, e.g. `persona_22` |
| `split` | string | `train`, `validation`, or `test` |
| `question` | string | First-person natural-language question |
| `sql_query` | string | PostgreSQL query over event tables |
| `answers` | string (JSON) | Gold answer(s) as JSON array, or null; parse with `json.loads` |
| `reference_date` | string | Fixed eval date for `CURRENT_DATE` in SQL (`2024-11-25`) |
## Events schema
**Canonicalized events** (`canonicalized_events`):
| Field | Description |
|-------|-------------|
| `id` | Event id |
| `start_date`, `start_time`, `end_date`, `end_time` | Timestamps |
| `event_type` | e.g. `music_stream`, `meet_up`, `trip` |
| `event_data` | Parsed JSON payload (stored as JSON string in Parquet) |
| `persona_id`, `split` | Persona and split |
**Observable events** (`observable_events`): same columns plus `canonicalized_event_id` (links to canonicalized `id`) and `properties_mentioned` (list of canonicalized fields surfaced in this observation).
Canonicalized event types include `music_stream`, `movie_stream`, `meet_up`, `workout`, `online_purchase`, `tvseries_stream`, `trip`, `trip_highlight`, `annual_celebration`, `annual_doctor_appointment`, `oneoff_event`.
Observable types add derived channels such as `calendar`, `mail`, and `social_media`.
## Deriving ground-truth answers
SQL queries use PostgreSQL syntax and `CURRENT_DATE`. For reproducible evaluation, treat `reference_date` (`2024-11-25`) as the current date when executing queries.
Those SQL queries can be utilized to derive ground-truth answers based on the canonicalized events.
The canonicalized events should not be used during inference.
## Related Papers
```bibtex
@inproceedings{christmann2026perqa,
title = {PerQA: A Benchmark for Temporally Sensitive Questions on Heterogeneous Personal Data},
author = {Christmann, Philipp and Weikum, Gerhard},
booktitle = {Companion Proceedings of the ACM Web Conference 2026},
url = {https://dl.acm.org/doi/abs/10.1145/3774905.3795448},
pages = {1100--1106},
year = {2026}
}
@inproceedings{christmann2025recursive,
title = {Recursive Question Understanding for Complex Question Answering over Heterogeneous Personal Data},
author = {Christmann, Philipp and Weikum, Gerhard},
booktitle = {Findings of the Association for Computational Linguistics: ACL 2025},
url = {https://aclanthology.org/2025.findings-acl.939/},
pages = {18269--18288},
year = {2025}
}
```