atlas

Research map / Large language models / Agents, code and math

When Prompt Engineering Meets Software Engineering: CNL-P as Natural and Robust "APIs'' for Human-AI Interaction

ICLR 2025 · Large language models › Agents, code and math · approach: Agent instruction-following benchmarks · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes CNL-P, a controlled natural language for prompts that combines prompt-engineering best practices with software-engineering principles, plus an LLM-based NL-to-CNL-P converter and a parser/semantic linter.

Problem

Natural language prompts are ambiguous and hard to structure, and existing prompt approaches either wrap prompts in programming-language code (tight coupling, parsing overhead, inaccessible to non-technical staff) or use NL templates that lack expressiveness and state management.

Approach

A grammar-driven controlled natural language (CNL-P) with keyword-delimited modules (PERSONA, CONSTRAINTS, DATA_TYPE, VARIABLES, WORKER, CALL_API) that is converted from NL by an LLM agent and statically checked by a two-stage parser plus semantic linter, applying static analysis to natural language prompts for the first time.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use the CNL-P linting tool instead of GPT-4o to verify CNL-P promptsCNL-P static checking · 47 task instances (RQ3)accuracy: 76.60% -> 100%Helped
Use the CNL-P linting tool instead of GPT-4o to verify CNL-P promptsCNL-P static checking · 47 task instances (RQ3)redundancy rate: 19% -> 0%Helped
Convert natural-language prompts into CNL-P rather than use the original natural-language promptsLLMs completing six classification tasks · Six classification tasks (RQ2)accuracyNo clear effect
Use CNL-P rather than RISEN or RODES templatesPrompt conversion evaluation · 93 prompt instances (RQ1)modularityHelped
Use CNL-P rather than RISEN or RODES templatesPrompt conversion evaluation · 93 prompt instances (RQ1)extensibility and maintainabilityHelped
Use CNL-P rather than RISEN or RODES templatesPrompt conversion evaluation · 93 prompt instances (RQ1)process rigorHelped
Use CNL-P rather than RISEN or RODES templatesPrompt conversion evaluation by non-technical evaluators · 30 converted prompts (RQ1)readability and structural clarityMixed
Use RISEN rather than CNL-PPrompt conversion evaluation by technical evaluators · 93 prompt instances (RQ1)adherence to original intentHurt

Surprising findings

Limitations

Experimental setup

Datasets: 93 prompts from a GitHub prompt collection (113K stars) six classification tasks from a NLP task benchmark (tasks 1162, 1424, 1678, among others) 47 synthetic error task instances generated with GPT-4o

Benchmarks: six classification tasks (RQ2) 93 GitHub ChatGPT prompts converted to CNL-P/RISEN/RODES (RQ1) 47 synthetic CNL-P error instances (RQ3)

Metrics: five rubric dimension scores (0-100) accuracy redundancy rate relative accuracy vs best prompt

Baselines: RISEN RODES Natural language prompts

Builds on: RISEN RODES TypeChat Pydantic chain-of-thought prompting

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy