Assessing the Impact of Retrieval-Augmented Generation on Algorithmic Problem-Solving
On the map: Retrieval-augmented generation → RAG for code
Abstract (arXiv)
Competitive programming problems pose distinctive challenges for Large Language Models, as they demand not only proficient code generation but also advanced algorithmic reasoning. This study presents a Retrieval-Augmented Generation approach specifically designed to enhance the capacity of Large Language Models to address such problems. Our approach integrates an embedding-based retrieval mechanism and a similarity search algorithm to identify analogous problems within a knowledge database, employing a dynamically adjusted threshold to mitigate retrieval noise. We conducted an evaluation using the CodeContests dataset, focusing on the test split problems that exhibit similarity to instances from the training split. The experimental framework considered three conditions: (i) problems provided solely with their original descriptions, (ii) problems supplemented with randomly selected examples from the training split, and (iii) problems augmented with similar examples retrieved through the proposed method. In addition, we incorporated a Min-K membership inference analysis to examine whether the generated code solutions were influenced by potential memorization of training data within the evaluated Large Language Models. This complementary perspective enables a deeper understanding of model behavior by distinguishing genuine generalization through retrieval from implicit recall of pretraining samples. Performance was assessed using both pass rates and the CodeForces Elo rating of the problems. The results provide empirical evidence that similarity-based retrieval substantially enhances Large Language Models performance in competitive programming scenarios, offering an scalable framework for improving code generation in algorithmic problem-solving contexts.
Key facts. No citing papers in the map yet (data through 24 Nov 2026). Placed in RAG for code, one of 15 directions in Retrieval-augmented generation. Builds on 22 of its 40 references that are in the map. Submitted 6 Nov 2026.
Builds on
22 of 40 references.
References · 22
- 2020Language Models are Few-Shot Learnerscited by 33,113
- 2021Evaluating Large Language Models Trained on Codecited by 8,938
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,871
- 2017Billion-scale similarity search with GPUscited by 2,575
- 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 2,243
- 2022Competition-Level Code Generation with AlphaCodecited by 1,510
- 2020Leveraging Passage Retrieval with Generative Models for Open Domain Question Answeringcited by 1,247
- 2023Detecting Pretraining Data from Large Language Modelscited by 417
- 2025CodeElo: Benchmarking Competition-level Code Generation of LLMs with Human-comparable Elo Ratingscited by 122
- 2025LeetCodeDataset: A Temporal Dataset for Robust Evaluation and Efficient Training of Code LLMscited by 86
- 2024Can Language Models Solve Olympiad Programming?cited by 82
- 2025LiveCodeBench Pro: How Do Olympiad Medalists Judge LLMs in Competitive Programming?cited by 68
10 more
- 2023Elo Uncovered: Robustness and Best Practices in Language Model Evaluationcited by 67
- 2023Fairness-guided Few-shot Prompting for Large Language Modelscited by 58
- 2024HumanEval Pro and MBPP Pro: Evaluating Large Language Models on Self-invoking Code Generationcited by 42
- 2022Bayesian Estimation of Differential Privacycited by 39
- 2024Understanding the Effect of Noise in LLM Training Data with Algorithmic Chains of Thoughtcited by 22
- 2024RetrievalQA: Assessing Adaptive Retrieval-Augmented Generation for Short-form Open-Domain Question Answeringcited by 15
- 2024Evaluating the Smooth Control of Attribute Intensity in Text Generation with LLMscited by 8
- 2025Performance Review on LLM for solving leetcode problemscited by 6
- 2025CPRet: A Dataset, Benchmark, and Model for Retrieval in Competitive Programmingcited by 4
- 2025The Failure of Plagiarism Detection in Competitive Programmingcited by 2
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026Are you Synthesizing or Recalling? Evaluating LLMs on Algorithmic Code Retrieval
- 2025An Empirical Study of Retrieval-Augmented Code Generation: Challenges and Opportunities
- 2026Context-Augmented Code Generation Using Programming Knowledge Graphs
- 2024Context-Augmented Code Generation Using Programming Knowledge Graphs
- 2025Beyond the Surface: A Solution-Aware Retrieval Model for Competition-level Code Generation ↗
- 2025AlgoSimBench: Identifying Algorithmically Similar Problems for Competitive Programming
- 2024Evaluating the Effectiveness and Efficiency of Demonstration Retrievers in RAG for Coding Tasks
- 2024EVOR: Evolving Retrieval for Code Generation