Skip to main content

The Cognitive Substrate Framework for Model-Agnostic AI — the missing link to AGI

Project description

Nouse

Nouse

Persistent domain memory for LLMs. Works with any model.

Python 3.11+ MIT Benchmark


The result that motivated this

Model                               Score   Questions
─────────────────────────────────────────────────────
llama3.1-8b  (no memory)            46%     60
llama-3.3-70b  (no memory)          47%     60
llama3.1-8b  + Nouse memory  →      96%     60

An 8B model with Nouse outperforms a 70B model without it.

The effect is not about retrieval. It is about disambiguation — a small, precise knowledge signal redirects the model's existing priors onto the correct frame. We call this the Intent Disambiguation Effect.

→ Full benchmark: eval/RESULTS.md


What Nouse is

Nouse (νοῦς, Gk. mind) is a persistent, self-growing knowledge graph that attaches to any LLM as a memory substrate.

Your documents, conversations, research
           ↓
    Nouse knowledge graph
    (KuzuDB + Hebbian learning)
           ↓
    brain.query("your question")
           ↓
    Structured context injected into any LLM prompt

It is not a RAG system. RAG retrieves chunks. Nouse extracts relations — typed, weighted, evidence-scored connections between concepts — and injects a compact, structured context block.

It learns continuously. Every interaction strengthens or weakens connections (Hebbian plasticity). There is no retraining. No gradient descent. The graph grows.


Quick start

pip install nouse

# Attach to your knowledge graph
import nouse
brain = nouse.attach()

# Query and inject context
result = brain.query("transformer attention mechanism")
print(result.context_block())   # inject this into your LLM prompt
print(result.confidence)        # 0.0 – 1.0
print(result.strong_axioms())   # verified high-evidence relations

Works with any provider — OpenAI, Anthropic, Groq, Cerebras, Ollama:

# You handle the LLM call. Nouse handles the memory.
context = brain.query(user_question).context_block()
response = openai.chat(messages=[
    {"role": "system", "content": context},
    {"role": "user",   "content": user_question},
])

Run the benchmark yourself

git clone https://github.com/base76-research-lab/NoUse
cd NoUse
pip install -e .

# Generate questions from your own graph
python eval/generate_questions.py --n 60

# Run benchmark (requires Cerebras or Groq API key, or use Ollama)
python eval/run_eval.py \
  --small cerebras/llama3.1-8b \
  --large groq/llama-3.3-70b-versatile \
  --n 60 --no-judge

How the graph grows

Read a document / have a conversation
           ↓
    nouse daemon (background)
           ↓
    DeepDive: extract concepts + relations
           ↓
    Hebbian update: strengthen confirmed paths
           ↓
    NightRun: consolidate, prune weak edges
           ↓
    Ghost Q (nightly): ask LLM about weak nodes → enrich graph

The daemon runs as a systemd service. It watches your files, chat history, browser bookmarks — anything you configure. You never manually curate the graph.


Architecture

nouse/
├── inject.py          # Public API: attach(), NouseBrain, Axiom, QueryResult
├── field/
│   └── surface.py     # KuzuDB graph interface
├── daemon/
│   ├── main.py        # Autonomous learning loop
│   ├── nightrun.py    # Nightly consolidation (9 phases)
│   ├── node_deepdive.py  # 5-step concept extraction
│   └── ghost_q.py     # LLM-driven graph enrichment
└── search/
    └── escalator.py   # 3-level knowledge escalation

The hypothesis (work in progress)

small model + Nouse[domain]  >  large model without Nouse

We have evidence for this in our benchmark. The next step is to test across more domains, more models, and with an LLM judge instead of keyword scoring.

Contributions welcome — especially domain-specific question banks.


Install & run daemon

pip install -e ".[dev]"

# Start the learning daemon
nouse daemon start

# Interactive REPL with memory
nouse run

# Check graph stats
nouse status

Requires Python 3.11+. Graph stored in ~/.local/share/nouse/field.kuzu.


License

MIT — Björn Wikström / Base76 Research Lab

Project details


Download files

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

Source Distribution

nouse-0.2.0.tar.gz (290.2 kB view details)

Uploaded Source

Built Distribution

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

nouse-0.2.0-py3-none-any.whl (325.4 kB view details)

Uploaded Python 3

File details

Details for the file nouse-0.2.0.tar.gz.

File metadata

  • Download URL: nouse-0.2.0.tar.gz
  • Upload date:
  • Size: 290.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.11

File hashes

Hashes for nouse-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d02487caccedf5282a6791f67fbf9a8de89fc52e69431e6bc1122641cde5f5c1
MD5 1c9c41e74819ecf6b4c9e69be7959f5f
BLAKE2b-256 1a8c6b8e996fa2c8de73be45c4236c36782a16528b16586f094c24ae20f0bca6

See more details on using hashes here.

File details

Details for the file nouse-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: nouse-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 325.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.11

File hashes

Hashes for nouse-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 85c8c0e081a6763c38bce0cce9b0bc1f3bc002a0f5722a1ff2f5c9f0cdecc671
MD5 a5aedca4a958ac85a4cf6b54c84bb73d
BLAKE2b-256 6131bf2a0925ae3a8a3152f0cbcc458be07c893ec2f96a99dbf4dd9bc95831dd

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