Are there any modern use cases of prolog left, or is it more of academic interest?
Are there any modern use cases of prolog left, or is it more of academic interest?
I also think there’s a lot of potential to build smaller internal tools with prolog. Prolog + LLMs are a really good match. I think the broad usefulness of prolog has been bottlenecked in the past by the finding/sourcing/formatting correct data, but even cheap LLMs can turn information into prolog facts. You can do all sorts of really neat stuff with a teeny prolog core, and a lot of LLM sourced data.
Like for instance, I made a very rough model of how certain data flows through our many services. Queues, indexers, caches. Came up with a few predicates that describe what a race condition is, what stale data is, then let Claude loose on the codebase to fill in all of the facts. Then in a couple queries, I indeed found a few race conditions and stale data!
Unification is a bit different, but not that important here. It's more important to note that a datalog program will compute the same results in prolog and thus, my previous statement that datalog is essentially prolog without function symbols.
That said, the old joke is true: when you've seen one Datalog, you've seen one Datalog.
Prolog is like a database. It is mechanical. AI is like web search (which it essentially is).
SQL is fine if there are interlinks supporting the direction of your search. But those relationships frequently end up one-way, unless the architect both fights for it, and actually exists.
Alas, there's a lot of convenience/hype appeal to just throwing most of the functionality in the magical mad-libs blender and trusting that reliability and security problems won't be too bad.