Leveraging Large Language Models to Generate Answer Set Programs

07/15/2023
by   Adam Ishay, et al.
0

Large language models (LLMs), such as GPT-3 and GPT-4, have demonstrated exceptional performance in various natural language processing tasks and have shown the ability to solve certain reasoning problems. However, their reasoning capabilities are limited and relatively shallow, despite the application of various prompting techniques. In contrast, formal logic is adept at handling complex reasoning, but translating natural language descriptions into formal logic is a challenging task that non-experts struggle with. This paper proposes a neuro-symbolic method that combines the strengths of large language models and answer set programming. Specifically, we employ an LLM to transform natural language descriptions of logic puzzles into answer set programs. We carefully design prompts for an LLM to convert natural language descriptions into answer set programs in a step by step manner. Surprisingly, with just a few in-context learning examples, LLMs can generate reasonably complex answer set programs. The majority of errors made are relatively simple and can be easily corrected by humans, thus enabling LLMs to effectively assist in the creation of answer set programs.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/15/2023

Coupling Large Language Models with Logic Programming for Robust and General Reasoning from Text

While large language models (LLMs), such as GPT-3, appear to be robust a...
research
12/20/2022

Parsel: A Unified Natural Language Framework for Algorithmic Reasoning

Despite recent success in large language model (LLM) reasoning, LLMs sti...
research
05/25/2022

Is a Question Decomposition Unit All We Need?

Large Language Models (LMs) have achieved state-of-the-art performance o...
research
07/16/2023

GeoGPT: Understanding and Processing Geospatial Tasks through An Autonomous GPT

Decision-makers in GIS need to combine a series of spatial algorithms an...
research
08/31/2023

Experimenting with ChatGPT for Spreadsheet Formula Generation: Evidence of Risk in AI Generated Spreadsheets

Large Language Models (LLM) have become sophisticated enough that comple...
research
05/23/2023

ChipGPT: How far are we from natural language hardware design

As large language models (LLMs) like ChatGPT exhibited unprecedented mac...
research
05/24/2023

From Words to Wires: Generating Functioning Electronic Devices from Natural Language Descriptions

In this work, we show that contemporary language models have a previousl...

Please sign up or login with your details

Forgot password? Click here to reset