Nanyang Technological University
EvoPrompt: evolutionary computation for optimizing prompts in large language models
Abstract
dc:description.abstractWhile large language models (LLMs) are good at reasoning, using cloud APIs often leads to issues with latency, cost, and privacy. On the other hand, edge AI makes it possible to deploy small language models (SLMs), even though many people assume they lack advanced inference abilities. Current prompt engineering methods typically depend on closed-source APIs, which creates a large gap in local optimisation. This thesis introduces the EvoPrompt framework, a collaborative model between edge and cloud systems that helps offload prompt optimisation tasks to edge devices. The Local Evolutionary Engine (LEE) is a unified system driven by a single efficient SLM that uses genetic algorithms for semantic crossover and mutation of queries. The Quality Router, powered by an LLM, acts as a dynamic gateway, ending the evolutionary loop only when strict quality standards are met. This ensures that only refined, privacy-safe instructions reach the cloud, solving the ``Garbage In, Garbage Out'' problem. Evaluations on MATH-500 reveal a ``1B Paradox'': with local evolution, resource-constrained SLMs show reasoning performance that far exceeds standard prompting. EvoPrompt improved the strict accuracy of Llama 3.2 1B (from 23.2% to 83.0%), Gemma 3 1B (from 37.0% to 87.2%), and Qwen 2.5 1.5B (from 42.2% to 92.2%), while bringing a Reinforcement Learning baseline (DeepSeek-R1) up to 97.6%. Finally, EvoPrompt creates a Pareto-efficient frontier between local compute costs and cloud token savings, making prompt engineering more accessible for future autonomous, privacy-focused Edge AI systems.
Degree
thesis:*- College dc:contributor.school
- School of Electrical and Electronic Engineering
- Grantor dc:publisher
- Nanyang Technological University
- Year dc:date.issued
- 2026
Author and committee
dc:creator, dc:contributor.*- Author dc:creator
-
- Wan, Tongxin
- Advisor dc:contributor.supervisor
-
- Mao Kezhi
Subjects
dc:subject × 1Rights
- Language dc:language.iso
- en
Identifiers
dc:identifier.*- Handle dc:identifier.uri
- https://hdl.handle.net/10356/213750