BasedAGIBasedAGI

developer_tools

Best LLM for Unit Test Generation

Ranked models for generating meaningful unit tests and edge cases from code.

This page is high-intent, but the current benchmark evidence for this use case is still limited. Treat the leader below as provisional.

Provisional leader

gpt-4o-2024-05-13

Best current option from the available benchmark evidence, but not yet a strong winner claim.

external/openai/gpt-4o-2024-05-13

24.2%

Score

30.8%

Confidence

13

Evidence

Ranked Models

30

Evidence Quality

81%

Evidence Points

13

Top Signal

RepoQA Official Results: overall_average_pass_at_1_pct

All Ranked Models

30 of 30 models
RankModelScore
🥈gpt-4o-2024-05-13

Strong on RepoQA Official Results overall_average_pass_at_1_pct and RepoQA Official Results all_average_pass_at_1_pct

24.2%
🥉gpt-5-2025-08-07

Strong on Aider Polyglot Leaderboard percent_correct_pct and SWE-bench Verified Leaderboard swe_verified_resolved_pct

23.2%
#4claude-sonnet-4

Strong on Galileo Agent Leaderboard v2 Avg AC and SWE-bench Verified Leaderboard swe_verified_resolved_pct

23.2%
#7gemini-3-pro-preview

Strong on SWE-bench Verified Leaderboard swe_verified_resolved_pct and Vals SWE-bench overall_accuracy_pct

18.6%
#8gpt-5.2-2025-12-11

Strong on SWE-bench Verified Leaderboard swe_verified_resolved_pct and Vals SWE-bench overall_accuracy_pct

18.1%
#10gpt-4o-20241120

Strong on Aider Code Editing Leaderboard percent_correct_pct and BigCodeBench Official bigcodebench_complete_pct

17.5%
#11gpt-4.1-20250414

Strong on Galileo Agent Leaderboard v2 Avg AC and MMLongBench-Doc Leaderboard acc_score_pct

17.5%
#12o3-20250416

Strong on Aider Polyglot Leaderboard percent_correct_pct and SWE-bench Verified Leaderboard swe_verified_resolved_pct

17.0%
#13gemini-2.5-pro

Strong on SWE-bench Verified Leaderboard swe_verified_resolved_pct and Galileo Agent Leaderboard v2 Avg AC

16.8%
#14gemini-3.1-pro-preview

Strong on Vals SWE-bench overall_accuracy_pct and Vals LiveCodeBench overall_accuracy_pct

16.5%
#16Kimi K2 Thinking

Strong on SWE-bench Verified Leaderboard swe_verified_resolved_pct and Sonar Java Quality Leaderboard functional_skill_pct

15.7%
#17gpt-5-mini-2025-08-07

Strong on Vals LiveCodeBench overall_accuracy_pct and SWE-bench Verified Leaderboard swe_verified_resolved_pct

15.7%
#20Grok-4-0709

Strong on Vals LiveCodeBench overall_accuracy_pct and Galileo Agent Leaderboard v2 Avg AC

15.4%
#21qwen-2.5-72b-instruct

Strong on Galileo Agent Leaderboard v2 Avg AC and Aider Code Editing Leaderboard percent_correct_pct

15.0%
#22claude-opus-4-5-20251101

Strong on SWE-bench Verified Leaderboard swe_verified_resolved_pct and Vals Terminal-Bench 2 overall_accuracy_pct

14.2%
#25gemini-3-flash-preview

Strong on Vals SWE-bench overall_accuracy_pct and Vals LiveCodeBench overall_accuracy_pct

13.9%
#26o4-mini

Strong on Aider Polyglot Leaderboard percent_correct_pct and Vals LiveCodeBench overall_accuracy_pct

13.8%
#27gpt-5.4-2026-03-05

Strong on Vals SWE-bench overall_accuracy_pct and Vals LiveCodeBench overall_accuracy_pct

13.8%
#29claude-sonnet-4.6

Strong on Vals SWE-bench overall_accuracy_pct and Vals LiveCodeBench overall_accuracy_pct

13.5%
#30claude-opus-4-6-thinking

Strong on Vals SWE-bench overall_accuracy_pct and Vals LiveCodeBench overall_accuracy_pct

13.2%
#31glm-4.7

Strong on Vals LiveCodeBench overall_accuracy_pct and Vals SWE-bench overall_accuracy_pct

13.2%
#32minimax-m2.1

Strong on Vals SWE-bench overall_accuracy_pct and Vals LiveCodeBench overall_accuracy_pct

13.2%
#35deepseek-r1

Strong on Aider Polyglot Leaderboard percent_correct_pct and Sonar Java Quality Leaderboard functional_skill_pct

12.9%
#36claude-opus-4

Strong on SWE-bench Verified Leaderboard swe_verified_resolved_pct and Aider Polyglot Leaderboard percent_correct_pct

12.9%
#37gpt-5.1-2025-11-13

Strong on Vals LiveCodeBench overall_accuracy_pct and Vals SWE-bench overall_accuracy_pct

12.7%
#38claude-opus-4-5-20251101-thinking

Strong on Vals SWE-bench overall_accuracy_pct and Vals LiveCodeBench overall_accuracy_pct

12.7%
#39Phi-3-medium-128k-instruct

Strong on RepoQA Official Results overall_average_pass_at_1_pct and RepoQA Official Results all_average_pass_at_1_pct

12.3%
#43gpt-4o-2024-08-06

Strong on Aider Code Editing Leaderboard percent_correct_pct and Aider Code Editing Leaderboard correct_edit_format_pct

11.7%
#44kimi-k2.5-thinking

Strong on Vals LiveCodeBench overall_accuracy_pct and Vals SWE-bench overall_accuracy_pct

11.5%
#46gpt-4.1

Strong on SWE-bench Verified Leaderboard swe_verified_resolved_pct and Aider Polyglot Leaderboard percent_correct_pct

11.4%

Head-to-Head: #1 vs #2

#2

Top Pick

gpt-4o-2024-05-13

Strong on RepoQA Official Results overall_average_pass_at_1_pct and RepoQA Official Results all_average_pass_at_1_pct

24.2%

Conf 30.8%

#3

gpt-5-2025-08-07

Strong on Aider Polyglot Leaderboard percent_correct_pct and SWE-bench Verified Leaderboard swe_verified_resolved_pct

23.2%

Conf 28.4%

Related Lookups