Skip to content

Commit

Permalink
make graph tighter
Browse files Browse the repository at this point in the history
  • Loading branch information
shihanwan committed Oct 1, 2024
1 parent 182f1e6 commit 8278afe
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,29 @@
`memonto` (_memory + ontology_) adds memory to AI agents based on an user defined ontology. Define your own [RDF](https://www.w3.org/RDF/) ontology with [`rdflib`](https://github.com/RDFLib/rdflib) then have `memonto` automatically extract information that maps onto that ontology into a memory graph. The memories in the memory graph can be queried directly with `SPARQL` queries or contextually summarized.

```
┌─────────────────────────────┐ ┌──────────────────────┐ ┌───────────────────────────────────┐
│ Message │ │ LLM │ │ Memory Graph
│ │ │ │ ...
│ {Otto von Bismarck was a │ │ │
│ Prussian statesman and │ │ │ ┌───────────────▼───────────────┐
│ diplomat who oversaw the │ │ [Otto von Bismarck] │ │ Otto von Bismarck │
│ unification of Germany...} ┼─► │ └────────┬──────┬───────────────┘
│ │ │ is a [Person] who │ │ │
└─────────────────────────────┘ │ ┼─ livesAt│ │partOf
┌─────────────────────────────┐ │ lives in a [Place] │ │ │
│ Ontology │ │ │ ┌────────▼┐┌────▼───────────────┐
│ ┼─► called [Prussia] │ │ Prussia ││ German Unification │
│ ┌─────────────┐ │ │ │ └─┬─────┬─┘└──────┬─────┬───────┘
│ │ Person │ │ │ and participated in │ │ │ │ │
│ └───┬─────┬───┘ │ │ │ ▼ ▼ ▼ ▼
│ │ │ │ │ an [Event] called │ ... ... ... ...
│ livesAt│ │partOf │ │ │ └─────────────────┬─────────────────┘
│ │ │ │ │ [German Unification] │
│ ┌─────────▼─┐ ┌─▼─────────┐ │ │ │ ┌─────────────────▼─────────────────┐
│ │ Place │ │ Event │ │ │ │
│ └───────────┘ └───────────┘ │ │ │ │ SPARQL Queries / Memory Summaries
│ │ │ │
└─────────────────────────────┘ └──────────────────────┘ └───────────────────────────────────┘
┌─────────────────────────────┐ ┌──────────────────────┐ ─────────────────────────────────┐
│ Message │ │ LLM │ │ Memory Graph │
│ │ │ │ │ ... │
│ {Otto von Bismarck was a │ │ │ │
│ Prussian statesman and │ │ │ ┌───────────────▼───────────────┐│
│ diplomat who oversaw the │ │ [Otto von Bismarck] │ │ Otto von Bismarck ││
│ unification of Germany...} ┼─► │ └────────┬──────┬───────────────┘│
│ │ │ is a [Person] who │ │ │ │ │
└─────────────────────────────┘ │ ┼─► livesAt│ │partOf │
┌─────────────────────────────┐ │ lives in a [Place] │ │ │ │ │
│ Ontology │ │ │ ┌────────▼┐┌────▼───────────────┐│
│ ┼─► called [Prussia] │ │ Prussia ││ German Unification ││
│ ┌─────────────┐ │ │ │ └─┬─────┬─┘└──────┬─────┬───────┘│
│ │ Person │ │ │ and participated in │ │ │ │ │ │ │
│ └───┬─────┬───┘ │ │ │ │ ▼ ▼ ▼ ▼ │
│ │ │ │ │ an [Event] called │ ... ... ... ... │
│ livesAt│ │partOf │ │ │ └─────────────────┬───────────────┘
│ │ │ │ │ [German Unification] │
│ ┌─────────▼─┐ ┌─▼─────────┐ │ │ │ ┌─────────────────▼───────────────┐
│ │ Place │ │ Event │ │ │ │
│ └───────────┘ └───────────┘ │ │ │ │ SPARQL Queries / Memory Summary
│ │ │ │
└─────────────────────────────┘ └──────────────────────┘ ─────────────────────────────────┘
```

## 🚀 Install
Expand Down

0 comments on commit 8278afe

Please sign in to comment.