CoolFace
Datasetpublic

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.

sourceHugging Faceapache-2.0updated 3mo agoView on Hugging Face
0likes22downloads
Dataset Card

๐Ÿฉธ 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:

FieldDescription
scenarioThe kinship graph structure (nodes & edges)
narrativeItalian-language description of the family situation
questionThe inheritance-law question to answer
gold_answerThe correct answer
agent_traceFull sequence of tool calls + LM reasoning steps
resultFinal agent answer and correctness

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

json
{
  "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:

  1. 1.Adversarial kinship scenarios generated with controlled graph complexity
  2. 2.Agent (Gemma 4B SFT+GRPO) solves each scenario using OWL ontology-grounded tool calls
  3. 3.Each trace is recorded with full tool-call history and reasoning chain

Associated Models

ModelDescription
Gemma 4B SFTSFT adapter trained on teacher traces
Gemma 4B GRPOGRPO adapter (RL stage)
Nemotron 4B SFTCross-architecture SFT baseline
Nemotron 4B GRPOCross-architecture GRPO
GGUF (quantized)Ready-to-run quantized model

Project Links

ResourceLink
๐Ÿš€ Live DemoHF Space
๐Ÿ“ฆ GitHubcyberandy/sangue-e-grafi
๐Ÿ“„ PaperRLM-on-KG (arXiv:2604.17056)

Citation

bibtex
@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}
}