Reproduce “LP-LM: No Hallucinations in Question Answering with Logic Programming” on OpenResearch
Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.
Universal app for Apple silicon and Intel. Requires macOS 11 or later.
About this paper
Katherine Wu, Yanhong A. Liu
LP-LM answers questions by parsing statements and queries into Prolog terms, then matching queries against knowledge-base facts through unification. In one prompt example, it returns the claim that fir trees can grow in human lungs, while tested language models challenge or qualify it. This illustrates fidelity to entered facts, not verification of truth; false facts can be repeated.
Key insights
- A logic programming-based system can inherently eliminate hallucinations by ensuring all answers are directly and verifiably derived from an explicit knowledge base.
- The combination of Prolog's DCGs and tabling (memoization) enables efficient semantic parsing, achieving linear time complexity for input sentences with large grammars.
- Symbolic AI and logic programming offer a robust, transparent, and auditable approach for factual question answering, complementing or replacing statistical methods where precision is paramount.
Summary by alphaXiv.
Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.