What Makes Good In-Context Examples for GPT-$3$?. Liu, J., Shen, D., Zhang, Y., Dolan, B., Carin, L., & Chen, W. January, 2021. arXiv:2101.06804
Paper doi abstract bibtex GPT-$3$ has attracted lots of attention due to its superior performance across a wide range of NLP tasks, especially with its powerful and versatile in-context few-shot learning ability. Despite its success, we found that the empirical results of GPT-$3$ depend heavily on the choice of in-context examples. In this work, we investigate whether there are more effective strategies for judiciously selecting in-context examples (relative to random sampling) that better leverage GPT-$3$'s few-shot capabilities. Inspired by the recent success of leveraging a retrieval module to augment large-scale neural network models, we propose to retrieve examples that are semantically-similar to a test sample to formulate its corresponding prompt. Intuitively, the in-context examples selected with such a strategy may serve as more informative inputs to unleash GPT-$3$'s extensive knowledge. We evaluate the proposed approach on several natural language understanding and generation benchmarks, where the retrieval-based prompt selection approach consistently outperforms the random baseline. Moreover, it is observed that the sentence encoders fine-tuned on task-related datasets yield even more helpful retrieval results. Notably, significant gains are observed on tasks such as table-to-text generation (41.9% on the ToTTo dataset) and open-domain question answering (45.5% on the NQ dataset). We hope our investigation could help understand the behaviors of GPT-$3$ and large-scale pre-trained LMs in general and enhance their few-shot capabilities.
@misc{liuWhatMakesGood2021a,
title = {What {Makes} {Good} {In}-{Context} {Examples} for {GPT}-\$3\$?},
url = {http://arxiv.org/abs/2101.06804},
doi = {10.48550/arXiv.2101.06804},
abstract = {GPT-\$3\$ has attracted lots of attention due to its superior performance across a wide range of NLP tasks, especially with its powerful and versatile in-context few-shot learning ability. Despite its success, we found that the empirical results of GPT-\$3\$ depend heavily on the choice of in-context examples. In this work, we investigate whether there are more effective strategies for judiciously selecting in-context examples (relative to random sampling) that better leverage GPT-\$3\$'s few-shot capabilities. Inspired by the recent success of leveraging a retrieval module to augment large-scale neural network models, we propose to retrieve examples that are semantically-similar to a test sample to formulate its corresponding prompt. Intuitively, the in-context examples selected with such a strategy may serve as more informative inputs to unleash GPT-\$3\$'s extensive knowledge. We evaluate the proposed approach on several natural language understanding and generation benchmarks, where the retrieval-based prompt selection approach consistently outperforms the random baseline. Moreover, it is observed that the sentence encoders fine-tuned on task-related datasets yield even more helpful retrieval results. Notably, significant gains are observed on tasks such as table-to-text generation (41.9\% on the ToTTo dataset) and open-domain question answering (45.5\% on the NQ dataset). We hope our investigation could help understand the behaviors of GPT-\$3\$ and large-scale pre-trained LMs in general and enhance their few-shot capabilities.},
urldate = {2024-10-28},
publisher = {arXiv},
author = {Liu, Jiachang and Shen, Dinghan and Zhang, Yizhe and Dolan, Bill and Carin, Lawrence and Chen, Weizhu},
month = jan,
year = {2021},
note = {arXiv:2101.06804},
keywords = {Computer Science - Computation and Language},
}
Downloads: 0
{"_id":"wHABbNRQwKW9f2pAX","bibbaseid":"liu-shen-zhang-dolan-carin-chen-whatmakesgoodincontextexamplesforgpt3-2021","author_short":["Liu, J.","Shen, D.","Zhang, Y.","Dolan, B.","Carin, L.","Chen, W."],"bibdata":{"bibtype":"misc","type":"misc","title":"What Makes Good In-Context Examples for GPT-$3$?","url":"http://arxiv.org/abs/2101.06804","doi":"10.48550/arXiv.2101.06804","abstract":"GPT-$3$ has attracted lots of attention due to its superior performance across a wide range of NLP tasks, especially with its powerful and versatile in-context few-shot learning ability. Despite its success, we found that the empirical results of GPT-$3$ depend heavily on the choice of in-context examples. In this work, we investigate whether there are more effective strategies for judiciously selecting in-context examples (relative to random sampling) that better leverage GPT-$3$'s few-shot capabilities. Inspired by the recent success of leveraging a retrieval module to augment large-scale neural network models, we propose to retrieve examples that are semantically-similar to a test sample to formulate its corresponding prompt. Intuitively, the in-context examples selected with such a strategy may serve as more informative inputs to unleash GPT-$3$'s extensive knowledge. We evaluate the proposed approach on several natural language understanding and generation benchmarks, where the retrieval-based prompt selection approach consistently outperforms the random baseline. Moreover, it is observed that the sentence encoders fine-tuned on task-related datasets yield even more helpful retrieval results. Notably, significant gains are observed on tasks such as table-to-text generation (41.9% on the ToTTo dataset) and open-domain question answering (45.5% on the NQ dataset). We hope our investigation could help understand the behaviors of GPT-$3$ and large-scale pre-trained LMs in general and enhance their few-shot capabilities.","urldate":"2024-10-28","publisher":"arXiv","author":[{"propositions":[],"lastnames":["Liu"],"firstnames":["Jiachang"],"suffixes":[]},{"propositions":[],"lastnames":["Shen"],"firstnames":["Dinghan"],"suffixes":[]},{"propositions":[],"lastnames":["Zhang"],"firstnames":["Yizhe"],"suffixes":[]},{"propositions":[],"lastnames":["Dolan"],"firstnames":["Bill"],"suffixes":[]},{"propositions":[],"lastnames":["Carin"],"firstnames":["Lawrence"],"suffixes":[]},{"propositions":[],"lastnames":["Chen"],"firstnames":["Weizhu"],"suffixes":[]}],"month":"January","year":"2021","note":"arXiv:2101.06804","keywords":"Computer Science - Computation and Language","bibtex":"@misc{liuWhatMakesGood2021a,\n\ttitle = {What {Makes} {Good} {In}-{Context} {Examples} for {GPT}-\\$3\\$?},\n\turl = {http://arxiv.org/abs/2101.06804},\n\tdoi = {10.48550/arXiv.2101.06804},\n\tabstract = {GPT-\\$3\\$ has attracted lots of attention due to its superior performance across a wide range of NLP tasks, especially with its powerful and versatile in-context few-shot learning ability. Despite its success, we found that the empirical results of GPT-\\$3\\$ depend heavily on the choice of in-context examples. In this work, we investigate whether there are more effective strategies for judiciously selecting in-context examples (relative to random sampling) that better leverage GPT-\\$3\\$'s few-shot capabilities. Inspired by the recent success of leveraging a retrieval module to augment large-scale neural network models, we propose to retrieve examples that are semantically-similar to a test sample to formulate its corresponding prompt. Intuitively, the in-context examples selected with such a strategy may serve as more informative inputs to unleash GPT-\\$3\\$'s extensive knowledge. We evaluate the proposed approach on several natural language understanding and generation benchmarks, where the retrieval-based prompt selection approach consistently outperforms the random baseline. Moreover, it is observed that the sentence encoders fine-tuned on task-related datasets yield even more helpful retrieval results. Notably, significant gains are observed on tasks such as table-to-text generation (41.9\\% on the ToTTo dataset) and open-domain question answering (45.5\\% on the NQ dataset). We hope our investigation could help understand the behaviors of GPT-\\$3\\$ and large-scale pre-trained LMs in general and enhance their few-shot capabilities.},\n\turldate = {2024-10-28},\n\tpublisher = {arXiv},\n\tauthor = {Liu, Jiachang and Shen, Dinghan and Zhang, Yizhe and Dolan, Bill and Carin, Lawrence and Chen, Weizhu},\n\tmonth = jan,\n\tyear = {2021},\n\tnote = {arXiv:2101.06804},\n\tkeywords = {Computer Science - Computation and Language},\n}\n\n\n\n\n\n\n\n\n\n\n\n","author_short":["Liu, J.","Shen, D.","Zhang, Y.","Dolan, B.","Carin, L.","Chen, W."],"key":"liuWhatMakesGood2021a","id":"liuWhatMakesGood2021a","bibbaseid":"liu-shen-zhang-dolan-carin-chen-whatmakesgoodincontextexamplesforgpt3-2021","role":"author","urls":{"Paper":"http://arxiv.org/abs/2101.06804"},"keyword":["Computer Science - Computation and Language"],"metadata":{"authorlinks":{}},"downloads":0,"html":""},"bibtype":"misc","biburl":"https://bibbase.org/zotero/saurabhr","dataSources":["nxjWwW7fWbb5tfpKz"],"keywords":["computer science - computation and language"],"search_terms":["makes","good","context","examples","gpt","liu","shen","zhang","dolan","carin","chen"],"title":"What Makes Good In-Context Examples for GPT-$3$?","year":2021}