Skip to content

Commit c818979

Browse files
committed
[docs][fix maker docs]
1 parent 3849183 commit c818979

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

docs/swarms/structs/maker.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MAKER
22

3-
**MAKER** (**M**aximal **A**gentic decomposition, first-to-ahead-by-**K** **E**rror correction, and **R**ed-flagging) is a task-agnostic orchestrator for long-horizon problems. It decomposes work into many small steps; at each step it samples LLM outputs, discards bad ones (red-flagging), and commits only when one parsed answer leads the next-best by `k` votes (“first-to-ahead-by-k”).
3+
MAKER (M aximal Agentic decomposition, first-to-ahead-by-K Error correction, and Red-flagging) is a task-agnostic orchestrator for long-horizon problems. It decomposes work into many small steps; at each step it samples LLM outputs, discards bad ones (red-flagging), and commits only when one parsed answer leads the next-best by `k` votes (“first-to-ahead-by-k”).
44

55
This implementation follows the framework described in *Solving a Million-Step LLM Task with Zero Errors* (Meyerson et al., 2025) — [arXiv:2511.09030](https://arxiv.org/abs/2511.09030).
66

tests/structs/test_maker.py

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,16 @@ def test_init_invalid_k():
7070

7171

7272
def test_init_invalid_max_tokens():
73-
with pytest.raises(ValueError, match="max_tokens must be at least 10"):
73+
with pytest.raises(
74+
ValueError, match="max_tokens must be at least 10"
75+
):
7476
MAKER(k=1, max_tokens=5, verbose=False)
7577

7678

7779
def test_init_invalid_temperature():
78-
with pytest.raises(ValueError, match="temperature must be between"):
80+
with pytest.raises(
81+
ValueError, match="temperature must be between"
82+
):
7983
MAKER(k=1, temperature=3.0, verbose=False)
8084

8185

@@ -110,7 +114,9 @@ def test_make_hashable_nested_no_llm():
110114

111115
def test_estimate_cost_structure():
112116
m = MAKER(k=2, verbose=False)
113-
est = m.estimate_cost(total_steps=10, target_success_probability=0.9)
117+
est = m.estimate_cost(
118+
total_steps=10, target_success_probability=0.9
119+
)
114120
assert "current_k" in est
115121
assert "expected_total_samples" in est
116122
assert est["current_k"] == 2
@@ -197,12 +203,12 @@ def upd(state, result, step_idx):
197203
@requires_openai
198204
def test_maker_custom_parse_integer():
199205
agents = [_vote_agent("n")]
200-
system_prompt = (
201-
"Reply with a single digit only: output exactly one character 7 and nothing else."
202-
)
206+
system_prompt = "Reply with a single digit only: output exactly one character 7 and nothing else."
203207

204208
def format_prompt(task, state, step_idx, previous_result):
205-
return f"{task}\nOutput one digit only for step {step_idx + 1}."
209+
return (
210+
f"{task}\nOutput one digit only for step {step_idx + 1}."
211+
)
206212

207213
maker = MAKER(
208214
k=1,
@@ -234,7 +240,9 @@ def test_maker_two_agent_pool():
234240
def test_maker_k2_strict_consensus():
235241
"""Higher k needs repeated agreement; strict STEP token keeps votes aligned."""
236242
agents = [_vote_agent("k2")]
237-
maker = _strict_step_maker(k=2, agents=agents, max_retries_per_step=60)
243+
maker = _strict_step_maker(
244+
k=2, agents=agents, max_retries_per_step=60
245+
)
238246
out = maker.run(task="Consensus test with k=2.", max_steps=1)
239247
assert len(out) == 1
240248

0 commit comments

Comments
 (0)