This is the official repo (for research purpose only) for the paper "SSR: Socratic Self-Refine for Large Language Model Reasoning," built upon the codebase of AoT.
pip install openai ipdb math_verify datasets huggingfaceYou need to set up your API key and URL:
- If you would like to use the OpenAI model, create an
apikey.pyfile in the project root directory with the following format:
url = "https://api.openai.com/v1" # Replace with your API endpoint
openai_api_key = [
"your-api-key-here", # Replace with your actual API key
# You can add multiple API keys to improve concurrency performance.
]- If you want to use the Gemini model, locate the following code snippet in
module_atomic.pyand fill in your corresponding information:
# TODO(developer): Update and un-comment below lines
project_id = "<your-project-id>"
location = "<your-location>"bash scripts/gpt-5-mini.shPlease refer to eval.ipynb.
- SSR-Lin
- SSR-Ada
- SSR-Plan
- Chain-of-Thoughts (CoT)
- Self-Refine
- Debate
- Chain-of-Thoughts Self-Consistency (CoT-SC)
- Monte-Carlo Tree Self-refine (MTCSr), to replace ToT (a bit outdated)
- Atom-of-Thoughts (AoT)
- MATH-Level-5
- AIME24
- AIME25
- Zebra-Puzzles
- Mini-Sudoku
