engineering knowledge, not just storing it
LiveKnowledge is a CLI tool that closes the loop between unstructured text and structured, verifiable knowledge. It combines LLM reasoning with Answer Set Programming (Clingo) to extract, verify, and query facts in an evolving knowledge base.
You feed it a question and a knowledge base (ASP facts and rules). It:
Those gaps become actionable gap reports — structured JSON files listing the specific predicates the KB is missing. You then:
learn --fill-gap) — the LLM extracts facts targeting the exact missing predicatesThe gap report tracks arity drift too — if you asked for profit/2 but the KB learned profit/3 (a richer schema), the system reports it rather than silently accepting or rejecting.
Most knowledge tools treat knowledge as bags of vectors. LiveKnowledge treats it as logic programs — facts and rules that a solver can check for consistency. This means:
git clone ... python3 -m venv .venv .venv/bin/pip install clingo openai python-dotenv pydantic # ask a question python main.py ask --kb /path/to/kb.lp \ --question "What factors drive profit margins?" # generate a gap report python main.py ask --kb /path/to/kb.lp \ --question "What are the most profitable items?" \ --gap-report gaps.json # fill those gaps with a source text python main.py learn --kb /path/to/kb.lp \ --fill-gap gaps.json \ --unstructured source.txt \ --question "What are the most profitable items?"
Full docs in the README.