Как уже отмечалось, для успешного использования универсального робота — его требуется научить разбивать сложные цели/команды на простые выполнимые задачи. Простого добавления к промпту «Let’s think step by step.» [1] может оказаться недостаточно.
Как же тогда научить робота думать?
Возможным ответом может быть работа, описывающая подход Self-Discover [2], который объединяет различные техники рассуждений, а большая языковая модель (LLM, БЯМ) уже сама выбирает какие варианты рассуждения лучше всего подходит под конкретную задачу.
Подход Self-Discover состоит из 3 шагов:
- Выбор: сначала выбираются какие варианты рассуждений лучше всего подходят для полученного задания,
- Адаптация: выбранный вариант рассуждений адаптируется под конкретную задачу,
- Реализация: адаптированная схема рассуждений применяется для генерации ответа.
Всего качестве базы типов рассуждений в Self-Discover используется 39 типа рассуждения, взятые из работы Promptbreeder [3] от Google DeepMind .
reasoning_modules = """ 1 How could I devise an experiment to help solve that problem? 2 Make a list of ideas for solving this problem, and apply them one by one to the problem to see if any progress can be made. 3 How could I measure progress on this problem? 4 How can I simplify the problem so that it is easier to solve? 5 What are the key assumptions underlying this problem? 6 What are the potential risks and drawbacks of each solution? 7 What are the alternative perspectives or viewpoints on this problem? 8 What are the long-term implications of this problem and its solutions? 9 How can I break down this problem into smaller, more manageable parts? 10 Critical Thinking: This style involves analyzing the problem from different perspectives, questioning assumptions, and evaluating the evidence or information available. It focuses on logical reasoning, evidence-based decision-making, and identifying potential biases or flaws in thinking. 11 Try creative thinking, generate innovative and out-of-the-box ideas to solve the problem. Explore unconventional solutions, thinking beyond traditional boundaries, and encouraging imagination and originality. 12 Seek input and collaboration from others to solve the problem. Emphasize teamwork, open communication, and leveraging the diverse perspectives and expertise of a group to come up with effective solutions. 13 Use systems thinking: Consider the problem as part of a larger system and understanding the interconnectedness of various elements. Focuses on identifying the underlying causes, feedback loops, and interdependencies that influence the problem, and developing holistic solutions that address the system as a whole. 14 Use Risk Analysis: Evaluate potential risks, uncertainties, and tradeoffs associated with different solutions or approaches to a problem. Emphasize assessing the potential consequences and likelihood of success or failure, and making informed decisions based on a balanced analysis of risks and benefits. 15 Use Reflective Thinking: Step back from the problem, take the time for introspection and self-reflection. Examine personal biases, assumptions, and mental models that may influence problem-solving, and being open to learning from past experiences to improve future approaches. 16 What is the core issue or problem that needs to be addressed? 17 What are the underlying causes or factors contributing to the problem? 18 Are there any potential solutions or strategies that have been tried before? If yes, what were the outcomes and lessons learned? 19 What are the potential obstacles or challenges that might arise in solving this problem? 20 Are there any relevant data or information that can provide insights into the problem? If yes, what data sources are available, and how can they be analyzed? 21 Are there any stakeholders or individuals who are directly affected by the problem? What are their perspectives and needs? 22 What resources (financial, human, technological, etc.) are needed to tackle the problem effectively? 23 How can progress or success in solving the problem be measured or evaluated? 24 What indicators or metrics can be used? 25 Is the problem a technical or practical one that requires a specific expertise or skill set? Or is it more of a conceptual or theoretical problem? 26 Does the problem involve a physical constraint, such as limited resources, infrastructure, or space? 27 Is the problem related to human behavior, such as a social, cultural, or psychological issue? 28 Does the problem involve decision-making or planning, where choices need to be made under uncertainty or with competing objectives? 29 Is the problem an analytical one that requires data analysis, modeling, or optimization techniques? 30 Is the problem a design challenge that requires creative solutions and innovation? 31 Does the problem require addressing systemic or structural issues rather than just individual instances? 32 Is the problem time-sensitive or urgent, requiring immediate attention and action? 33 What kinds of solution typically are produced for this kind of problem specification? 34 Given the problem specification and the current best solution, have a guess about other possible solutions. 35 Let's imagine the current best solution is totally wrong, what other ways are there to think about the problem specification? 36 What is the best way to modify this current best solution, given what you know about these kinds of problem specification? 37 Ignoring the current best solution, create an entirely new solution to the problem. 38 Let's think step by step. 39 Let's make a step by step plan and implement it with good notion and explanation"""
Разумеется, «Let’s think step by step.» там тоже есть (см. модуль под номером 38), но есть и подходы для разбиения на подзадачи, креативного, критического и системного мышления и т.д.
Выбор
Из всех 39 модулей мышления, сама БЯМ должна выбрать 3 наиболее подходящих.
select_prompt = """ In order to solve the given task: <Task> {Task} </Task> Select several modules that are crucial for solving the tasks above from all the reasoning module description given below: {resonining_modules} """
Адаптация
Далее, БЯМ переформулирует выбранные модули в более подходящий вид под заданную задачу.
adapt_prompt = """ Rephrase and specify each reasoning module so that it better helps solving the task: <Task> {Task} </Task> SELECTED module descriptions: {selected_modules} Adapt each reasoning module description to better solve the task: """
Реализация
И наконец, из полученных адаптированных описаний формируется план действий.
implement_prompt = """ Operationalize the reasoning modules into a step-by-step reasoning plan in JSON format Example task: <Task> {Task} </Task> ADAPTED module descriptions: {adapted_modules} Implement a reasoning structure to generalise similar task to follow step-by-step and arrive at correct answers """
Примечание: приведённые промпты взяты из проекта SELF-DISCOVER FRAMEWORK, который реализует подход Self-Discover.
Авторы показали, что данный подход позволяет БЯМ улучшить рассуждения при решении различных сложных задач. Для проверки использовались бенчмарки: BIG-Bench Hard (BBH), Thinking for Doing (T4D) и MATH.
А как же роботы? Возможно, для роботов тоже имеет смысл использовать подобный подход для обработки поступающих задач. Это позволит роботу гибко реагировать и адаптироваться под требования конечного пользователя.
Статьи
- Kojima T. et al. Large language models are zero-shot reasoners //Advances in neural information processing systems. – 2022. – Т. 35. – С. 22199-22213.
- Zhou P. et al. Self-discover: Large language models self-compose reasoning structures //arXiv preprint arXiv:2402.03620. – 2024.
- Fernando C. et al. Promptbreeder: Self-referential self-improvement via prompt evolution //arXiv preprint arXiv:2309.16797. – 2023.
- Wei J. et al. Chain-of-thought prompting elicits reasoning in large language models //Advances in neural information processing systems. – 2022. – Т. 35. – С. 24824-24837.
Ссылки
По теме
- Figure.ai показали как их робот-андроид работает под управлением OpenAI
- Прогнозное управление языковой моделью (Language Model Predictive Control) ускоряют адаптацию робота к управляющим командам
- Microsoft предложила использовать ChatGPT для управления роботами
- Полина Федотова: AGI в робототехнике: прорыв с фундаментальными моделями
- Dobb·E — открытый проект по обучению робота выполнять домашние дела
- Awesome-LLM-Robotics — список статей про использование больших языковых моделей в робототехнике
- TidyBot — персонализированный робот-помощник на основе больших языковых моделей