summaryrefslogtreecommitdiff
path: root/STAGE_MAP.md
blob: ee77f964d66951cb2d2f933b4cbcc5c90aa97187 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# GAP paper-to-code map

The original implementation batches adjacent conceptual stages into two model
calls. Prompt-A returns the ordered proof-plan nodes and mutable slots; Prompt-B
re-instantiates that plan and returns the regenerated proof and question.
The package writes each conceptual output separately so every paper stage is
visible in an end-to-end run without changing either prompt.

The ordered nodes form a path-structured DAG, the exact graph induced by a
minimal sequential proof plan. `ProofPlanDAG` validates node identity,
dependencies, acyclicity, terminal connectivity, and order. The five judges
receive stable node IDs with the method-label sequence, and a verdict is valid
only when its step-by-step check covers every node.

| Paper operation | Implementation | Saved artifact |
|---|---|---|
| Surface rename | `SurfacePipeline.run_family` | `surface_<family>_variant.json` |
| 1. Reference solution to proof structure | `KernelPipeline.extract_plan` + `ProofPlanDAG` validation | `01_proof_dag.json` |
| 2. Content-free method plan | `KernelPipeline.extract_plan` | `02_method_plan.json` |
| 3. Mutable-slot identification | `KernelPipeline.extract_plan` | `03_mutable_slots.json` |
| 4. Proof regeneration | `KernelPipeline.generate_candidate` | `04_regenerated_proof.json` |
| 5. Problem rendering | `KernelPipeline.generate_candidate` | `05_variant_question.json` |
| Five-judge verification | `KernelPipeline.verify_candidate` | five call records and one iteration record per round |
| Consecutive-pass protocol | `KernelPipeline.verify_candidate` | `K=2`; any rejection resets the streak |
| Repair loop | `KernelPipeline._repair` | complete corrected question and solution; at most `T=15` rounds |

## Per-item artifacts

```text
items/<item-id>/
  input.json
  config.json
  calls/<request-id>.json
  stages/<stage>.json
  iterations/<round>.json
  final.json
```

Prompt literals are byte-locked by `PROMPT_SHA256SUMS` and
`tests/test_prompts.py`. The OpenAI adapter does not pass a temperature
argument; `o3` therefore uses its supported default.