On Meta-Prompting (2312.06562v2)
Abstract: Modern generative LLMs are capable of interpreting input strings as instructions, or prompts, and carry out tasks based on them. Many approaches to prompting and pre-training these models involve the automated generation of these prompts: meta-prompting, or prompting to obtain prompts. We propose a theoretical framework based on category theory to generalize and describe them. This framework is flexible enough to account for stochasticity, and allows us to obtain formal results around task agnosticity and equivalence of various meta-prompting approaches. Experimentally, we test our framework in two active areas of model research: creativity and ideation. We find that user preference strongly favors (p < 0.01) the prompts generated under meta-prompting, as well as their corresponding outputs, over a series of hardcoded baseline prompts that include the original task definition. Using our framework, we argue that meta-prompting is more effective than basic prompting at generating desirable outputs.
- Awodey, S. 2010. Category Theory. Oxford University Press.
- Baez, J. 2006. Quantum quandaries: A category-theoretic perspective. In The Structural Foundations of Quantum Gravity. Oxford University Press.
- 2013. Toefl11: A corpus of non-native english. ETS Research Report Series 2013(2):i–15.
- 2008. Introduction to turing categories. Annals of Pure and Applied Logic 156(2):183–209.
- 2018. Towards compositional distributional discourse analysis. In Electronic Proceedings in Theoretical Computer Science, volume 283, 1–12. Open Publishing Association.
- 2010. Mathematical foundations for a compositional distributional model of meaning. Linguistic Analysis: Festschrift for Joachim Lambek 36:345–384.
- 2022. Categorical foundations of gradient-based learning. In Sergey, I., ed., Programming Languages and Systems, 1–28. Cham: Springer International Publishing.
- 2019. Functorial question answering. In ACT 2019.
- 2022. Argumentprompt: Activating multi-category of information for event argument extraction with automatically generated prompts. In Lu, W.; Huang, S.; Hong, Y.; and Zhou, X., eds., Natural Language Processing and Chinese Computing, 311–323. Cham: Springer International Publishing.
- 1945. General theory of natural equivalences. Trans. Amer. Math. Soc. 58:231–294.
- Elliott, C. 2018. The simple essence of automatic differentiation. Proc. ACM Program. Lang. 2(ICFP).
- 2019. An Invitation to Applied Category Theory: Seven Sketches in Compositionality. Cambridge University Press.
- 2019. Backprop as functor: A compositional perspective on supervised learning. 34th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS) 1–13.
- 2023. Representable markov categories and comparison of statistical experiments in categorical probability. Theoretical Computer Science 961:113896.
- 2021. Making pre-trained language models better few-shot learners. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), 3816–3830. Online: Association for Computational Linguistics.
- 2022. Auto-debias: Debiasing masked language models with automated biased prompts. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), 1012–1023. Dublin, Ireland: Association for Computational Linguistics.
- 2023. Exploring the capacity of pretrained language models for reasoning about actions and change. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), 4629–4643. Toronto, Canada: Association for Computational Linguistics.
- 2015. Teaching machines to read and comprehend. In NeurIPS, 1693–1701.
- 2013. Reasoning about Meaning in Natural Language with Compact Closed Categories and Frobenius Algebras. Cambridge University Press. To appear.
- 2023. LAMBADA: Backward chaining for automated reasoning in natural language. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), 6547–6568. Toronto, Canada: Association for Computational Linguistics.
- 2023. Reliability check: An analysis of GPT-3’s response to sensitive topics and prompt wording. In TrustNLP: Third Workshop on Trustworthy Natural Language Processing.
- 2022. Large language models are zero-shot reasoners. In Koyejo, S.; Mohamed, S.; Agarwal, A.; Belgrave, D.; Cho, K.; and Oh, A., eds., Advances in Neural Information Processing Systems, volume 35, 22199–22213. Curran Associates, Inc.
- 2021. The power of scale for parameter-efficient prompt tuning. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, 3045–3059. Online and Punta Cana, Dominican Republic: Association for Computational Linguistics.
- 2021. Prefix-tuning: Optimizing continuous prompts for generation. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), 4582–4597. Online: Association for Computational Linguistics.
- 2022. Generated knowledge prompting for commonsense reasoning. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), 3154–3169. Dublin, Ireland: Association for Computational Linguistics.
- 2023. Pre-train, prompt, and predict: A systematic survey of prompting methods in natural language processing. ACM Comput. Surv. 55(9).
- 1990. A category-theoretic characterization of functional completeness. Theoretical Computer Science 70(2):193–211.
- 2022. Fantastically ordered prompts and where to find them: Overcoming few-shot prompt order sensitivity. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), 8086–8098. Dublin, Ireland: Association for Computational Linguistics.
- Mac Lane, S. 1998. Categories for the Working Mathematician. Springer New York.
- 2016. Pointer sentinel mixture models.
- Open AI. 2023. GPT-4 technical report. Technical report, Open AI.
- 2022. Training language models to follow instructions with human feedback. In Koyejo, S.; Mohamed, S.; Agarwal, A.; Belgrave, D.; Cho, K.; and Oh, A., eds., Advances in Neural Information Processing Systems, volume 35, 27730–27744. Curran Associates, Inc.
- 2015. Open system categorical quantum semantics in natural language processing. In 6th Conference on Algebra and Coalgebra in Computer Science.
- 2023. Automatic prompt optimization with “gradient descent” and beam search. ArXiv abs/2305.03495.
- 2023. Reasoning with language model prompting: A survey. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), 5368–5393. Toronto, Canada: Association for Computational Linguistics.
- 2012. Morphology and Meaning: An Overview. John Benjamins Publishing Company. chapter 1, 3–46.
- Richards, T. B. 2023. Auto-GPT: An autonomous GPT-4 experiment. Accessed May 3, 2023.
- Riehl, E. 2016. Category Theory in Context. Dover Publications.
- 2022. Multitask prompted training enables zero-shot task generalization. In International Conference on Learning Representations.
- 2022. Language models are greedy reasoners: A systematic formal analysis of chain-of-thought. CoRR abs/2210.01240.
- 2021. Composing conversational negation. In Proceedings of the 4th International Conference on Applied Category Theory.
- 2021. Category theory in machine learning. In Proceedings of the 4th International Conference on Applied Category Theory.
- 2020. AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated Prompts. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), 4222–4235. Online: Association for Computational Linguistics.
- 2022. An information-theoretic approach to prompt engineering without ground truth labels. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), 819–862. Dublin, Ireland: Association for Computational Linguistics.
- Spivak, D. 2014. Category theory for the sciences.
- 2023. Self-instruct: Aligning language models with self-generated instructions. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics. Online: Association for Computational Linguistics.
- 2022a. Finetuned language models are zero-shot learners. In International Conference on Learning Representations.
- 2022b. Chain-of-thought prompting elicits reasoning in large language models. In Koyejo, S.; Mohamed, S.; Agarwal, A.; Belgrave, D.; Cho, K.; and Oh, A., eds., Advances in Neural Information Processing Systems, volume 35, 24824–24837. Curran Associates, Inc.
- 2023. Can LLMs express their uncertainty? an empirical evaluation of confidence elicitation in LLMs. ArXiv abs/2306.13063.
- 2023. React: Synergizing reasoning and acting in language models. In The Eleventh International Conference on Learning Representations.
- 2023. Automatic chain of thought prompting in large language models. In The Eleventh International Conference on Learning Representations (ICLR 2023).
- 2023. Large language models are human-level prompt engineers. In The Eleventh International Conference on Learning Representations.