←back to thread

Use Prolog to improve LLM's reasoning

(shchegrikovich.substack.com)
271 points shchegrikovich | 1 comments | | HN request time: 0.192s | source
Show context
luke_galea ◴[] No.41875836[source]
Super cool. I dig generating rules from within the LLM, but I'm not sure Prolog is the right choice in 2024.

I love Prolog and had the opportunity to use it "in anger" years ago to handle temporal logic in a scheduling app. Great experience, but I've found that more modern rules engines like Drools (anything using the Rete algorithm) are a MUCH better fit for most use cases these days.

If you are into this stuff, you might like the talk I gave on rules engines, prolog and how it led to erlang & elixir. https://www.youtube.com/watch?v=mDnntrhk-8g&t=1s

replies(1): >>41876289 #
1. OutOfHere ◴[] No.41876289[source]
The choice is limited to the languages that LLMs already know really well. Fwiw, here is GPT's self-rating out of 10:

Python: 9, Prolog: 7, Datalog: 6, Mercury: 6, Curry: 5, Drools: 4

This is not even the full set of what the LLM might like to use. It may also like pyDatalog, SymPy, Haskell, Clingo ASP, ECLiPSe CLP, etc.