Skip to main content

Local-first RAG with built-in eval. Hybrid search, parameter sweep, one command.

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


Download files

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

Source Distribution

nerva_mneme-0.1.0.tar.gz (27.7 kB view details)

Uploaded Source

Built Distribution

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

nerva_mneme-0.1.0-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file nerva_mneme-0.1.0.tar.gz.

File metadata

  • Download URL: nerva_mneme-0.1.0.tar.gz
  • Upload date:
  • Size: 27.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.4 {"installer":{"name":"uv","version":"0.11.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"43","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for nerva_mneme-0.1.0.tar.gz
Algorithm Hash digest
SHA256 67f6b7a9f39379a1019c46d1cde1d86ae364267c4705dd2493e57eb8c4a1de04
MD5 69b8749b5161372c942e28613365de3e
BLAKE2b-256 3dc3027b0e68fad9e8c047919bcea1968596644b499232d72dd38c682e15852b

See more details on using hashes here.

File details

Details for the file nerva_mneme-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: nerva_mneme-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.4 {"installer":{"name":"uv","version":"0.11.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"43","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for nerva_mneme-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b0917158f91c6bec9f8b09076d7e464c3f123095a606232f42f3b5f9e087b725
MD5 475dc216b2f3809d152157d6335c7c1a
BLAKE2b-256 4432cf234518d2c397b0d29fc750df4f13ac149585ac9f55e424c9bbae442bf3

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