cs.SENov 24, 2025

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

Authors: Jayanaka L. Dantanarayana, Savini Kashmira, Xiaoyu Ma, Krisztian Flautner, Lingjia Tang, Jason Mars

Organizations: University of Michigan, Ann Arbor, USA

Abstract

AI-integrated applications increasingly rely on large language models (LLMs), but their intended behavior is not always fully specified by code. Meaning Typed Programming (MTP) automates prompt construction from program structure, yet selection criteria, output requirements, and application policies can remain unstated. We introduce Semantic Engineering, a methodology for identifying such missing intent and selectively adding and refining model guidance. We realize this methodology through Semantic Context Annotations (SemTexts), a dedicated language mechanism independent of documentation and schema metadata. SemTexts associate natural-language instructions with individual program entities and use declaration scopes to determine where they apply. Our implementation extends the Jac compiler and MTP runtime to preserve these associations and select applicable guidance during automatic prompt construction. We evaluate Semantic Engineering on seven AI-integrated applications and two standard benchmarks across three models. Across the applications, it achieves a 5.46-fold reduction in integration lines of code relative to Prompt Engineering while delivering equal or better task performance in most model-application settings, reaching up to 1.83 times the task performance of Prompt Engineering.

Figures & tables

Explore similar work

CardsList
  1. Imprompt: A Language Framework for Prompt Programming

    Jul 13, 2026Chentian Wu, Shengyuan Yang, Adithya MuraliLLM PromptingPrompt Engineering

  2. A Tutorial on Prompt Engineering: From Messy Thoughts to AI Workflows

    Sep 5, 2026Erfan Loweimi, Hadi Daneshvar, Samira Loveymi +4Prompt EngineeringStructured Prompting