Strings from the Library of Babel: Random Sampling as a Strong Baseline for Prompt Optimisation
Yao Lu, Jiayi Wang, Raphael Tang, Sebastian Riedel, Pontus Stenetorp
Abstract
Recent prompt optimisation approaches use the generative nature of language models to produce prompts – even rivaling the performance of human-curated prompts. In this paper, we demonstrate that randomly sampling tokens from the model vocabulary as “separators” can be as effective as language models for prompt-style text classification. Our experiments show that random separators are competitive baselines, having less than a 1% difference compared to previous self-optimisation methods and showing a 12% average relative improvement over strong human baselines across nine text classification tasks and eight language models. We further analyse this phenomenon in detail using three different random generation strategies, establishing that the language space is rich with potentially good separators, with a greater than 40% average chance that a randomly drawn separator performs better than human-curated separators. These observations challenge the common assumption that an effective prompt should be human readable or task relevant and establish a strong baseline for prompt optimisation research.- Anthology ID:
- 2024.naacl-long.122
- Volume:
- Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers)
- Month:
- June
- Year:
- 2024
- Address:
- Mexico City, Mexico
- Editors:
- Kevin Duh, Helena Gomez, Steven Bethard
- Venue:
- NAACL
- SIG:
- Publisher:
- Association for Computational Linguistics
- Note:
- Pages:
- 2221–2231
- Language:
- URL:
- https://aclanthology.org/2024.naacl-long.122
- DOI:
- 10.18653/v1/2024.naacl-long.122
- Cite (ACL):
- Yao Lu, Jiayi Wang, Raphael Tang, Sebastian Riedel, and Pontus Stenetorp. 2024. Strings from the Library of Babel: Random Sampling as a Strong Baseline for Prompt Optimisation. In Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), pages 2221–2231, Mexico City, Mexico. Association for Computational Linguistics.
- Cite (Informal):
- Strings from the Library of Babel: Random Sampling as a Strong Baseline for Prompt Optimisation (Lu et al., NAACL 2024)
- PDF:
- https://preview.aclanthology.org/nschneid-patch-4/2024.naacl-long.122.pdf