The development of large language models (LLMs), such as GPT, has enabled the construction of several socialbots, like ChatGPT, that are receiving a lot of attention for their ability to simulate a human conversation. However, the conversation is not guided by a goal and is hard to control. In addition, because LLMs rely more on pattern recognition than deductive reasoning, they can give confusing answers and have difficulty integrating multiple topics into a cohesive response. These limitations often lead the LLM to deviate from the main topic to keep the conversation interesting. We propose AutoCompanion, a socialbot that uses an LLM model to translate natural language into predicates (and vice versa) and employs commonsense reasoning based on Answer Set Programming (ASP) to hold a social conversation with a human. In particular, we rely on s(CASP), a goal-directed implementation of ASP as the backend. This paper presents the framework design and how an LLM is used to parse user messages and generate a response from the s(CASP) engine output. To validate our proposal, we describe (real) conversations in which the chatbot's goal is to keep the user entertained by talking about movies and books, and s(CASP) ensures (i) correctness of answers, (ii) coherence (and precision) during the conversation, which it dynamically regulates to achieve its specific purpose, and (iii) no deviation from the main topic.
翻译:以GPT为代表的大语言模型(LLMs)的发展催生了ChatGPT等若干社交机器人,其模拟人类对话的能力正受到广泛关注。然而,此类对话缺乏目标引导且难以控制。此外,由于大语言模型更依赖模式识别而非演绎推理,可能产生混乱的答案,且难以将多个话题整合为连贯的回应。这些局限常导致大语言模型为维持对话趣味性而偏离主题。本文提出AutoCompanion社交机器人系统,该系统利用大语言模型实现自然语言与谓词逻辑的双向转换,并基于答案集编程(ASP)的常识推理机制与人类进行社交对话。我们特别采用目标导向的ASP实现系统s(CASP)作为后端引擎。本文阐述了框架设计原理,以及如何运用大语言模型解析用户信息并根据s(CASP)引擎输出生成回应。为验证方案有效性,我们展示了以影视书籍话题保持用户互动愉悦度为目标的真实对话案例,s(CASP)在该场景中确保:(i)答案的正确性;(ii)对话过程中动态调节以实现特定目标的连贯性(与精确性);(iii)对话主题不偏离核心议题。