Prompt Space Optimizing Few-shot Reasoning Success with Large Language Models

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Shi, Fobo, Qing, Peijun, Yang, Dong, Wang, Nan, Lei, Youbo, Lu, Haonan, Lin, Xiaodong, Li, Duantengchuan
Format: Preprint
Published: 2023
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866911817198993408
author Shi, Fobo
Qing, Peijun
Yang, Dong
Wang, Nan
Lei, Youbo
Lu, Haonan
Lin, Xiaodong
Li, Duantengchuan
author_facet Shi, Fobo
Qing, Peijun
Yang, Dong
Wang, Nan
Lei, Youbo
Lu, Haonan
Lin, Xiaodong
Li, Duantengchuan
contents Prompt engineering is an essential technique for enhancing the abilities of large language models (LLMs) by providing explicit and specific instructions. It enables LLMs to excel in various tasks, such as arithmetic reasoning, question answering, summarization, relation extraction, machine translation, and sentiment analysis. Researchers have been actively exploring different prompt engineering strategies, such as Chain of Thought (CoT), Zero-CoT, and In-context learning. However, an unresolved problem arises from the fact that current approaches lack a solid mathematical solution for determining optimal prompts. To address this issue in prompt engineering, we propose a new and effective approach called Prompt Space. Our methodology utilizes text embeddings to obtain basis vectors by matrix decomposition, and then constructs a space for representing all prompts. Prompt Space significantly outperforms state-of-the-art prompt paradigms on ten public reasoning benchmarks. Notably, without the help of the CoT method and the prompt "Let's think step by step", Prompt Space shows superior performance over the few-shot method. Overall, our approach provides a robust and effective mathematical framework for selecting simple and effective prompts. This advancement marks a significant step towards improving prompt engineering for a wide variety of applications in LLMs. Our code is publicly available at \textcolor{blue}{\url{https://github.com/YouBLEI/Prompt-Space}}
format Preprint
id arxiv_https___arxiv_org_abs_2306_03799
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle Prompt Space Optimizing Few-shot Reasoning Success with Large Language Models
Shi, Fobo
Qing, Peijun
Yang, Dong
Wang, Nan
Lei, Youbo
Lu, Haonan
Lin, Xiaodong
Li, Duantengchuan
Computation and Language
Prompt engineering is an essential technique for enhancing the abilities of large language models (LLMs) by providing explicit and specific instructions. It enables LLMs to excel in various tasks, such as arithmetic reasoning, question answering, summarization, relation extraction, machine translation, and sentiment analysis. Researchers have been actively exploring different prompt engineering strategies, such as Chain of Thought (CoT), Zero-CoT, and In-context learning. However, an unresolved problem arises from the fact that current approaches lack a solid mathematical solution for determining optimal prompts. To address this issue in prompt engineering, we propose a new and effective approach called Prompt Space. Our methodology utilizes text embeddings to obtain basis vectors by matrix decomposition, and then constructs a space for representing all prompts. Prompt Space significantly outperforms state-of-the-art prompt paradigms on ten public reasoning benchmarks. Notably, without the help of the CoT method and the prompt "Let's think step by step", Prompt Space shows superior performance over the few-shot method. Overall, our approach provides a robust and effective mathematical framework for selecting simple and effective prompts. This advancement marks a significant step towards improving prompt engineering for a wide variety of applications in LLMs. Our code is publicly available at \textcolor{blue}{\url{https://github.com/YouBLEI/Prompt-Space}}
title Prompt Space Optimizing Few-shot Reasoning Success with Large Language Models
topic Computation and Language
url https://arxiv.org/abs/2306.03799