Semantics-Behavior Coupled Bayesian Optimization for Efficient Black-Box Prompt Search

dc.contributor.authorWu, Ruotian
dc.date.accessioned2026-08-19T18:54:58Z
dc.date.issued2026-08-19
dc.date.submitted2026-08-07
dc.description.abstractLarge language models (LLMs) are highly sensitive to prompt design, making prompt optimization important in black-box settings where models are accessible only through API calls. This thesis proposes DualBO, a semantics-behavior coupled Bayesian optimization framework for efficient prompt search. DualBO represents each prompt using two complementary views: a behavioral correctness vector computed on a controlled minibatch, and a semantic embedding of the prompt text. These views are combined in a dynamic Gaussian Process surrogate, where semantic similarity helps reduce uncertainty early in optimization and behavioral evidence provides stronger task alignment as more prompts are evaluated. DualBO also introduces staged strategy-oriented candidate generation, which first generates diverse rewriting strategies and then instantiates them into concrete prompt candidates. This improves search-space coverage compared with direct local rewriting. Experiments on ETHOS, ARC, MMLU-Pro, and HotpotQA using GPT-5.4-mini and DeepSeek-V3.2 show that DualBO consistently improves over semantic-only and behavior-only Bayesian optimization baselines. It is also competitive with reflection-based methods such as Reflexion and ProTeGi while requiring substantially fewer model calls. Overall, this thesis demonstrates that combining semantic smoothness, behavior-grounded task alignment, and diversity-aware candidate generation improves the stability and efficiency of black-box prompt optimization under limited evaluation budgets.
dc.identifier.urihttps://hdl.handle.net/10012/23991
dc.language.isoen
dc.pendingfalse
dc.publisherUniversity of Waterlooen
dc.subjectBayesian Optimization
dc.subjectPrompt Optimization
dc.subjectReflexion
dc.subjectLLM
dc.titleSemantics-Behavior Coupled Bayesian Optimization for Efficient Black-Box Prompt Search
dc.typeMaster Thesis
uws-etd.degreeMaster of Mathematics
uws-etd.degree.departmentDavid R. Cheriton School of Computer Science
uws-etd.degree.disciplineComputer Science
uws-etd.degree.grantorUniversity of Waterlooen
uws-etd.embargo.terms0
uws.contributor.advisorPoupart, Pascal
uws.contributor.affiliation1Faculty of Mathematics
uws.peerReviewStatusUnrevieweden
uws.published.cityWaterlooen
uws.published.countryCanadaen
uws.published.provinceOntarioen
uws.scholarLevelGraduateen
uws.typeOfResourceTexten

Files

Original bundle

Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
Wu_Ruotian.pdf
Size:
2.31 MB
Format:
Adobe Portable Document Format

License bundle

Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
license.txt
Size:
6.4 KB
Format:
Item-specific license agreed upon to submission
Description: