We present ASP Chef Mustache, an extension of ASP Chef that enhances template-based rendering of answer set programming (ASP) solutions using a logic-less templating system inspired by Mustache. Our approach integrates data visualization frameworks such as Tabulator, Chart.js, and vis.js, enabling interactive representations of ASP interpretations as tables, charts, and graphs. Mustache queries in templates support advanced constructs for formatting, sorting, and multi-stage expansion, facilitating the generation of rich, structured outputs. We demonstrate the power of this framework through a series of use cases, including data analysis for the Italian VQR, visualization of blocking sets in graphs, and scheduling problems. The result is a versatile tool for bridging declarative problem solving and modern web-based visual analytics.
ASP Chef is a versatile tool built upon the principles of Answer Set Programming (ASP), offering a unique approach to problem-solving through the concept of ASP recipes. In this paper, we explore two key components of ASP Chef: the Graph ingredient and one of its extension mechanisms for registering new ingredients. The Graph ingredient serves as a fundamental feature within ASP Chef, allowing users to interpret instances of a designed predicate to construct graphs from the data. Through this capability, ASP Chef facilitates the visualization and analysis of complex relationships and structures inherent in various domains. Furthermore, ASP Chef offers a flexible extension mechanism that empowers users to register new recipes as custom ingredients. These custom ingredients, defined by sequences of mappings from interpretations to interpretations, can be stored locally within the local storage of the browser. This enables users to expand the capabilities of ASP Chef to suit their specific needs and use cases, fostering a collaborative environment where users can share and reuse custom ingredients seamlessly. Notably, the addition of new ingredients does not impose requirements on the utilization of recipes that employ them, underscoring the modular and interoperable design of ASP Chef.
Answer Set Programming (ASP) and Large Language Models (LLMs) have emerged as powerful tools in Artificial Intelligence, each offering unique capabilities in knowledge representation and natural language processing, respectively. In this paper, we combine the strengths of the two paradigms with the aim of improving the structured representation of complex knowledge encoded in natural language. In a nutshell, the structured representation is obtained by combining syntactic structures extracted by LLMs and semantic aspects encoded in the knowledge base. The interaction between ASP and LLMs is driven by a YAML file specifying prompt templates and domain-specific background knowledge. The proposed approach is evaluated using a set of benchmarks based on a dataset obtained from problems of ASP Competitions. The results of our experiment show that ASP can sensibly improve the F1-score, especially when relatively small models are used.