May 24, 2026
LLM-Assisted Ambiguity Detection in Regulatory Specifications
Kushagra Sharan
Regulatory software has a specification problem. Rules like "late filing attracts a penalty of Rs. 50 per day" are written for accountants and lawyers, not for engineers who need to know when the clock starts, whether there is a cap, and what happens when a supplier files late. The hard part is not implementing the rule once you understand it. The hard part is figuring out what the rule actually requires before you write any code.
This project builds a lightweight pipeline that does one thing: reads a natural-language regulatory requirement and asks whether it is specific enough to implement. Three sequential LLM calls handle formalization, auditing, and scoring. The first rewrites the requirement as explicit bullet-point conditions. The second attacks the formalized version for edge cases and missing definitions. The third returns a structured JSON score and verdict.
I ran it on seven GST-style compliance rules using Gemini. All seven came back underspecified, with repeated gaps around temporal boundaries, actor responsibilities, evidence requirements, and exception handling. None of that is surprising once you see it laid out, but having a system that surfaces those gaps before implementation starts is the point.
The connection to secure synthesis is direct. A formally verified implementation of an incomplete specification is not safe, it is precisely wrong. The ambiguity finder sits one step before the formal methods pipeline and flags the questions that need answers first.
The codebase is a single Python file with no external dependencies beyond the LLM API. A demo mode runs without any API key for reproducibility. The full Gemini output is committed under results/output.json.
No reviews are available yet
Cite this work
@misc {
title={
(HckPrj) LLM-Assisted Ambiguity Detection in Regulatory Specifications
},
author={
Kushagra Sharan
},
date={
5/24/26
},
organization={Apart Research},
note={Research submission to the research sprint hosted by Apart.},
howpublished={https://apartresearch.com}
}


