Explain algorithms in step by step list
- User
Explain algorithms in step by step list
Assistant
Based on the repository files, here's a step-by-step explanation of the key algorithms implemented in optillm:
-
Chain-of-Thought (CoT) with Reflection
- Generate initial response with thinking steps
- Reflect on the thinking process for errors/improvements
- Adjust reasoning based on reflection
- Provide final output in tags
-
Best of N Sampling
- Generate N candidate responses
- Rate each response on quality metrics
- Select highest-rated response
- Return best response
-
Mixture of Agents (MoA)
- Generate multiple initial responses
- Critique each response for strengths/weaknesses
- Generate final response incorporating critiques
- Return optimized response
-
Monte Carlo Tree Search (MCTS)
- Initialize root node with initial state
- Select node using exploration/exploitation tradeoff
- Expand node by generating possible actions
- Simulate random rollout to terminal state
- Backpropagate results up the tree
- Repeat for N simulations
- Select best path as final response
-
R Algorithm*
- Generate initial observations from problem
- Derive new observations from existing ones
- Generate natural language solution
- Implement solution in code
- Evaluate solution quality
- Refine and iterate
-
Round Trip Optimization (RTO)
- Generate initial code (C1)
- Generate description from code (Q2)
- Generate new code from description (C2)
- Compare C1 and C2
- If different, generate optimized final code (C3)
-
Self-Consistency
- Generate multiple candidate responses
- Cluster similar responses
- Analyze clusters for consistency
- Select most consistent response
-
PlanSearch
- Generate initial observations
- Derive new observations from existing ones
- Generate natural language solution
- Implement solution in code
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.