Humans understand language by extracting information (meaning) from sentences, combining it with existing commonsense knowledge, and then performing reasoning to draw conclusions. While large language models (LLMs) such as GPT-3 and ChatGPT are able to leverage patterns in the text to solve a variety of NLP tasks, they fall short in problems that require reasoning. They also cannot reliably explain the answers generated for a given question. In order to emulate humans better, we propose STAR, a framework that combines LLMs with Answer Set Programming (ASP). We show how LLMs can be used to effectively extract knowledge -- represented as predicates -- from language. Goal-directed ASP is then employed to reliably reason over this knowledge. We apply the STAR framework to three different NLU tasks requiring reasoning: qualitative reasoning, mathematical reasoning, and goal-directed conversation. Our experiments reveal that STAR is able to bridge the gap of reasoning in NLU tasks, leading to significant performance improvements, especially for smaller LLMs, i.e., LLMs with a smaller number of parameters. NLU applications developed using the STAR framework are also explainable: along with the predicates generated, a justification in the form of a proof tree can be produced for a given output.
翻译:人类理解语言的方法是,从判决中提取信息(意指),将其与现有的常识知识相结合,然后进行推理,得出结论。GPT-3和ChatGPT等大型语言模型(LLMs)能够利用文本模式解决各种NLP任务,但是在需要推理的问题方面却不尽如人意。他们也无法可靠地解释为某个问题所得出的答案。为了更好地模仿人,我们建议STAR,一个将LLMS与答案设置程序(ASP)相结合的框架。我们展示了如何利用LMSDMs有效地从语言中提取知识 -- -- 以上游为代表 -- -- 来有效提取知识。随后,目标导向的ASP被用于可靠地解释这一知识。我们把STAR框架应用于需要推理的三个不同的NLU任务:定性推理、数学推理和目标导向的对话。我们的实验显示STAR能够弥合NLU任务中推理的空白,从而导致显著的改进性能,特别是小LMS,即LMS和数量较少的参数。使用STAR框架开发的NLU应用程序也可以用STAR框架来解释。用Star框架开发的证明,在树上产生一个产出,也可以解释。