Skip to main content

Local Knowledge Graph

Linux macOS Windows PyPI Python

Example

Ask a local model a question, watch it reason step by step, and see the steps drawn as a graph. Blue edges are embedding similarity — association. Green is what an exact evaluator settled — sums and unit conversions, in fractions, via mpeqs. Everything runs on your machine.

Run it

pip install mpe-lkg
mpe-lkg

Open http://localhost:5100. It talks to a local model through Ollama and will tell you what is missing and the one command that fixes it. The model matters more than anything else here — measured, qwen3:4b-instruct-2507 answers 82.5% of the arithmetic battery against llama3.2:3b's 40%:

ollama pull qwen3:4b-instruct-2507-q4_K_M

Ask harder questions with mode=explore (each sub-question answered by its own run) or mode=settle (explored twice, finished only when two independent runs agree), and take any run as RDF:

curl -sX POST localhost:5100/jobs -H 'content-type: application/json' \
     -d '{"query":"How many seconds are there in 23 weeks?","mode":"settle"}'
curl -s localhost:5100/jobs/<id>/rdf

More

Modes, jobs and RDF reason / explore / settle, the vote, the probes, the vocabulary
Models and configuration Choosing models, every environment variable, troubleshooting
Embeddings from inside a model Reading a chosen layer instead of an embedding endpoint
How it works The modules, the strongest-path search, why there is no ANN index
Development Tests, and the gate that checks this documentation against measured data

Licence

The mpedb License 1.0 — the same licence as mpedb and MPEqs, byte for byte.

Free of charge for every person and every organization, with one exception: a group whose revenue or valuation exceeds five billion dollars owes a one-time fee of seven US cents per device. Not an OSI-approved licence.


Published to PyPI as mpe-lkgMorten Punnerud-Engelstad Local Knowledge Graph.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mpe_lkg-0.7.1.tar.gz (762.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mpe_lkg-0.7.1-py3-none-any.whl (267.2 kB view details)

Uploaded Python 3

File details

Details for the file mpe_lkg-0.7.1.tar.gz.

File metadata

  • Download URL: mpe_lkg-0.7.1.tar.gz
  • Upload date:
  • Size: 762.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.12

File hashes

Hashes for mpe_lkg-0.7.1.tar.gz
Algorithm Hash digest
SHA256 c26dc0894cc708b5bdd6c21188e3e14c0d46e6c2689a0ef700f933f0993c5479
MD5 3932d8afc048e4caae92c664fb52b7e7
BLAKE2b-256 6bb79d84a476ef69e98f5a7be011617c4751260cab808acadc0fe593112577fc

See more details on using hashes here.

File details

Details for the file mpe_lkg-0.7.1-py3-none-any.whl.

File metadata

  • Download URL: mpe_lkg-0.7.1-py3-none-any.whl
  • Upload date:
  • Size: 267.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.12

File hashes

Hashes for mpe_lkg-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a400352bcb2720a5caca9935fb8630221dac334c8848819b370bcf3a7fd4b6c5
MD5 ce43021f7a94003c2f1f9fd315d17705
BLAKE2b-256 b1e7f400727cc0b93f3438532def63fb52e492638fffd829b6ce1de0b2f44b4b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page