How going-doer/paper2code works
PaperCoder turns a scientific paper into a generated code repository through planning, analysis, and code generation, with debugging and model-based evaluation as additional capabilities. The README documents PDF-to-JSON conversion and JSON or LaTeX inputs; the sampled planning and coding modules show both OpenAI and vLLM implementations. Evaluation supports reference-based and reference-free modes. Some pipeline wiring is documented rather than visible in the sampled source, so documented links are identified as such; unsampled subsystem internals are not inferred.
Main entry points: 1.1_extract_config.py Planning artifacts · eval.py Repository evaluation · 1_planning.py LLM planning · 2_analyzing.py LLM analysis
Components 18
Paper Inputs
- Paper input
- PDF conversion
codes/0_pdf_process.py
Planning
- LLM planning
codes/1_planning.py - vLLM planning
codes/1_planning_llm.py - Planning artifacts
codes/1.1_extract_config.py - RAG configuration
codes/1.2_rag_config.py - LLM analysis
codes/2_analyzing.py - vLLM analysis
codes/2_analyzing_llm.py
Implementation
- LLM code generation
codes/3_coding.py - vLLM code generation
codes/3_coding_llm.py - Script generation
codes/3.1_coding_sh.py - Generated-code debugging
codes/4_debugging.py - Generated repository
Quality and Evaluation
- Repository evaluation
codes/eval.py - Evaluation prompts
data/prompts - Paper2Code benchmark
data/paper2code - Shared parsing and logging
codes/utils.py
Other components
- PaperCoder user
Connections 26
- PaperCoder user → Paper input: provides paper
README.md - Paper input → PDF conversion: PDF conversion
README.md - Paper input → LLM planning: starts workflow
README.md - Paper input → vLLM planning: starts workflow
README.md - LLM planning → Planning artifacts: writes artifacts
codes/1.1_extract_config.py - LLM planning → LLM analysis: plans then analyzes
README.md - vLLM planning → vLLM analysis: plans then analyzes
README.md - Planning artifacts → LLM analysis: provides config
codes/2_analyzing.py - Planning artifacts → vLLM analysis: provides planning
codes/2_analyzing_llm.py - LLM analysis → LLM code generation: analyzes then generates
README.md - vLLM analysis → vLLM code generation: analyzes then generates
README.md - Planning artifacts → LLM code generation: provides config
codes/3_coding.py - Planning artifacts → vLLM code generation: provides planning
codes/3_coding_llm.py - LLM code generation → Generated repository: writes files
codes/3_coding.py - vLLM code generation → Generated repository: writes files
codes/3_coding_llm.py - Generated repository → Generated-code debugging: debug target
codes/4_debugging.py - Generated-code debugging → Generated repository: applies fixes
codes/4_debugging.py - PaperCoder user → Repository evaluation: evaluates repository
README.md - Generated repository → Repository evaluation: reads target code
codes/eval.py - Paper input → Repository evaluation: supplies paper context
codes/eval.py - Evaluation prompts → Repository evaluation: loads evaluation prompt
codes/eval.py - Paper2Code benchmark → PaperCoder user: benchmark data
README.md - LLM planning → Shared parsing and logging: uses helpers
codes/1_planning.py - LLM analysis → Shared parsing and logging: uses helpers
codes/2_analyzing.py - LLM code generation → Shared parsing and logging: uses helpers
codes/3_coding.py - Repository evaluation → Shared parsing and logging: uses helpers
codes/eval.py