Prompt Less, Smile More: MTP with Semantic Engineering in Lieu of Prompt Engineering

📅 2025-11-24
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
In current AI-integrated programming, static code semantics inadequately capture developer intent, runtime context, and domain knowledge, necessitating labor-intensive manual engineering for LLM prompt generation. Method: We propose Semantic Engineering—a novel paradigm that embeds natural-language semantic context as structured annotations (SemTexts) directly into the program’s abstract syntax tree, dynamically enriching code semantics without modifying the underlying language. We implement this in the Jac language to enable fully automated, template-free prompt generation. Contribution/Results: Experiments on real-world benchmarks show that our generated prompts achieve fidelity comparable to expert-crafted ones, while reducing development effort by 72%. This work extends the theoretical foundations of Meaning-Typed Programming and provides a scalable, semantics-augmented framework for LLM-native programming language design.

Technology Category

Application Category

📝 Abstract
AI-Integrated programming is emerging as a foundational paradigm for building intelligent systems with large language models (LLMs). Recent approaches such as Meaning Typed Programming (MTP) automate prompt generation by leveraging the semantics already present in code. However, many real-world applications depend on contextual cues, developer intent, and domain-specific reasoning that extend beyond what static code semantics alone can express. To address this limitation, we introduce Semantic Engineering, a lightweight method for enriching program semantics so that LLM-based systems can more accurately reflect developer intent without requiring full manual prompt design. We present Semantic Context Annotations (SemTexts), a language-level mechanism that allows developers to embed natural-language context directly into program constructs. Integrated into the Jac programming language, Semantic Engineering extends MTP to incorporate these enriched semantics during prompt generation. We further introduce a benchmark suite designed to reflect realistic AI-Integrated application scenarios. Our evaluation shows that Semantic Engineering substantially improves prompt fidelity, achieving performance comparable to Prompt Engineering while requiring significantly less developer effort.
Problem

Research questions and friction points this paper is trying to address.

Addressing limitations of static code semantics in expressing developer intent
Enriching program semantics to improve LLM-based system accuracy without manual prompts
Reducing developer effort in prompt design while maintaining comparable AI performance
Innovation

Methods, ideas, or system contributions that make the work stand out.

Semantic Engineering enriches program semantics automatically
Semantic Context Annotations embed natural-language context in code
Integrated method improves prompt fidelity with less manual effort
🔎 Similar Papers
No similar papers found.