# Show HN: Visual knowledge graphs using Ollama and Embeddings

> Source: <https://github.com/punnerud/Local_Knowledge_Graph>
> Published: 2026-08-12 10:15:21+00:00

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](https://github.com/punnerud/MPEqs). Everything runs on your machine.

```
pip install mpe-lkg
mpe-lkg
```

Open [http://localhost:5100](http://localhost:5100). It talks to a local model through
[Ollama](https://ollama.com) 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
```

|

[Models and configuration](/punnerud/Local_Knowledge_Graph/blob/main/docs/models.md)[Embeddings from inside a model](/punnerud/Local_Knowledge_Graph/blob/main/docs/internal-layers.md)[How it works](/punnerud/Local_Knowledge_Graph/blob/main/docs/design.md)[Development](/punnerud/Local_Knowledge_Graph/blob/main/docs/development.md)[The mpedb License 1.0](/punnerud/Local_Knowledge_Graph/blob/main/LICENSE) — the same licence as
[mpedb](https://github.com/punnerud/mpedb) and [MPEqs](https://github.com/punnerud/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-lkg — Morten Punnerud-Engelstad Local
Knowledge Graph.
