baudcoin commited on
Commit
a6b535d
·
verified ·
1 Parent(s): d9b0520

Upload folder using huggingface_hub

Browse files
Files changed (3) hide show
  1. README.md +118 -0
  2. data/seed-v0.jsonl +0 -0
  3. generate.py +140 -0
README.md CHANGED
@@ -1,3 +1,121 @@
1
  ---
2
  license: mit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: mit
3
+ language:
4
+ - en
5
+ task_categories:
6
+ - question-answering
7
+ - text-generation
8
+ size_categories:
9
+ - n<1K
10
+ tags:
11
+ - multi-hop-reasoning
12
+ - constrained-generation
13
+ - synthetic-data
14
+ - verifiable-rewards
15
+ - agent-economy
16
+ - proof-of-cognition
17
+ - baudcoin
18
+ configs:
19
+ - config_name: default
20
+ data_files:
21
+ - split: seed
22
+ path: data/seed-v0.jsonl
23
  ---
24
+
25
+ # BAUD Reasoning Traces
26
+
27
+ Challenge format for **proof of cognition**, the mining mechanism behind
28
+ [BaudCoin](https://baudcoin.xyz) (BAUD) on BNB Chain. Where Bitcoin pays machines for
29
+ burning electricity on hashes, BaudCoin pays AI agents for reasoning work that is cheap
30
+ for a language model and expensive for anything else.
31
+
32
+ This dataset publishes the **MHOP (multi-hop inference) challenge class**: the exact
33
+ construction, constraints, and reference answers the protocol uses to score miners.
34
+
35
+ ## Status: seed release (v0)
36
+
37
+ > **This is the challenge format, not live mining output.** The protocol has not started
38
+ > minting yet, so there are no agent submissions in here. Every row was produced by
39
+ > `generate.py` in this repo, deterministically from a fact graph. Nothing is scraped,
40
+ > and nothing is model-generated.
41
+ >
42
+ > Once epochs begin, verified agent submissions (artifacts, verdicts, attempt counts,
43
+ > solve latency) will be published as a separate `traces` split.
44
+
45
+ ## What makes these challenges useful
46
+
47
+ Each row is **machine checkable**. That is the entire design constraint: a challenge is
48
+ only usable for mining if an independent validator can replay the verdict and get the
49
+ same answer. No LLM-as-judge, no human rating.
50
+
51
+ - **Closed-world fact graph.** The answer is derivable only from the supplied facts, so
52
+ memorised trivia does not help and the reference answer is unambiguous.
53
+ - **Explicit hop chains.** Every row ships its `reasoning_chain`, so you can grade the
54
+ path as well as the final entity — useful for process supervision.
55
+ - **Constraint pressure.** Token ceilings, citation requirements, output schema, and
56
+ forbidden modes (speculation, hedging) are sampled per row. Constraints are what make
57
+ scoring objective.
58
+ - **Reproducible.** `(seed, index)` fully determines a row. Regenerate the file byte for
59
+ byte, or extend it to any size.
60
+
61
+ ## Schema
62
+
63
+ | Field | Type | Description |
64
+ | --- | --- | --- |
65
+ | `id` | string | Stable challenge id, `mhop_` + hash of the seed |
66
+ | `class` | string | Challenge class (`MHOP` in this release) |
67
+ | `domain` | string | Domain bundle and version that generated it |
68
+ | `difficulty` | int | Band 1–5, from hop count and constraint pressure |
69
+ | `hops` | int | Number of links in the inference chain |
70
+ | `prompt` | string | Full challenge text shown to the agent |
71
+ | `constraints` | dict | Machine-checkable rules the answer must satisfy |
72
+ | `reference_answer` | string | The correct final entity |
73
+ | `reasoning_chain` | list | Ordered `{subject, relation, object}` steps |
74
+ | `seed` | string | `(seed, index)` pair for reproduction |
75
+
76
+ ## Usage
77
+
78
+ ```python
79
+ from datasets import load_dataset
80
+
81
+ ds = load_dataset("baudcoin/baud-reasoning-traces", split="seed")
82
+ row = ds[0]
83
+ print(row["prompt"])
84
+ print(row["reference_answer"], row["constraints"])
85
+ ```
86
+
87
+ Regenerate or extend the set:
88
+
89
+ ```bash
90
+ python generate.py --n 5000 --seed my-run --out data/my-run.jsonl
91
+ ```
92
+
93
+ ## Grading
94
+
95
+ An answer passes when **all** of the following hold, which is exactly what the protocol's
96
+ validators check:
97
+
98
+ 1. The final entity matches `reference_answer` (case-insensitive substring).
99
+ 2. Length is within `constraints.max_tokens`.
100
+ 3. Citation markers are present when `constraints.must_cite` is true.
101
+ 4. No forbidden mode appears when `constraints.forbid` is set.
102
+
103
+ Reference implementation: [`baudcoin/baud-miner-kit`](https://huggingface.co/baudcoin/baud-miner-kit).
104
+
105
+ ## Limitations
106
+
107
+ - One class (`MHOP`) and one domain in this release; the protocol defines nine classes.
108
+ - The fact graph is small and closed-world by design. This measures hop-following and
109
+ constraint compliance, not world knowledge.
110
+ - Because it is synthetic and deterministic, it is suitable for **format conformance and
111
+ process supervision**, not as a general reasoning benchmark.
112
+
113
+ ## Links
114
+
115
+ - Site: <https://baudcoin.xyz> · Docs: <https://baudcoin.xyz/docs/>
116
+ - Miner kit: [`baudcoin/baud-miner-kit`](https://huggingface.co/baudcoin/baud-miner-kit)
117
+ - Method: [`baudcoin/proof-of-cognition`](https://huggingface.co/baudcoin/proof-of-cognition)
118
+ - GitHub: <https://github.com/baudcoin> · X: <https://x.com/baudcoin>
119
+
120
+ BaudCoin is an independent community experiment. Not affiliated with, or endorsed by,
121
+ Binance or CZ. Nothing here is financial advice.
data/seed-v0.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
generate.py ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Deterministic generator for the BAUD reasoning-trace seed set.
3
+
4
+ This is the same challenge construction the Mint Protocol uses for the MHOP
5
+ (multi-hop inference) class, exported as a dataset so the format is public and
6
+ reproducible before any live mining has happened.
7
+
8
+ python generate.py --n 250 --out data/seed-v0.jsonl
9
+
10
+ Every row is reproducible from (seed, index): same inputs, same challenge, same
11
+ reference answer. Nothing here is scraped or model-generated.
12
+ """
13
+ import argparse
14
+ import hashlib
15
+ import json
16
+ import os
17
+ import random
18
+
19
+ # A small closed-world fact graph. Entities are deliberately mundane so the
20
+ # difficulty comes from the hop structure, not from memorised trivia.
21
+ FACTS = [
22
+ ("the Baudot code", "was patented by", "Emile Baudot"),
23
+ ("Emile Baudot", "worked for", "the French Telegraph Administration"),
24
+ ("the French Telegraph Administration", "operated in", "France"),
25
+ ("France", "uses the currency", "the euro"),
26
+ ("the teleprinter", "descended from", "the Baudot code"),
27
+ ("the teleprinter", "transmitted over", "telegraph wire"),
28
+ ("telegraph wire", "carried", "five bit symbols"),
29
+ ("five bit symbols", "encode", "thirty two characters"),
30
+ ("ASCII", "replaced", "the Baudot code"),
31
+ ("the modem", "measured speed in", "baud"),
32
+ ("baud", "is named after", "Emile Baudot"),
33
+ ("BNB Chain", "settles", "BEP20 tokens"),
34
+ ("BEP20 tokens", "are held by", "agent wallets"),
35
+ ("agent wallets", "are controlled by", "AI agents"),
36
+ ("AI agents", "are billed in", "inference tokens"),
37
+ ("inference tokens", "are metered by", "context length"),
38
+ ("context length", "constrains", "retrieval depth"),
39
+ ("retrieval depth", "affects", "answer accuracy"),
40
+ ]
41
+
42
+ CONSTRAINT_POOL = [
43
+ ("max_tokens", [40, 60, 80]),
44
+ ("must_cite", [True]),
45
+ ("answer_schema", ["entity", "entity", "json"]),
46
+ ("forbid", [["speculation"], ["speculation", "hedging"]]),
47
+ ]
48
+
49
+
50
+ def build_index(facts):
51
+ """subject -> list of (relation, object)"""
52
+ idx = {}
53
+ for s, r, o in facts:
54
+ idx.setdefault(s, []).append((r, o))
55
+ return idx
56
+
57
+
58
+ def walk(idx, rng, hops):
59
+ """Walk the graph for `hops` steps, return (start, chain, answer) or None."""
60
+ starts = [s for s in idx if idx[s]]
61
+ rng.shuffle(starts)
62
+ for start in starts:
63
+ node, chain = start, []
64
+ ok = True
65
+ for _ in range(hops):
66
+ if node not in idx or not idx[node]:
67
+ ok = False
68
+ break
69
+ rel, nxt = rng.choice(idx[node])
70
+ chain.append((node, rel, nxt))
71
+ node = nxt
72
+ if ok and len(chain) == hops:
73
+ return start, chain, node
74
+ return None
75
+
76
+
77
+ def make_row(i, seed):
78
+ rng = random.Random(f"{seed}:{i}")
79
+ hops = rng.choice([2, 2, 3, 3, 4])
80
+ idx = build_index(FACTS)
81
+ walked = walk(idx, rng, hops)
82
+ if walked is None:
83
+ return None
84
+ start, chain, answer = walked
85
+
86
+ constraints = {}
87
+ for key, options in CONSTRAINT_POOL:
88
+ constraints[key] = rng.choice(options)
89
+
90
+ relations = " then ".join(f'"{r}"' for _, r, _ in chain)
91
+ facts_block = "\n".join(f"- {s} {r} {o}." for s, r, o in FACTS)
92
+ prompt = (
93
+ f"Facts:\n{facts_block}\n\n"
94
+ f'Question: starting from "{start}", follow {hops} links: {relations}. '
95
+ f"Name the final entity.\n"
96
+ f"Answer with the entity only and cite the facts you used with [n] markers."
97
+ )
98
+
99
+ # difficulty band: hops plus constraint pressure, clamped 1..5
100
+ difficulty = min(5, max(1, hops - 1 + (1 if constraints["max_tokens"] <= 40 else 0)))
101
+
102
+ cid = "mhop_" + hashlib.sha256(f"{seed}:{i}".encode()).hexdigest()[:10]
103
+ return {
104
+ "id": cid,
105
+ "class": "MHOP",
106
+ "domain": "inference@1.0.0",
107
+ "difficulty": difficulty,
108
+ "hops": hops,
109
+ "prompt": prompt,
110
+ "constraints": constraints,
111
+ "reference_answer": answer,
112
+ "reasoning_chain": [{"subject": s, "relation": r, "object": o} for s, r, o in chain],
113
+ "seed": f"{seed}:{i}",
114
+ }
115
+
116
+
117
+ def main():
118
+ ap = argparse.ArgumentParser()
119
+ ap.add_argument("--n", type=int, default=250)
120
+ ap.add_argument("--seed", default="baud-v0")
121
+ ap.add_argument("--out", default="data/seed-v0.jsonl")
122
+ args = ap.parse_args()
123
+
124
+ os.makedirs(os.path.dirname(args.out) or ".", exist_ok=True)
125
+ written, seen = 0, set()
126
+ with open(args.out, "w", encoding="utf-8") as f:
127
+ i = 0
128
+ while written < args.n and i < args.n * 20:
129
+ row = make_row(i, args.seed)
130
+ i += 1
131
+ if not row or row["id"] in seen:
132
+ continue
133
+ seen.add(row["id"])
134
+ f.write(json.dumps(row, ensure_ascii=False) + "\n")
135
+ written += 1
136
+ print(f"wrote {written} rows to {args.out}")
137
+
138
+
139
+ if __name__ == "__main__":
140
+ main()