Automatic prompt engineering is a process in artificial intelligence that automates the generation, evaluation, and refinement of natural language instructions used to guide large language models toward desired outputs. Rather than relying on manual trial-and-error prompt design by human users, this approach treats prompt construction as an automated search and optimization task. In practice, a model or search algorithm proposes candidate prompts based on task descriptions or input-output demonstrations, evaluates their effectiveness against specific performance metrics, and selects or iteratively improves the highest-scoring prompts to maximize task accuracy and alignment.