Bodla Krishna Vamshi

Author directory

2026

Large Language Models (LLMs) are now widely used for tasks such as summarization, question answering, and speech-to-text translation, and increasingly for code generation, with tools such as Cursor and Windsurf analyzing massive code repositories and recommending changes. Big tech companies have acknowledged growing reliance on LLM-generated code. Although this improves developer productivity, it also raises the risk of suboptimal and insecure code. We introduce a retrieval framework for code generation that connects geometry-aware prototype sampling with syntax-grounded interpretability analysis. By conditioning AST-based explanations on retrieved demonstrations, our method evaluates retrieval quality through both functional correctness and interpretability alignment. In our experiments, high-quality in-context learning (ICL) demonstrations make outputs easier to interpret and improve P@10, whereas poorly chosen demonstrations reduce P@10 relative to the base model. Overall, our approach highlights the importance of efficient sampling strategies for ICL, which can affect model performance on any given task.