RepoQA
Models find a function in a long code repository from a description of what it does, across Python, C++, Rust, Java and TypeScript.
In the authors’ words
Recent advances have been improving the context windows of Large Language Models (LLMs). To quantify the real long-context capabilities of LLMs, evaluators such as the popular Needle in a Haystack have been developed to test LLMs over a large chunk of raw texts. While effective, current evaluations overlook the insight of how LLMs work with long-context code, i.e., repositories. To this end, we initiate the RepoQA benchmark to evaluate LLMs on long-context code understanding. Traditional needle testers ask LLMs to directly retrieve the answer from the context without necessary deep understanding. In RepoQA, we built our initial task, namely Searching Needle Function (SNF), which exercises LLMs to search functions given their natural-language description, i.e., LLMs cannot find the desired function if they cannot understand the description and code. RepoQA is multilingual and comprehensive: it includes 500 code search tasks gathered from 50 popular repositories across 5 modern programming languages. By evaluating 26 general and code-specific LLMs on RepoQA, we show (i) there is still a small gap between the best open and proprietary models; (ii) different models are good at different languages; and (iii) models may understand code better without comments.
- Level
- University Undergraduates and entry-level professionals
- Scored
- Checked automatically A program checks the result against an answer key, unit tests or the expected final state.
- Answers
- Code A program or patch run against tests.
3 models share the top score of 90.6% among models released by May 2024
Best score per entry from the benchmark's own leaderboard, read on 2 Nov 2026. Where a model ran with several settings or harnesses, we keep its best. Names in gray aren't in our model list: fine-tunes, agent systems, products and older models. They don't count toward leaders.
The newest model with a score here came out in May 2024, and nobody has tested a newer one. Among the 20 highest-ranked models on the capability index, these have no score yet:
- GPT-6 Astra
- Claude Opus 5.5
- GPT-6.1 Terra
- GPT-6.1 Sol
- and 16 more
- 90.6 Claude 3 Opus
- 90.6 GPT-4o
- 90.6
Gemini 1.5 Pro
- 90.0
Gemini 1.5 Flash
- 87.4 Claude 3 Sonnet
- 83.4
DeepSeek-V2 (MoE-236B, May 2024)
- 82.2
Llama 3-70B
- 81.8 Claude 3 Haiku
- 76.4 GPT-4 Turbo
- 68.0
Mixtral 8x7B
- 67.8
Mixtral 8x22B
- 67.0
Qwen1.5-72B
- 63.2
Phi-3-medium-128k-instruct
- 62.8 CodeQwen1.5-7B-Chat
- 62.0
Mistral 7B v0.3
- 60.4 GPT-3.5 Turbo
- 53.6
Llama 3-8B
- 48.4 deepseek-coder-33b-instruct
- 47.4
Mistral-7B-Instruct-v0.2
- 42.6 CodeLlama-13b-Instruct-hf
- 41.6
Code Llama 34B Instruct
- 41.6 DeepSeek-V2-Lite-Chat
- 39.6 Phi-3-small-128k-instruct
- 33.8 Qwen1.5-32B-Chat
- 28.2 CodeLlama-7b-Instruct-hf
- 26.0
Qwen1.5-14B-Chat
- 23.2 Magicoder-S-DS-6.7B
- 22.4
Phi-3-mini-128k-instruct
- 11.0
Mistral-7B-Instruct-v0.1
- 10.6 deepseek-coder-6.7b-instruct
- 2.80
Qwen1.5-7B-Chat
- 2.20 codegemma-7b-it
- 1 Claude 3 Opus 90.6%
- 2 GPT-4o May 2024 90.6%
- 3
Gemini 1.5 Pro May 2024 90.6%
- 4
Gemini 1.5 Flash May 2024 90%
- 5 Claude 3 Sonnet 87.4%
- 6
DeepSeek-V2 (MoE-236B, May 2024) 83.4%
- 7
Llama 3-70B 82.2%
- 8 Claude 3 Haiku 81.8%
- 9 GPT-4 Turbo Apr 2024 76.4%
- 10
Mixtral 8x7B 68%
- 11
Mixtral 8x22B 67.8%
- 12
Qwen1.5-72B 67%
- 13
Phi-3-medium-128k-instruct 63.2%
- 14 CodeQwen1.5-7B-Chat 62.8%
- 15
Mistral 7B v0.3 62%
- 16 GPT-3.5 Turbo Jan 2024 60.4%
- 17
Llama 3-8B 53.6%
- 18 deepseek-coder-33b-instruct 48.4%
- 19
Mistral-7B-Instruct-v0.2 47.4%
- 20 CodeLlama-13b-Instruct-hf 42.6%
- 21
Code Llama 34B Instruct 41.6%
- 22 DeepSeek-V2-Lite-Chat 41.6%
- 23 Phi-3-small-128k-instruct 39.6%
- 24 Qwen1.5-32B-Chat 33.8%
- 25 CodeLlama-7b-Instruct-hf 28.2%
- 26
Qwen1.5-14B-Chat 26%
- 27 Magicoder-S-DS-6.7B 23.2%
- 28
Phi-3-mini-128k-instruct 22.4%
- 29
Mistral-7B-Instruct-v0.1 11%
- 30 deepseek-coder-6.7b-instruct 10.6%
- 31
Qwen1.5-7B-Chat 2.80%
- 32 codegemma-7b-it 2.20%
| # | Entry | Score | Setting | Date | Source |
|---|---|---|---|---|---|
| 1 | Claude 3 Opus | 90.6% | Feb 2024 | Official leaderboard | |
| 2 | GPT-4o May 2024 | 90.6% | May 2024 | Official leaderboard | |
| 3 | | 90.6% | May 2024 | Official leaderboard | |
| 4 | | 90% | May 2024 | Official leaderboard | |
| 5 | Claude 3 Sonnet | 87.4% | Feb 2024 | Official leaderboard | |
| 6 | | 83.4% | May 2024 | Official leaderboard | |
| 7 | | 82.2% | Apr 2024 | Official leaderboard | |
| 8 | Claude 3 Haiku | 81.8% | Mar 2024 | Official leaderboard | |
| 9 | GPT-4 Turbo Apr 2024 | 76.4% | Apr 2024 | Official leaderboard | |
| 10 | | 68% | Dec 2023 | Official leaderboard | |
| 11 | | 67.8% | Apr 2024 | Official leaderboard | |
| 12 | | 67% | Feb 2024 | Official leaderboard | |
| 13 | | 63.2% | May 2024 | Official leaderboard | |
| 14 | CodeQwen1.5-7B-Chat | 62.8% | May 2024 | Official leaderboard | |
| 15 | | 62% | Sep 2023 | Official leaderboard | |
| 16 | GPT-3.5 Turbo Jan 2024 | 60.4% | Jan 2024 | Official leaderboard | |
| 17 | | 53.6% | Apr 2024 | Official leaderboard | |
| 18 | deepseek-coder-33b-instruct | 48.4% | May 2024 | Official leaderboard | |
| 19 | | 47.4% | Dec 2023 | Official leaderboard | |
| 20 | CodeLlama-13b-Instruct-hf | 42.6% | May 2024 | Official leaderboard | |
| 21 | | 41.6% | Aug 2023 | Official leaderboard | |
| 22 | DeepSeek-V2-Lite-Chat | 41.6% | May 2024 | Official leaderboard | |
| 23 | Phi-3-small-128k-instruct | 39.6% | May 2024 | Official leaderboard | |
| 24 | Qwen1.5-32B-Chat | 33.8% | May 2024 | Official leaderboard | |
| 25 | CodeLlama-7b-Instruct-hf | 28.2% | May 2024 | Official leaderboard | |
| 26 | | 26% | Feb 2024 | Official leaderboard | |
| 27 | Magicoder-S-DS-6.7B | 23.2% | May 2024 | Official leaderboard | |
| 28 | | 22.4% | Apr 2024 | Official leaderboard | |
| 29 | | 11% | Sep 2023 | Official leaderboard | |
| 30 | deepseek-coder-6.7b-instruct | 10.6% | May 2024 | Official leaderboard | |
| 31 | | 2.80% | Feb 2024 | Official leaderboard | |
| 32 | codegemma-7b-it | 2.20% | May 2024 | Official leaderboard |
Labs report scores for 4 models in their cards. We plot every source in the charts below.
Number one over time
Lab claims count from the day the card came out, independent runs from the model’s release. We draw one row each for the benchmark’s own leaderboard and what labs claim in their cards.
The best score passed 85% in Feb 2024
All the scores we have, one dot each, so a model tested at several settings appears more than once.
Labs dropped it from launch posts once the best score passed 85%
Launch posts from every lab that has listed it, one tick per post. Tall colored ticks include it, and short gray ones leave it out.
| Date | Launch post | Score | As the post writes it |
|---|---|---|---|
| 13 Mar 2025 | RepoQA 32k (chart only) |
4 system cards report it, from 3 labs
Besides launch posts, we read the system cards, model cards and technical reports labs publish with a release. They report far more, including safety and frontier-risk tests.
| Date | Document | Score | As the document writes it | Section |
|---|---|---|---|---|
| 11 Feb 2026 | | 88.5 | RepoQA (Table 5). PaCoRe 88.7 | Capabilities |
| 1 Apr 2025 | | 92.6 | RepoQA 32K context, threshold 0.8, match accuracy (Table 12) | Capabilities |
| 30 Aug 2024 | | 85 | RepoQA, average over Python, C++, Rust, Java, TypeScript, 128k context (Table 1) | Capabilities |
| 30 Aug 2024 | | 77 | RepoQA, average over Python, C++, Rust, Java, TypeScript, 128k context (Table 1) | Capabilities |
More in Long context
- MRCR v2 In use Multi-round coreference: retrieve the n-th of several similar requests hidden in a long synthetic conversation, up to 1M tokens.
Muse Spark 1.3 98.5%
- LongBench v2 In use 503 multiple-choice questions over 8K-2M-word contexts (QA, dialogue, code repos, structured data). Accuracy. Beam 1.0 66.9%
- GraphWalks In use A graph is given as an edge list in long context. The model answers BFS or parent queries, scored by F1. Claude Fable 5 100%
- OpenAI MRCR v2 In use Models read a long synthetic chat that hides 2, 4 or 8 identical writing requests and must reproduce the response to the i-th one. Scored by mean string match ratio per context bin.
K-EXAONE 2.0 94.4%
- CL-bench In use Model must learn new knowledge from a supplied long context (rules, procedures, data) and solve tasks. Strict LLM-verified rubrics. GPT-5.4 27.9%
- AA-LCR 1.1 In use Models answer 100 questions that need reasoning across sets of real documents of about 100K tokens. An LLM equality checker with a fixed system prompt compares each answer with the key.
Step 5 Preview 88.3%