ChatPaper.aiChatPaper

Обучение принципам на основе ошибок в контексте

In-Context Principle Learning from Mistakes

February 8, 2024
Авторы: Tianjun Zhang, Aman Madaan, Luyu Gao, Steven Zheng, Swaroop Mishra, Yiming Yang, Niket Tandon, Uri Alon
cs.AI

Аннотация

Обучение в контексте (ICL, также известное как few-shot prompting) стало стандартным методом адаптации крупных языковых моделей (LLM) к конкретным задачам путем обучения на нескольких примерах входных и выходных данных. Однако все подходы, основанные на ICL, обучаются только на правильных парах входных и выходных данных. В данной работе мы пересматриваем эту парадигму, стремясь извлечь больше пользы из предоставленных примеров. Мы представляем метод Learning Principles (LEAP): сначала мы намеренно заставляем модель совершать ошибки на этих примерах; затем анализируем эти ошибки и извлекаем из них явные "принципы", специфичные для задачи, которые помогают решать схожие проблемы и избегать типичных ошибок; наконец, мы используем эти принципы вместе с исходными примерами для ответа на новые тестовые вопросы. Мы оцениваем LEAP на широком спектре бенчмарков, включая многошаговый вопросно-ответный анализ (Hotpot QA), текстовый вопросно-ответный анализ (DROP), сложные задачи на рассуждение из Big-Bench Hard и математические задачи (GSM8K и MATH); на всех этих бенчмарках LEAP улучшает результаты самых мощных доступных LLM, таких как GPT-3.5-turbo, GPT-4, GPT-4 turbo и Claude-2.1. Например, LEAP улучшает стандартный few-shot prompting с использованием GPT-4 на 7,5% в DROP и на 3,3% в HotpotQA. Важно отметить, что LEAP не требует дополнительных входных данных или примеров по сравнению со стандартными настройками few-shot prompting.
English
In-context learning (ICL, also known as few-shot prompting) has been the standard method of adapting LLMs to downstream tasks, by learning from a few input-output examples. Nonetheless, all ICL-based approaches only learn from correct input-output pairs. In this paper, we revisit this paradigm, by learning more from the few given input-output examples. We introduce Learning Principles (LEAP): First, we intentionally induce the model to make mistakes on these few examples; then we reflect on these mistakes, and learn explicit task-specific "principles" from them, which help solve similar problems and avoid common mistakes; finally, we prompt the model to answer unseen test questions using the original few-shot examples and these learned general principles. We evaluate LEAP on a wide range of benchmarks, including multi-hop question answering (Hotpot QA), textual QA (DROP), Big-Bench Hard reasoning, and math problems (GSM8K and MATH); in all these benchmarks, LEAP improves the strongest available LLMs such as GPT-3.5-turbo, GPT-4, GPT-4 turbo and Claude-2.1. For example, LEAP improves over the standard few-shot prompting using GPT-4 by 7.5% in DROP, and by 3.3% in HotpotQA. Importantly, LEAP does not require any more input or examples than the standard few-shot prompting settings.
PDF181December 15, 2024