Elephantasm vs. a Vector Database

A memory framework, not a similarity index.

A vector database does one thing well: it stores embeddings and finds the nearest ones to a query. Elephantasm is not a competing vector database — it is a memory framework built on one. On top of PostgreSQL and pgVector it adds what a bare index cannot: a four-layer memory hierarchy, recall scored on more than similarity, autonomous consolidation and decay, and an identity that forms over time.

A vector database searches

It stores embeddings and returns the nearest ones to a query by cosine distance or approximate nearest-neighbour. Fast, stateless, and excellent at "find the most similar vectors."

Elephantasm remembers

It is a memory framework: a four-layer hierarchy, recall scored on more than similarity, autonomous consolidation, and an identity that forms over time.

One is built on the other

Elephantasm runs on PostgreSQL with the pgVector extension. The vector store is the foundation; the framework is everything built on top of it that a bare index lacks.

What each one stores

A vector database stores embeddings — high-dimensional vectors with a little metadata — and nothing more. Elephantasm stores four layers: raw events, synthesised memories, canonical knowledge, and an emergent identity. The vectors are the bottom of that stack, not the whole of it.

How each one retrieves

A vector database answers one question: which stored vectors are nearest this query, by cosine distance or approximate nearest-neighbour search. Elephantasm scores every memory across four factors — importance, confidence, recency, and decay — combined with semantic similarity into one weighted composite, so a critical memory from last week can outrank a tangentially similar one from yesterday.

Whether it forgets and consolidates

A vector database keeps every vector until you delete it; it has no notion of forgetting or curation. Elephantasm decays memories over time, lets frequently recalled ones resist decay, and runs the Dreamer — a sleep-inspired loop whose Light Sleep updates decay scores and finds merge candidates and whose Deep Sleep uses an LLM to merge, split, and refine. Nothing is truly destroyed.

Whether it forms identity

A vector database has no self; it is an index. In Elephantasm, accumulated knowledge crystallises over time into a stable identity — a voice, a perspective, a sense of self that persists across sessions. That is the layer a bare vector store cannot reach.

The integration surface

A vector database exposes insert-and-query: you write vectors and search them, and scoring, synthesis, and curation are yours to build. Elephantasm exposes two methods — ingest() records an interaction, inject() returns a token-budgeted, four-layer context pack — and everything in between is automatic.

When a vector database is enough

If you need stateless semantic search — retrieval-augmented generation over documents, deduplication, similarity lookup — a vector database is the right tool, and a memory framework would be overhead. Reach for the index when the job is "find the nearest passages" and nothing needs to persist, decay, or become.

When you need a memory framework

If your agent should carry what it learned from one session into the next — remembering interactions, distilling them into knowledge, letting the unimportant fade, and forming a stable identity over time — a bare vector database will not get you there. That is what Elephantasm is for.

Frequently Asked Questions

Is Elephantasm a vector database?

No. Elephantasm is a memory framework built on a vector store — PostgreSQL with the pgVector extension. A vector database is a component inside it, not the whole of it.

Does Elephantasm replace my vector database?

It depends on the job. For stateless semantic search — RAG, deduplication, similarity lookup — a vector database is the right tool. For an agent that must remember, forget, consolidate, and form an identity over time, Elephantasm adds the layers a bare vector store lacks.

How is four-factor recall different from cosine similarity?

Cosine similarity ranks memories by semantic closeness alone. Four-factor recall combines similarity with importance, confidence, recency, and decay into one weighted composite, so a critical memory from last week can outrank a tangentially similar one from yesterday.

Can a vector database forget or consolidate on its own?

No. A vector database keeps every vector until you delete it and does not curate itself. Elephantasm decays memories over time and runs the Dreamer, a sleep-inspired loop that merges, splits, and refines memory autonomously.