DeepCodeSeek: Real-time API-ophaling voor contextbewuste codegeneratie
DeepCodeSeek: Real-Time API Retrieval for Context-Aware Code Generation
September 30, 2025
Auteurs: Esakkivel Esakkiraja, Denis Akhiyarov, Aditya Shanmugham, Chitra Ganapathy
cs.AI
Samenvatting
Huidige zoektechnieken zijn beperkt tot standaard RAG query-documenttoepassingen. In dit artikel stellen we een nieuwe techniek voor om de code en index uit te breiden voor het voorspellen van de benodigde API's, waardoor hoogwaardige, end-to-end codegeneratie direct mogelijk wordt voor auto-completion en agentische AI-toepassingen. We pakken het probleem van API-lekken in huidige code-naar-code benchmarkdatasets aan door een nieuwe dataset te introduceren die is opgebouwd uit real-world ServiceNow Script Includes, waardoor de uitdaging van onduidelijke API-gebruiksintentie in de code wordt vastgelegd. Onze evaluatiemetrics laten zien dat deze methode een top-40 retrievalnauwkeurigheid van 87,86% bereikt, waardoor de kritieke context met API's die nodig is voor succesvolle downstream codegeneratie wordt geboden. Om real-time voorspellingen mogelijk te maken, ontwikkelen we een uitgebreide post-trainingspipeline die een compacte 0,6B reranker optimaliseert door middel van synthetische datasetgeneratie, supervised fine-tuning en reinforcement learning. Deze aanpak stelt onze compacte reranker in staat om een veel groter 8B-model te overtreffen, terwijl de latentie met 2,5x wordt verminderd, waardoor de nuances van ondernemingsspecifieke code effectief worden aangepakt zonder de rekenkundige overhead van grotere modellen.
English
Current search techniques are limited to standard RAG query-document
applications. In this paper, we propose a novel technique to expand the code
and index for predicting the required APIs, directly enabling high-quality,
end-to-end code generation for auto-completion and agentic AI applications. We
address the problem of API leaks in current code-to-code benchmark datasets by
introducing a new dataset built from real-world ServiceNow Script Includes that
capture the challenge of unclear API usage intent in the code. Our evaluation
metrics show that this method achieves 87.86% top-40 retrieval accuracy,
allowing the critical context with APIs needed for successful downstream code
generation. To enable real-time predictions, we develop a comprehensive
post-training pipeline that optimizes a compact 0.6B reranker through synthetic
dataset generation, supervised fine-tuning, and reinforcement learning. This
approach enables our compact reranker to outperform a much larger 8B model
while maintaining 2.5x reduced latency, effectively addressing the nuances of
enterprise-specific code without the computational overhead of larger models.