--- title: GDPR Cases Demo emoji: 🏛️ colorFrom: blue colorTo: green sdk: docker app_file: app.py pinned: false --- # GDPR Cases - Interactive Demo An interactive Streamlit application for exploring GDPR formalization cases and understanding step-by-step rule evaluation using the Pythen framework. ## Features - **Dataset Browsing**: Browse all 60 verified GDPR cases from the dataset - **Sample Selection**: Choose any sample by article and ID - **Scenario Viewing**: Read the complete legal scenario for each case - **Facts Display**: View extracted atomic facts used in evaluation - **Rule Tree Visualization**: Inspect the formal rule tree in JSON format - **Quality Metrics**: See evaluation scores from multiple verifiers - **Step-by-Step Evaluation**: Understand how Pythen evaluates rules - **Ground Truth**: View the expected legal outcome for each case ## Dataset This demo uses the **GDPR Cases** dataset (`nguyenthanhasia/gdpr-cases`): - **60 verified samples** of GDPR formalization cases - **11 columns** including scenario, rule tree, facts, and evaluation scores - **High quality**: All samples verified by legal experts ## How It Works ### Rule Evaluation Process 1. **Parse Rule Tree**: Hierarchical structure of conditions and predicates 2. **Extract Facts**: Atomic facts from the legal scenario 3. **Traverse Tree**: Evaluate from root through all nodes 4. **Apply Operators**: - `ANY`: At least one condition must be true - `ALL`: All conditions must be true 5. **Derive Label**: Final boolean result (TRUE/FALSE) ### Pythen Framework Pythen is a formal representation framework for legal rules that: - Separates conditions from exceptions - Uses logical operators (ANY, ALL) for composition - Enables automated evaluation of legal provisions - Supports complex nested rule structures ## Citation If you use this demo or dataset, please cite: ```bibtex @article{nguyen2026gdpr, title={GDPR Auto-Formalization with AI Agents and Human Verification}, author={Nguyen, Ha Thanh and Fungwacharakorn, Wachara and Wehnert, Sabine and Zin, May Myo and Kong, Yuntao and Xue, Jieying and Araszkiewicz, Michał and Goebel, Randy and Satoh, Ken}, journal={arXiv preprint arXiv:2604.14607}, year={2026} } ``` ## Related Resources - [Dataset on Hugging Face](https://huggingface.co/datasets/nguyenthanhasia/gdpr-cases) - [Paper on arXiv](https://arxiv.org/abs/2604.14607)