Automated Cross-Model Peer Review in GitHub Copilot CLI
Visual Studio Codego watch the original →
the gist
GitHub Copilot CLI uses a 'rubber duck' feature to automatically trigger peer reviews from a different model family (e.g., GPT-4o reviewing Claude 3.5 Sonnet) during planning, implementation, and testing to improve output quality.
Automated Cross-Model Peer Review
The "rubber duck" feature in the GitHub Copilot CLI automates the process of having one LLM family critique the output of another. By leveraging the different training data and blind spots of models like Claude and GPT, the system achieves higher reliability than relying on a single model. The CLI automatically triggers these reviews at three critical development boundaries: initial planning, code implementation, and test case generation.
Implementation and Workflow
- Triggering Reviews: Users can manually invoke a review by typing
rubberduck this planin the CLI, though the system is designed to perform these checks automatically at key stages. - Model Delegation: The CLI allows for model overriding, where a primary model (like Claude 3.5 Sonnet) delegates specific tasks to a secondary model (like GPT-4o) to perform the review or execute sub-tasks.
- Performance Optimization: Internal research indicates that having GPT models review Claude 3.5 Sonnet planning and code can approximate 75% of the performance of more expensive models like Claude 3 Opus, allowing for a more cost-effective development loop.
- Autopilot Integration: The CLI's "Autopilot" feature functions as a controlled "RALPH" (Read, Act, Learn, Plan, Help) loop, which iterates on a task and stores learnings in a markdown file until the agent confirms the implementation is complete.
Context
Developers often struggle with the limitations of single-model agents, which may make mistakes or fail to complete complex tasks in a single pass. The "rubber duck" approach addresses this by introducing a peer-review layer that catches bugs, design flaws, and regressions before the code is finalized. This method is particularly useful for users who want high-fidelity results without relying exclusively on the most expensive frontier models.