mlsanityData to 14 Oct 2026

GuardRails: Automated Suggestions for Clarifying Ambiguous Purpose Statements

arXiv 2312.08189 ↗First posted 13 Dec 2023cs.SEcited by 1

Not on the map. Why?

Abstract (arXiv)

Before implementing a function, programmers are encouraged to write a purpose statement i.e., a short, natural-language explanation of what the function computes. A purpose statement may be ambiguous i.e., it may fail to specify the intended behaviour when two or more inequivalent computations are plausible on certain inputs. Our paper makes four contributions. First, we propose a novel heuristic that suggests such inputs using Large Language Models (LLMs). Using these suggestions, the programmer may choose to clarify the purpose statement (e.g., by providing a functional example that specifies the intended behaviour on such an input). Second, to assess the quality of inputs suggested by our heuristic, and to facilitate future research, we create an open dataset of purpose statements with known ambiguities. Third, we compare our heuristic against GitHub Copilot's Chat feature, which can suggest similar inputs when prompted to generate unit tests. Fourth, we provide an open-source implementation of our heuristic as an extension to Visual Studio Code for the Python programming language, where purpose statements and functional examples are specified as docstrings and doctests respectively. We believe that this tool will be particularly helpful to novice programmers and instructors.

Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). First posted on arXiv 13 Dec 2023.

Builds on

No reference list yet.

Built on by

Cited by year

Citing papers per year: 2024: 1.

1 paper.

Similar, not cited

Close in wording, no citation either way

  1. 2025From Context to Intent: Reasoning-Guided Function-Level Code Completion
  2. 2024SemCoder: Training Code Language Models with Comprehensive Semantics Reasoning
  3. 2025On Code-Induced Reasoning in LLMs
  4. 2025Ambiguity Resolution with Human Feedback for Code Writing Tasks
  5. 2023Reasoning about Ambiguous Definite Descriptions
  6. 2025Can Large Language Models Reason About Complex Execution Paths? An Empirical Study on Python
  7. 2023ClarifyGPT: Empowering LLM-based Code Generation with Intention Clarification
  8. 2024Towards More Trustworthy and Interpretable LLMs for Code through Syntax-Grounded Explanations