Proceedings

ASP Chef Chats with Large Language Models

Download BibTeX Cite

Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence. Demo Track. Pages 10989-10993.

https://doi.org/10.24963/ijcai.2025/1247

Abstract

ASP Chef enriches Answer Set Programming (ASP) with the notion of recipe, that is, a sequence of operations on answer sets.

Recipes are designed and executed in modern browsers, and further improve the fast prototyping capabilities of ASP.

This paper introduces new operations designed to integrate Large Language Models (LLMs) in recipe, with the aim of combining the reasoning strength of ASP with the natural language capabilities of LLMs, to enable more interactive and adaptive problem-solving workflows.

In a nutshell, answer sets in input are transformed into prompts for LLMs, whose responses are processed to extract facts for subsequent operations within the recipe.

  1. [Abts et al., 2022] Dennis Abts, John Kim, Garrin Kimmell, Matthew Boyd, Kris Kang, Sahil Parmar, Andrew C. Ling, Andrew Bitar, Ibrahim Ahmed, and Jonathan Ross. The groq software-defined scale-out tensor streaming multi- processor : From chips-to-systems architectural overview. In 2022 IEEE Hot Chips 34 Symposium, HCS 2022, Cu- pertino, CA, USA, August 21-23, 2022, pages 1-69. IEEE, 2022.
  2. [Alviano and Reiners, 2024] Mario Alviano and Luis An- gel Rodriguez Reiners. ASP chef: Draw and expand. In Pierre Marquis, Magdalena Ortiz, and Maurice Pagnucco, editors, Proceedings of the 21st International Conference on Principles of Knowledge Representation and Reason- ing, KR 2024, Hanoi, Vietnam. November 2-8, 2024, 2024.
  3. [Alviano and Rodriguez Reiners, 2024] Mario Alviano and Luis Angel Rodriguez Reiners. Integrating MiniZinc with ASP Chef: Browser-based constraint programming for ed- ucation and prototyping. In International Conference on Logic Programming and Nonmonotonic Reasoning, pages 174-186. Springer, 2024.
  4. [Alviano et al., 2023] Mario Alviano, Davide Cirimele, and Luis Angel Rodriguez Reiners. Introducing ASP recipes and ASP chef. In ICLP Workshops, volume 3437 of CEUR Workshop Proceedings. CEUR-WS.org, 2023.
  5. [Alviano et al., 2024a] Mario Alviano, Danilo Amendola, and Luis Angel Rodriguez Reiners. Addressing market- place logistic tasks in answer set programming. Intelli- genza Artificiale, 18(2):261-278, 2024.
  6. [Alviano et al., 2024b] Mario Alviano, Paola Guarasci, Luis Angel Rodriguez Reiners, and Ilaria R Vasile. In- tegrating structured declarative language (sdl) into ASP Chef. In International Conference on Logic Programming and Nonmonotonic Reasoning, pages 387-392. Springer, 2024.
  7. [Böhl et al., 2024] Elisa Böhl, Stefan Ellmauthaler, and Sarah Alice Gaggl. Winning snake: Design choices in multi-shot asp. Theory and Practice of Logic Program- ming, 24(4):772-789, 2024.
  8. [Borroto et al., 2024] Manuel Borroto, Irfan Kareem, and Francesco Ricca. Towards automatic composition of asp programs from natural language specifications. arXiv preprint arXiv:2403.04541, 2024. IJCAI
  9. [Brancas et al., 2024] Ricardo Brancas, Vasco Manquinho, and Ruben Martins. Combining logic with large language models for automatic debugging and repair of asp pro- grams, 2024.
  10. [Brown and et al., 2020] Tom B. Brown and et al. Language models are few-shot learners. CoRR, abs/2005.14165, 2020.
  11. [Calimeri et al., 2020] Francesco Calimeri, Wolfgang Faber, Martin Gebser, Giovambattista Ianni, Roland Kaminski, Thomas Krennwallner, Nicola Leone, Marco Maratea, Francesco Ricca, and Torsten Schaub. Asp-core-2 in- put language format. Theory Pract. Log. Program., 20(2):294-309, 2020.
  12. [Cappanera et al., 2023] Paola Cappanera, Marco Gavanelli, Maddalena Nonato, and Marco Roma. Logic-based ben- ders decomposition in answer set programming for chronic outpatients scheduling. Theory Pract. Log. Program., 23(4):848-864, 2023.
  13. [Cardellini et al., 2023] Matteo Cardellini, Carmine Do- daro, Giuseppe Galatà, Anna Giardini, Marco Maratea, Nicholas Nisopoli, and Ivan Porro. Rescheduling reha- bilitation sessions with answer set programming. J. Log. Comput., 33(4):837-863, 2023.
  14. [Cardellini et al., 2024a] Matteo Cardellini, Carmine Do- daro, Marco Maratea, and Mauro Vallati. Optimising dynamic traffic distribution for urban networks with an- swer set programming. Theory Pract. Log. Program., 24(4):825-843, 2024.
  15. [Cardellini et al., 2024b] Matteo Cardellini, Paolo De Nardi, Carmine Dodaro, Giuseppe Galatà, Anna Giardini, Marco Maratea, and Ivan Porro. Solving rehabilitation scheduling problems via a two-phase ASP approach. Theory Pract. Log. Program., 24(2):344-367, 2024.
  16. [Chowdhery and et al., 2023] Aakanksha Chowdhery and et al. Palm: Scaling language modeling with pathways. J. Mach. Learn. Res., 24:240:1-240:113, 2023.
  17. [Coppolillo et al., 2024] Erica Coppolillo, Francesco Cal- imeri, Giuseppe Manco, Simona Perri, and Francesco Ricca. LLASP: fine-tuning large language models for an- swer set programming. In Pierre Marquis, Magdalena Or- tiz, and Maurice Pagnucco, editors, Proceedings of the 21st International Conference on Principles of Knowledge Representation and Reasoning, KR 2024, Hanoi, Vietnam. November 2-8, 2024, 2024.
  18. [Costantini and Formisano, 2024] Stefania Costantini and Andrea Formisano. Solver fast prototyping for reduct- based ELP semantics. In Emanuele De Angelis and Maur- izio Proietti, editors, Proceedings of the 39th Italian Con- ference on Computational Logic, Rome, Italy, June 26- 28, 2024, volume 3733 of CEUR Workshop Proceedings. CEUR-WS.org, 2024.
  19. [Dodaro et al., 2024] Carmine Dodaro, Giuseppe Galatà, Martin Gebser, Marco Maratea, Cinzia Marte, Marco Mochi, and Marco Scanu. Operating room scheduling via answer set programming: Improved encoding and test on real data. J. Log. Comput., 34(8):1556-1579, 2024.
  20. [Gebser et al., 2019] Martin Gebser, Roland Kaminski, Ben- jamin Kaufmann, and Torsten Schaub. Multi-shot ASP solving with clingo. Theory Pract. Log. Program., 19(1):27-82, 2019.
  21. [Gelfond and Lifschitz, 1990] Michael Gelfond and Vladimir Lifschitz. Logic programs with classical negation. In D. Warren and Peter Szeredi, editors, Logic Programming: Proc. of the Seventh International Conference, pages 579-597, 1990.
  22. [Hadi et al., 2023] Muhammad Usman Hadi, Rizwan Qureshi, Abbas Shah, Muhammad Irfan, Anas Zafar, Muhammad Bilal Shaikh, Naveed Akhtar, Jia Wu, Seyedali Mirjalili, et al. Large language models: a comprehensive survey of its applications, challenges, limitations, and future prospects. Authorea Preprints, 2023.
  23. [Ishay et al., 2023a] Adam Ishay, Zhun Yang, and Joohyung Lee. Leveraging large language models to generate an- swer set programs. In Proceedings of the 20th Interna- tional Conference on Principles of Knowledge Represen- tation and Reasoning, pages 374-383, 2023.
  24. [Ishay et al., 2023b] Adam Ishay, Zhun Yang, and Joohyung Lee. Leveraging Large Language Models to Generate An- swer Set Programs. In Proceedings of the 20th Interna- tional Conference on Principles of Knowledge Represen- tation and Reasoning, pages 374-383, 8 2023.
  25. [Kalyanpur et al., 2024] Aditya Kalyanpur, Kailash Sara- vanakumar, Victor Barres, Jennifer Chu-Carroll, David Melville, and David A. Ferrucci. LLM-ARC: enhanc- ing llms with an automated reasoning critic. CoRR, abs/2406.17663, 2024.
  26. [Lin et al., 2024] Xinrui Lin, Yangfan Wu, Huanyu Yang, Yu Zhang, Yanyong Zhang, and Jianmin Ji. CLMASP: coupling large language models with answer set program- ming for robotic task planning. CoRR, abs/2406.03367, 2024.
  27. [Marek and Truszczynski, 1999] Victor W. Marek and Miroslaw Truszczynski. Stable models and an alternative logic programming paradigm. In The Logic Program- ming Paradigm, Artificial Intelligence, pages 375-398. Springer, 1999.
  28. [Niemelä, 1999] Ilkka Niemelä. Logic programs with stable model semantics as a constraint programming paradigm. Ann. Math. Artif. Intell., 25(3-4):241-273, 1999.
  29. [Nye et al., 2021] Maxwell Nye, Michael Tessler, Josh Tenenbaum, and Brenden M Lake. Improving coher- ence and consistency in neural sequence models with dual- system, neuro-symbolic reasoning. Advances in Neural Information Processing Systems, 34:25192-25204, 2021.
  30. [Rajasekharan et al., 2023a] Abhiramon Rajasekharan, Yankai Zeng, and Gopal Gupta. Argument analysis using answer set programming and semantics-guided large language models. In ICLP Workshops, 2023.
  31. [Rajasekharan et al., 2023b] Abhiramon Rajasekharan, Yankai Zeng, Parth Padalkar, and Gopal Gupta. Reliable natural language understanding with large language models and answer set programming. In Enrico Pontelli, Stefania Costantini, Carmine Dodaro, Sarah Alice Gaggl, Roberta Calegari, Artur S. d'Avila Garcez, Francesco Fabiano, Alessandra Mileo, Alessandra Russo, and Francesca Toni, editors, Proceedings 39th International Conference on Logic Programming, ICLP 2023, Imperial College London, UK, 9th July 2023 -15th July 2023, volume 385 of EPTCS, pages 274-287, 2023.
  32. [Taupe et al., 2021] Richard Taupe, Gerhard Friedrich, Kon- stantin Schekotihin, and Antonius Weinzierl. Solving configuration problems with ASP and declarative domain specific heuristics. In Michel Aldanondo, Andreas A. Falkner, Alexander Felfernig, and Martin Stettinger, edi- tors, Proceedings of the 23rd International Configuration Workshop (CWS/ConfWS 2021), Vienna, Austria, 16-17 September, 2021, volume 2945 of CEUR Workshop Pro- ceedings, pages 13-20. CEUR-WS.org, 2021.
  33. [Touvron and et al., 2023] Hugo Touvron and et al. Llama: Open and efficient foundation language models. CoRR, abs/2302.13971, 2023.
  34. [Wotawa, 2020] Franz Wotawa. On the use of answer set programming for model-based diagnosis. In Hamido Fujita, Philippe Fournier-Viger, Moonis Ali, and Jun Sasaki, editors, Trends in Artificial Intelligence The- ory and Applications. Artificial Intelligence Practices - 33rd International Conference on Industrial, Engineer- ing and Other Applications of Applied Intelligent Sys- tems, IEA/AIE 2020, Kitakyushu, Japan, September 22- 25, 2020, Proceedings, volume 12144 of Lecture Notes in Computer Science, pages 518-529. Springer, 2020.
  35. [Yang et al., 2023] Zhun Yang, Adam Ishay, and Joohyung Lee. Coupling large language models with logic pro- gramming for robust and general reasoning from text. In Findings of the Association for Computational Linguistics: ACL 2023, pages 5186-5219, 2023.
  36. [Zeng et al., 2024] Yankai Zeng, Abhiramon Rajasekharan, Kinjal Basu, Huaduo Wang, Joaquín Arias, and Gopal Gupta. A reliable common-sense reasoning socialbot built using llms and goal-directed asp. Theory and Practice of Logic Programming, 24(4):606-627, 2024.

References were extracted automatically from the PDF and may contain errors.

Welcome Future Conferences AI Journal Division IJCAI Proceedings About IJCAI IJCAI Awards