Datasets:
Modalities:
Text
Formats:
json
Languages:
English
Size:
10K - 100K
Tags:
graph
network-topology
topology-reasoning
graph-qa
long-horizon-reasoning
retrieval-augmented-generation
License:
Download schema/instance.schema.json from huzhzh/graph_rag: direct link, hf CLI and curl.
- Browser
- Download file 4.24 kB
-
https://huggingface.co/datasets/huzhzh/graph_rag/resolve/main/schema/instance.schema.json
- Command line
-
hf download hf://datasets/huzhzh/graph_rag/schema/instance.schema.json
-
curl -L -o instance.schema.json https://huggingface.co/datasets/huzhzh/graph_rag/resolve/main/schema/instance.schema.json
4.24 kB
| { | |
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |
| "$id": "https://github.com/topology-qa/topoqa/instance-1.3.json", | |
| "title": "topoqa instance (v1.3)", | |
| "description": "一条实例 = 一张图(只存 key)+ 一个任务 + 一次具体问法。图的元数据在 00-graph/manifest.csv。", | |
| "type": "object", | |
| "required": ["schema", "id", "task", "split", "graph", "question", "anchor", "answer", "gold"], | |
| "additionalProperties": false, | |
| "properties": { | |
| "schema": {"const": "topoqa/1.3"}, | |
| "id": { | |
| "type": "string", | |
| "pattern": "^(base|mid|large)\\.[a-z_]+\\.[A-Za-z0-9_#.-]+\\.q[0-9]{2}$", | |
| "description": "{tier}.{task}.{graph}.q{ii};不含 split,改切分不改 ID。" | |
| }, | |
| "task": { | |
| "enum": [ | |
| "node_degree", "edge_existence", "path_length", | |
| "partition_modularity", "triangle_count", "dismantle_order" | |
| ], | |
| "description": "封闭枚举,代码依赖它;自由分析的标签放 qtype,不放这里。" | |
| }, | |
| "split": { | |
| "enum": ["dev", "test", "holdout", "ood", "transfer"], | |
| "description": "与 00-graph/manifest.csv 的 split 列必须一致(tests 会查)。" | |
| }, | |
| "graph": { | |
| "type": "string", | |
| "description": "00-graph/manifest.csv 的 key。图的 n/m/family/domain/path 都从那里 join。" | |
| }, | |
| "question": {"type": "string", "minLength": 8}, | |
| "anchor": { | |
| "type": "object", | |
| "required": ["type", "nodes"], | |
| "additionalProperties": false, | |
| "properties": { | |
| "type": {"enum": ["node", "node_pair", "node_set", "graph"]}, | |
| "nodes": {"type": "array", "items": {"type": "integer"}} | |
| }, | |
| "description": "解题入口。mid 的 node_set / graph 用它承载多锚点与图级任务。" | |
| }, | |
| "answer": { | |
| "type": "object", | |
| "required": ["type", "value"], | |
| "additionalProperties": false, | |
| "properties": { | |
| "type": { | |
| "enum": ["bool", "int", "float", "choice", "set", "partition", "edge_set", "sequence"] | |
| }, | |
| "value": {}, | |
| "match": { | |
| "enum": ["exact", "set_f1", "nmi", "choice", "numeric_tol", "curve"], | |
| "description": "可选。缺省按 task 约定(见 README §6)。" | |
| } | |
| } | |
| }, | |
| "gold": { | |
| "type": "object", | |
| "required": ["kind"], | |
| "description": "见证:够用就好,能重算的不存(邻居表/长路径)。", | |
| "properties": { | |
| "kind": { | |
| "enum": [ | |
| "neighbors", "edge", "non_edge", "shortest_path", | |
| "modularity", "triangle", "dismantle" | |
| ] | |
| }, | |
| "of": {"type": "integer", "description": "neighbors / triangle(node):哪个点"}, | |
| "u": {"type": "integer"}, | |
| "v": {"type": "integer"}, | |
| "via": {"type": "integer", "description": "non_edge:距离 2 的中间点"}, | |
| "src": {"type": "integer"}, | |
| "dst": {"type": "integer"}, | |
| "len": {"type": "integer"}, | |
| "path": {"type": "array", "items": {"type": "integer"}, "description": "≤64 点时给全路径"}, | |
| "truncated": {"type": "boolean"}, | |
| "head": {"type": "array", "items": {"type": "integer"}}, | |
| "tail": {"type": "array", "items": {"type": "integer"}}, | |
| "scope": {"enum": ["graph", "node"], "description": "triangle:全图还是某个点"}, | |
| "count": {"type": "integer", "description": "triangle:三角形个数"}, | |
| "specs": { | |
| "type": "object", | |
| "additionalProperties": {"type": "string"}, | |
| "description": "modularity:A/B/C 各自的划分说明串(与题面文字同源,可重算)" | |
| }, | |
| "q": { | |
| "type": "object", | |
| "additionalProperties": {"type": "number"}, | |
| "description": "modularity:每个候选的 Q(6 位小数)" | |
| }, | |
| "ask": {"enum": ["max", "min"], "description": "modularity:问最大还是最小"}, | |
| "order": { | |
| "type": "array", "items": {"type": "integer"}, | |
| "description": "dismantle:删除的节点序列(审计用见证)。判分只看 answer 里的度数序列——换 tie-break 会改 order,但 97% 的实例不改度数序列。" | |
| } | |
| } | |
| } | |
| } | |
| } | |