I accidentally turned LLM memory into program analysis
71–80 of 90 posts
Re: I accidentally turned LLM memory into program analysis
#72And here I am just having them author org-files for me and them to refer back too. For fun I even ask for DITA sometimes.
Re: I accidentally turned LLM memory into program analysis
#73I encountered this with trying to have LLMs populate facts about electoral campaigns. Like when a candidate drops out, when endorsements happen, but also if a candidate is un-endorsed or drops and rejoins. It also needed to handle if any of these facts were incorrect. I settled on a knowledge graph in Postgres and downloading/storing the source documents so it could iterate on past results without more scraping or ne…
I settled on simplicity, extended it to serve clear, useful purpose.
Started with markdown database, single fact per line, structured/parseable (subject VERB object). This can be easily diffed/reviewed etc in git. Then added optional metadata (confidence, tags, persisted comments for natural language, uncertainty for numeric values, context, timestamps/spans), querying, alternative sqlite3 backend, self describing VERBS, z3 solver etc.
Those kind of graph information systems are great to quickly structure knowledge in a way that LLMs and humans can use/act on/loop on. Creating ontology, linking, some rules and actions and kicking it so it all munches and spits out results that feed back in so it self evolves. It's very natural for llms to query/update/restructure those graphs (also good for humans because it's very terse, essential information only).
There is no need to create k8s style complexity/services/what-not, it all works well from single sqlite db file or bunch of markdown (.cave in my case) files.
It's also interesting to see how well local open weight models are dealing with information arranged this way.
Re: I accidentally turned LLM memory into program analysis
#74Re: I accidentally turned LLM memory into program analysis
#75I heard of Scallop, that also uses Datalog for neurosymbolic programming, I wonder where Lemmalog fits with Scallop? I know little about Datalog so sorry if this is a dumb question!
Re: I accidentally turned LLM memory into program analysis
#76I reached a similar conclusion: LLMs should only really sit at the terminals of request fulfilment. 1. User request understanding: natural language -> a more rigorous representation, in my case Datalog. 2. Result interpretation: facts and derived facts -> natural language. Between those terminals, the work should be mechanical reasoning over some ontology or formal knowledge structure. That connects to another princi…
The weathering need is real. An llm equivalent of dbms analysing usage pattern to tune indexes.
Re: I accidentally turned LLM memory into program analysis
#77Note: I wonder how many people reified their codebase as logical facts to query or investigate it more deterministically. I've been trying for a while, still not far but getting there.
Re: I accidentally turned LLM memory into program analysis
#78So he's using an LLM to generate data stored in an "is_a" representation. That's so classic AI. Soon, he'll discover that he needs quantifiers. Then that "for all" is too strong sometimes, and he needs "for most". That way lies Cyc. It's not a bad idea. But it does have a history.
In general, what all the big LLM providers are doing is moving towards classical & neural (neuro-symbolic) AI - even though they dont publicly admit it because that would counter their claims for years of "scale is all you need" (which has vanished with diminishing returns, see $MS / altman's GPT-5 bet).
Re: I accidentally turned LLM memory into program analysis
#79Re: I accidentally turned LLM memory into program analysis
#80I’ve been battling the same problem, and I solved it by keeping the state in my brain, long focus hours, and breaking down the problem to smaller chunks that agents could almost one-shot. That made me the bottleneck, and although I can do it for codebases I’m familiar with, working on totally new projects has been very painful.
I’m going to test it in my own vuln research workflow.