←back to thread

Use Prolog to improve LLM's reasoning

(shchegrikovich.substack.com)
379 points shchegrikovich | 3 comments | | HN request time: 0.455s | source
Show context
z5h ◴[] No.41873798[source]
i've come to appreciate, over the past 2 years of heavy Prolog use, that all coding should be (eventually) be done in Prolog.

It's one of few languages that is simultaneously a standalone logical formalism, and a standalone representation of computation. (With caveats and exceptions, I know). So a Prolog program can stand in as a document of all facts, rules and relations that a person/organization understands/declares to be true. Even if AI writes code for us, we should expect to have it presented and manipulated as a logical formalism.

Now if someone cares to argue that some other language/compiler is better at generating more performant code on certain architectures, then that person can declare their arguments in a logical formalism (Prolog) and we can use Prolog to translate between language representations, compile, optimize, etc.

replies(11): >>41874164 #>>41874229 #>>41874594 #>>41874985 #>>41875196 #>>41875236 #>>41876524 #>>41876589 #>>41876880 #>>41878634 #>>41882848 #
1. hollerith ◴[] No.41876524[source]
What is your explanation for Prolog's lack of uptake so far?

It has been around for 52 years and got a lot of buzz about 40 years ago because of its usefulness in creating expert systems.

replies(2): >>41879193 #>>41879579 #
2. upghost ◴[] No.41879193[source]
Early systems were largely closed source, proprietary, licensed commercial systems. In some ways Prolog is 52 years old and in some ways it's 5 years old.

...I can relate...

3. tannhaeuser ◴[] No.41879579[source]
Not GP, but if Prolog has been around for 52 years, has many implementations old (SICStus/Quintus, SWI, yap, ciao, xsb, eclipse, many more) and new (Scryer, Quantum, Strawberry, Tau, Trealla, ...) then it follows it's not doing so bad after all.

I have to say the "expert system" quote comes from lack of insight and perhaps outdated CompSci lecture notes when even at the height of "expert systems" around 1990 or before, Prolog's backward-chaining was seen as the opposite of an expert system's forward-chaining.

It may have been the case that what was understood as an "AI language" was anathema following the AI crash around 1988/89 (the original "AI winter").

What also may have contributed to the impression of Prolog becoming less used around 2000-2012 or so is the effect of W3C's/TBL's "Semantic Web" and description logics efforts capturing a portion of the academic and commercial attention in graph and logic databases, as well as in other applied logic domains such as formal verification (in a quite direct sense considering research grants for OWL, etc.)