potentialpaper

HASTE: Hybrid AST-guided Selection with Token-bounded Extraction

Mitali Raj, Saish Bhorpe, Mushtaq saeed, Adam Labaran Mohammed

ICLR 2026 submission

Edit this page

Or clone it with git

The page gets its repository with its first edit, so start in the web editor.

Or let your agent set it up

It checks and sets up everything: signing in, git, the clone, credentials and an SSH key.

Abstract. The rise of Large Language Models (LLMs) has opened new frontiers in software engineering, promising to automate complex tasks from bug fixing to large-scale refactoring. However, this promise is critically hampered by a fundamental constraint: the limited context window of these models. This limitation forces a difficult trade-off in context retrieval. On one hand, structure-aware approaches preserve syntactic integrity but often fail to pinpoint the most semantically relevant code for a given task. On the other, relevance-focused techniques excel at finding pertinent snippets but risk severing critical structural dependencies, leading to incoherent code that causes LLMs to hallucinate.

To resolve this trade-off, we introduce HASTE (Hybrid AST-guided Selection with Token-bounded Extraction), a novel framework that synergistically integrates robust information retrieval with deep structural analysis. HASTE leverages the Abstract Syntax Tree (AST), combining lexical and semantic search to ensure the extracted code is not only topically relevant but also structurally coherent and executable. Our evaluation, conducted using a robust LLM-as-a-judge framework, demonstrates that HASTE achieves upto 85% code compression while significantly improving the success rate of automated code edits and maintaining high structural fidelity, thereby reducing model-generated hallucinations. HASTE represents a key step towards enabling reliable and scalable AI-assisted software development.

Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.

Claim this paper
How does this paper connect to your work? Write how you built on it, compared with it or reproduced it, or add a summary, a critique or errata.
Or make it interactive:
Start writing

add · history

No versions are recorded yet: its preprint, the venues it went to and what they decided, the camera-ready. Missing a version?

We don't know of a submission of this paper to a venue with open reviews. Missing a submission?

Loading the discussion…