Local-first RAG with built-in eval.
Project description
Mneme
Local RAG pipeline with built-in evaluation. Postgres + pgvector for hybrid search, any /v1/-compatible LLM backend for embeddings and inference.
Setup
Requires Python 3.12+, uv, Postgres with the pgvector extension.
Copy .env.example to .env and fill in your values, then install:
cp .env.example .env
uv sync
Usage
uv run mneme digest # parse DATA_PATH source into cache
uv run mneme ingest <file.jsonl>
uv run mneme ask "query"
uv run mneme sweep <fast|medium|thorough> --limit 30
Library
from mneme import Mneme, Config
cfg = Config(database_url="postgresql://...", api_key="sk-...")
async with Mneme(cfg) as m:
await m.ingest("./corpus")
answer = await m.ask("What is X?")
rows = await Mneme.sweep(cfg, "medium", limit=30)
Input format
JSONL, one document per line:
{"content": "...", "source": "optional", "created_at": "2026-04-01T12:00:00Z", "metadata": {}}
Only content is required. source falls back to the file stem, created_at to the current time, metadata to {}.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nerva_mneme-0.1.46.tar.gz.
File metadata
- Download URL: nerva_mneme-0.1.46.tar.gz
- Upload date:
- Size: 27.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
edf2e2e79dff62d49c6e0479bd2af98fc7bf2b7c8ffad1ae06a397fc5fa79eef
|
|
| MD5 |
034e084130d5080ebd0bcfe14ede60fa
|
|
| BLAKE2b-256 |
e950547f9dec8c1c5d6481c073234085422297675e639e06960d7249250436d4
|
File details
Details for the file nerva_mneme-0.1.46-py3-none-any.whl.
File metadata
- Download URL: nerva_mneme-0.1.46-py3-none-any.whl
- Upload date:
- Size: 17.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aeb48c9e2b5623067d1913032a2c79b49f8dbf86bc9ae2682e555fbc4061d91b
|
|
| MD5 |
fa5e930066730b40c62915046508752f
|
|
| BLAKE2b-256 |
f6cd8425d42e8f9f31ec6e30826415ee41023f66995b38e315b7e8df92055624
|