Correctness-Aware Repository Filtering Under Maximum Effective Context Window Constraints
- URL: http://arxiv.org/abs/2605.14362v1
- Date: Thu, 14 May 2026 04:37:39 GMT
- Title: Correctness-Aware Repository Filtering Under Maximum Effective Context Window Constraints
- Abstract summary: Context window efficiency is a practical constraint in large language model (LLM)-based developer tools.<n>We present a correctness-aware context hygiene framework that intercepts repository scans before tokenization.<n>Our framework, by contrast, requires no indexing and operates at 0.01 ms per file decision.
- Score: 0.0
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: Context window efficiency is a practical constraint in large language model (LLM)-based developer tools. Paulsen [12] shows that all tested models degrade in accuracy well before their advertised context limits the Maximum Effective Context Window (MECW) which makes context construction a quality problem, not just a cost one. Modern software repositories routinely contain large non-code artifacts compiled datasets, binary model weights, minified JavaScript bundles, and gigabyte-scale log files that overflow the context window and push out task-relevant source code. We present a correctness-aware context hygiene framework: a pre-execution, size-based heuristic filter that intercepts repository scans before tokenization, using only OS-level stat() metadata with sub-millisecond overhead. Semantic retrieval approaches such as RepoCoder, GraphRAG, and AST-based chunking require index construction and query-time inference before any filtering decision is reached. Our framework, by contrast, requires no indexing and operates at <0.01 ms per file decision. Across 10 real open-source repositories (22,046 files, 5 languages), the proposed SizeFilter at θ=1 MB achieves 79.6% (\pm13.2%) mean token reduction at 0.30 ms overhead: the HybridFilter achieves 89.3% (\pm9.0%) the lowest variance of any filter evaluated. A token-density study across 2,688 files confirms a strong linear correlation (Pearson r=0.997, k=0.250 tokens/byte). A limited-scope evaluation (18 tasks, CodeLlama-7B-Instruct) yields 72% file-level accuracy under filtering versus 25% at baseline; hallucination frequency declines from 61% to 17%. All code and data are released for reproducibility.
Related papers
- Token Optimization and Context Window Management in Multi-Agent AI Workflows [0.0]
Multi-agent AI synthesis are limited not only by model quality but by token cost, latency, and context-window quality.<n>This paper presents a practitioner framework for token optimization and context-window management.<n>In production they cut measured cold-load latency to 61-116 seconds from an operational baseline of roughly 3.5-10.5 minutes, with an estimated 60-70% token reduction.
arXiv Detail & Related papers (2026-08-17T22:56:50Z) - CodeGrep: An RL-Trained Retrieval Agent for LLM Coding Agents [8.150687615894268]
We introduce CodeGrep, a 14B retrieval agent trained end-to-end with GRPO to issue parallel, glob, and read tool calls and return candidate files to a frozen downstream coding agent.<n>On all 500 SWE-Bench Verified instances, CodeGrep preserves resolve rate while substantially improving efficiency: 27.0% versus 25.8% for the no-retrieval baseline, with 15% fewer rounds and 19% fewer tokens on resolved instances.
arXiv Detail & Related papers (2026-08-06T11:07:42Z) - Constrained Decoding for Diffusion Language Models via Efficient Inference over Finite Automata [57.27430779838529]
We present an exact and tractable algorithm for sampling from the constrained mean-field posterior under any constraint expressible as a finite automaton.<n>The approach guarantees constraint satisfaction by construction, supports both greedy and sampling-based decoding, and is compatible with parallel and block-wise decoding.<n> Empirical evaluations on Dream-7B and LLaDA-8 show substantial accuracy gains across various tasks.
arXiv Detail & Related papers (2026-07-08T05:48:57Z) - Beyond Inference-Only Deployment: Comparing Weight-Based Consolidation Against Cascading Compaction [1.6214121783846343]
We evaluate a nightly consolidation of interaction knowledge into model weights via synthesis, synthesis, and Low-Rank Adaptation (LoRA) fine-tuning on a single consumer.<n>Across ten realistic software development conversations, cascading compaction retain 36.8 +/- 3.0% of knowledge.<n>LoRA consolidates interaction knowledge into model weights via synthesis, synthesis, and Low-Rank Adaptation (LoRA) fine-tuning on a single consumer.
arXiv Detail & Related papers (2026-05-23T16:57:25Z) - Delta-Based Neural Architecture Search: LLM Fine-Tuning via Code Diffs [48.83701310501069]
Large language models (LLMs) show strong potential for neural architecture generation.<n>Existing approaches produce complete model implementations from scratch.<n>We propose Delta-Code Generation, where fine-tuned LLMs generate compact unified diffs.
arXiv Detail & Related papers (2026-05-06T13:32:05Z) - SWE-PRBench: Benchmarking AI Code Review Quality Against Pull Request Feedback [2.626039639665796]
SWE-PRBench is a benchmark of 350 pull requests with human-annotated ground truth for evaluating AI code review quality.<n>Eight frontier models detect only 15-31% of human-flagged issues on the diff-only configuration.
arXiv Detail & Related papers (2026-03-27T07:24:26Z) - The Limits of Long-Context Reasoning in Automated Bug Fixing [4.853967615615349]
Large language models (LLMs) can directly reason over entire contexts.<n>Recent advances in LLMs have enabled strong performance on software engineering benchmarks.<n>We systematically evaluate whether current LLMs can reliably perform long-context code and patch generation.
arXiv Detail & Related papers (2026-02-17T22:51:40Z) - Impact-driven Context Filtering For Cross-file Code Completion [19.717276276962483]
Retrieval-augmented generation (RAG) has recently demonstrated considerable potential for repository-level code completion.<n>To better understand the contribution of the retrieved cross-file contexts, we evaluate the impact of each retrieved code chunk on the completion.<n>These results underscore the potential of CODE to enhance the accuracy, efficiency, and attributability of repository-level code completion.
arXiv Detail & Related papers (2025-08-08T03:08:19Z) - Precise Legal Sentence Boundary Detection for Retrieval at Scale: NUPunkt and CharBoundary [13.284214798785847]
We present NUPunkt and CharBoundary, two sentence boundary detection libraries optimized for high-precision processing of legal text.<n>These libraries address the critical challenges posed by legal documents containing specialized citations, abbreviations, and complex sentence structures.
arXiv Detail & Related papers (2025-04-05T10:48:34Z) - See, Say, and Segment: Teaching LMMs to Overcome False Premises [67.36381001664635]
We propose a cascading and joint training approach for LMMs to solve this task.
Our resulting model can "see" by detecting whether objects are present in an image, "say" by telling the user if they are not, and finally "segment" by outputting the mask of the desired objects if they exist.
arXiv Detail & Related papers (2023-12-13T18:58:04Z) - Filter Pruning for Efficient CNNs via Knowledge-driven Differential
Filter Sampler [103.97487121678276]
Filter pruning simultaneously accelerates the computation and reduces the memory overhead of CNNs.
We propose a novel Knowledge-driven Differential Filter Sampler(KDFS) with Masked Filter Modeling(MFM) framework for filter pruning.
arXiv Detail & Related papers (2023-07-01T02:28:41Z) - Training Compact CNNs for Image Classification using Dynamic-coded
Filter Fusion [139.71852076031962]
We present a novel filter pruning method, dubbed dynamic-coded filter fusion (DCFF)
We derive compact CNNs in a computation-economical and regularization-free manner for efficient image classification.
Our DCFF derives a compact VGGNet-16 with only 72.77M FLOPs and 1.06M parameters while reaching top-1 accuracy of 93.47%.
arXiv Detail & Related papers (2021-07-14T18:07:38Z) - Data Agnostic Filter Gating for Efficient Deep Networks [72.4615632234314]
Current filter pruning methods mainly leverage feature maps to generate important scores for filters and prune those with smaller scores.
In this paper, we propose a data filter pruning method that uses an auxiliary network named Dagger module to induce pruning.
In addition, to help prune filters with certain FLOPs constraints, we leverage an explicit FLOPs-aware regularization to directly promote pruning filters toward target FLOPs.
arXiv Detail & Related papers (2020-10-28T15:26:40Z) - ContextNet: Improving Convolutional Neural Networks for Automatic Speech
Recognition with Global Context [58.40112382877868]
We propose a novel CNN-RNN-transducer architecture, which we call ContextNet.
ContextNet features a fully convolutional encoder that incorporates global context information into convolution layers by adding squeeze-and-excitation modules.
We demonstrate that ContextNet achieves a word error rate (WER) of 2.1%/4.6% without external language model (LM), 1.9%/4.1% with LM and 2.9%/7.0% with only 10M parameters on the clean/noisy LibriSpeech test sets.
arXiv Detail & Related papers (2020-05-07T01:03:18Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.