Delulu-FIM
The first execution-verified multilingual benchmark for detecting and mitigating code hallucinations in fill-in-the-middle completion.
Code assistants such as GitHub Copilot often complete code in fill-in-the-middle (FIM) mode: the model sees the code before and after the cursor and writes the missing middle. Many of their worst mistakes are hallucinations, meaning calls to APIs, attributes or functions that look plausible but don’t exist. I built this work as a Student Researcher with Microsoft’s Code|AI team.
Delulu-FIM benchmark
- The first execution-verified, multilingual benchmark for hallucination detection in FIM code generation.
- Every hallucinated sample is confirmed by actually running the code, not by heuristics.
- Paper: arXiv:2605.07024 (preprint).
- Dataset: microsoft/delulu-fim-benchmark on Hugging Face.
Synthetic hallucinations, real gains
A follow-up paper uses frontier models to generate hard negatives: realistic but hallucinated completions. FIM models are then fine-tuned to prefer the verified answer. This improves Qwen-7B exact match by 22% on code-hallucination benchmarks. Preprint.
In production
I also designed a multi-turn routing algorithm for VS Code and GitHub CLI Auto mode. In production, it reduced request cancellations by 9% and user dissatisfaction by 21%.