cyberandy/sangue-e-grafi-agent-traces
๐ฉธ Sangue e Grafi โ Agent Traces Dataset 100 recorded agent traces showing a KG-grounded agent solving adversarial Italian inheritance-law scenarios. Dataset Description This dataset contains 100 agent trace recordings from the Sangue e Grafi project. Each trace captures a complete reasoning episode: a small (4B) language model navigating a kinship knowledge graph via tool calls to answer adversarial inheritance-law questions in Italian. These tracesโฆ See the full description on the dataset page: https://huggingface.co/datasets/cyberandy/sangue-e-grafi-agent-traces.
๐ฉธ Sangue e Grafi โ Agent Traces Dataset
100 recorded agent traces showing a KG-grounded agent solving adversarial Italian inheritance-law scenarios.
<p align="center"> <img src="https://huggingface.co/spaces/cyberandy/sangue-e-grafi/resolve/main/banner.png" alt="Sangue e Grafi banner" width="700"/> </p>
Dataset Description
This dataset contains 100 agent trace recordings from the Sangue e Grafi project. Each trace captures a complete reasoning episode: a small (4B) language model navigating a kinship knowledge graph via tool calls to answer adversarial inheritance-law questions in Italian.
These traces demonstrate that a small model + KG agent outperforms frontier models (Gemini 2.5 Flash) on complex kinship reasoning โ a key finding of the Hugging Face Build Small Hackathon 2026.
What's in a trace?
Each record contains:
Languages
- Italian ๐ฎ๐น โ names, narratives, and legal scenarios
- English ๐ฌ๐ง โ ontology terms, tool-call schemas, and reasoning
Dataset Structure
Format
JSON Lines (.jsonl) โ one trace per line.
Example
{
"scenario": {
"nodes": ["Marco", "Lucia", "Paolo"],
"edges": [
{"from": "Marco", "to": "Lucia", "relation": "spouse"},
{"from": "Marco", "to": "Paolo", "relation": "parent"}
]
},
"narrative": "Marco e Lucia sono sposati. Paolo รจ il figlio di Marco...",
"question": "Chi eredita i beni di Marco in assenza di testamento?",
"gold_answer": "Lucia (coniuge) e Paolo (figlio) ereditano in parti uguali.",
"agent_trace": [
{"step": 1, "type": "tool_call", "tool": "lookup_relationship", "args": {"subject": "Marco", "predicate": "hasSpouse"}, "result": "Lucia"},
{"step": 2, "type": "tool_call", "tool": "lookup_relationship", "args": {"subject": "Marco", "predicate": "hasChild"}, "result": "Paolo"},
{"step": 3, "type": "reasoning", "content": "Marco has a surviving spouse (Lucia) and one child (Paolo). Under Italian succession law..."}
],
"result": {"answer": "Lucia e Paolo ereditano in parti uguali", "correct": true}
}Intended Uses
- Training data for SFT of small models on KG-grounded reasoning
- Evaluation of tool-use agents on multi-hop kinship queries
- Analysis of agent reasoning patterns and failure modes
- Benchmarking ontology-aware LM agents
Source & Generation
Traces were generated by the Sangue e Grafi agent pipeline:
- Adversarial kinship scenarios generated with controlled graph complexity
- Agent (Gemma 4B SFT+GRPO) solves each scenario using OWL ontology-grounded tool calls
- Each trace is recorded with full tool-call history and reasoning chain
Associated Models
Project Links
Citation
@misc{sangue-e-grafi-2026,
title = {Sangue e Grafi: Small Models Beat Frontier LLMs on Adversarial Kinship Reasoning with Knowledge Graph Agents},
author = {Andrea Volpini},
year = {2026},
url = {https://github.com/cyberandy/sangue-e-grafi},
note = {Hugging Face Build Small Hackathon 2026}
}