DKGI: STaRK Knowledge Graphs as Files
The three text-rich knowledge graphs of STaRK (Amazon, MAG, Prime) exported to plain node and edge files, as used in the paper Knowledge Graphs as Files: An Agent Harness Where Tool Creation and Tool Use Co-Evolve (Yuyang Bai, Yu Wang, Yu Zhang).
- Code: https://github.com/leopoldwhite/DKGI
- Project page: https://yuyangbai.com/dkgi/
- Collection (graphs and trajectories): https://huggingface.co/collections/yuyangbai/dkgi
In DKGI (direct knowledge graph interaction), an LLM agent works directly on these files. It writes its own Python programs over them to follow relations, combine node sets and select textual evidence, and it uses no predefined graph API or retriever.
Contents
| Dataset | Nodes | Candidate nodes | Node types | Relation types | Stored edge rows |
|---|---|---|---|---|---|
| Amazon | 1,035,542 | 957,192 | 4 | 5 | 5,382,103 |
| MAG | 1,872,968 | 700,244 | 4 | 4 | 19,919,698 |
| Prime | 129,375 | 129,375 | 10 | 18 | 8,100,498 |
corpus/<dataset>/ what the agent reads
nodes/NNNN.jsonl one node per line: node_id, node_type, is_candidate and all attributes;
shard NNNN = node_id // 10000
edges/RR.tsv one file per relation type RR, columns source_id and target_id (with a header)
schema.json node types, relation types, counts
DATA_FORMAT.txt the short description of the files that the agent is given
candidate_ids.txt the node IDs that are valid answers
public/<dataset>/<split>.jsonl questions without labels (query_id, query, corpus_dir)
private/<dataset>/<split>.jsonl labels (query_id, answer_ids)
prepared/<dataset>.json export manifest (STaRK revision, schema, question counts)
Splits: train, val, test, test-0.1 (STaRK's official 10% test subset) and human_generated_eval.
The paper reports results on test (7,108 questions) and test-0.1 (710 questions).
Keep private/ out of the agent's reach when you run an agent on corpus/. In our runs, every agent process ran
in a Landlock sandbox that could read only the graph files.
How the files were made
The files were exported by experiments/stark/prepare.py of the code release from the STaRK data release at revision
88269e23e90587f99476c5dd74e235a0877e69be. The export makes no model calls. It keeps all nodes, including evidence
nodes outside the candidate set, with all their attributes, every stored edge row and the type labels.
Non-finite numbers become null. In public/, corpus_dir is the relative path corpus/<dataset>.
prepare.py writes the absolute path of the local export instead.
Use with the code
git clone https://github.com/leopoldwhite/DKGI && cd DKGI
hf download yuyangbai/DKGI-STaRK-Graphs --repo-type dataset --local-dir experiments/stark \
--include "corpus/*" "public/*" "private/*" "prepared/*"
python3 experiments/stark/use_downloaded_graphs.py # sets corpus_dir to the absolute path of this checkout
License
CC BY 4.0, following the license of the STaRK data. If you use these files, please cite STaRK and our paper.
@inproceedings{wu2024stark,
title = {{STaRK}: Benchmarking {LLM} Retrieval on Textual and Relational Knowledge Bases},
author = {Wu, Shirley and Zhao, Shiyu and Yasunaga, Michihiro and Huang, Kexin and Cao, Kaidi and
Huang, Qian and Ioannidis, Vassilis N. and Subbian, Karthik and Zou, James and Leskovec, Jure},
booktitle = {Advances in Neural Information Processing Systems},
volume = {37},
pages = {127129--127153},
year = {2024}
}
@misc{bai2026dkgi,
title = {Knowledge Graphs as Files: An Agent Harness Where Tool Creation and Tool Use Co-Evolve},
author = {Bai, Yuyang and Wang, Yu and Zhang, Yu},
year = {2026}
}
- Downloads last month
- 39