Kb – Prolog Knowledge Base(github.com) |
Kb – Prolog Knowledge Base(github.com) |
I built a similar thing recently, for agents, aimed at enabling prolog queries over handles in markdown corpora (and code): https://github.com/flowerornament/anneal. A true slopwerk in comparison to this, however.
I used a content addressable storage inspired by Nix to bridge unstructured information in files with the system I am building. Then I combined SQLite as the persistence layer and Trealla Prolog as the logic layer for knowledge representation and inference. I began trying to use C to orchestrate all these components, but switched to a Prolog core after struggling with reliable read and write access from C to the in-memory predicates in Trealla. I tried as much as possible keeping the program self-contained. I ended up with this statement predicate as KR building block which behaves as an RDF triple with properties.
Right now, the project's bottleneck is data ingestion, since constructing the statements manually is tedious. I have tried using LLMs to generate Prolog files with facts to be ingested, and that works, but is not friction-less.
The project is meant as a personal knowledge management tool that responds to my informational needs (and hopefully some else's too). In that regard, I wanted to try to implement context tracking. This is an idea I had in which, when you are multi-tasking, you need to switch contexts often depending on task, project, or life aspect you are considering at any given moment. This makes tracking the individual (and sometimes interdependent) state of each of these things hard. The goal of context tracking is to provide a way to load or visualize the exact context you need for the thing you are focusing on at this precise moment. The program may store and entire knowledge graph which you can load, but also allows loading only the subgraph around a selected entity. Version history of the knowledge graph is also important since you want to track its evolution. Humanist provides a more polish interface with similar capabilities.
Any feedback on how to take these ideas further would be awesome.
A big part of it used prolog to map artifacts to application to business and technical accountable individuals. So if a down storage device offlined a database and broke an app, the business user and storage guy would be called or paged.
My team does this with Splunk today. For probably 50x the compute and 10x the cost.
We wired up the network monitoring systems which built out the hierarchy of network gear, then used a fairly lightweight filter/rules engine to dedupe and normalize events. For example a Cisco 6500 switch might throw 100 events when an interfere dropped. We could roll 90% of them with the filter. Another device would send a junk “interface down” alert periodically… except an attribute would say “is_down=false” lol
So we pulled in our business-artifact mapping system (this would be ServiceNow today), the on-call rosters, the network topology, runbook/kb, and some other goodies and grabbed the attention of the right person at the right time with specific guidance about what to do.
Basically if a switch, server or critical app failed, we immediately knew what system was impacted, the scope of the impact, who to inform and who to call to resolve. Eventually we expanded it to batch non-critical failures and schedule repairs during outage windows and identify specific dev teams for components of larger apps.
I left after that. It was a fun project and a big break for me, all because I was the only person who had heard of prolog in a happy hour conversation!
While it's not exactly what he did, the answer to this question is yes. That's called inductive logic programming. Essentially you provide background knowledge, positive examples and negative examples, and it spits out a logic program. It's where the frontier of symbolic AI has sat for a hot second now.