DeepCodeSeek: Real-Time API Retrieval for Context-Aware Code Generation
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.
68dd47440898d7e69e16c9b8
Esakkivel Esakkiraja
admin_assigned
2025-10-02T02:59:01.984Z
6333213e66b27c4ad195bbc7
/avatars/0f911fee8c173543a6e0cbd78a940676.svg
Esakkivel Esakkiraja
user
dotvignesh
68dd47440898d7e69e16c9b9
Denis Akhiyarov
claimed_verified
2025-10-01T15:31:13.054Z
65ea6558b985ae912c57b294
/avatars/54eeba9ce8cb5bf35edfa8fad76a813d.svg
Denis Akhiyarov
user
dtanow
68dd47440898d7e69e16c9ba
Aditya Shanmugham
68dd47440898d7e69e16c9bb
Chitra Ganapathy
DeepCodeSeek: Real-Time API Retrieval for Context-Aware Code Generation
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.
A novel technique for predicting APIs and generating code in real-time using a compact reranker outperforms larger models with reduced latency, addressing API leaks and unclear usage intent in enterprise code.
API leaks code generation auto-completion agentic AI ServiceNow Script Includes top-40 retrieval accuracy post-training pipeline synthetic dataset generation supervised fine-tuning reinforcement learning compact reranker latency