Skip to main content

llama-index-vector-stores-mnestic

A LlamaIndex vector store backed by mnestic — an embedded graph + vector + full-text database (a maintained fork of CozoDB). Retrieval is hybrid: dense (HNSW) + keyword (full-text) fused with Reciprocal Rank Fusion, in one call.

mnestic is a maintained fork of CozoDB; it is not the official CozoDB. Original design credit belongs to Ziyang Hu and the Cozo Project Authors.

pip install llama-index-vector-stores-mnestic

Use 0.2.1 or newer. It validates relation, column, index, distance, and dtype identifiers and coerces numeric HNSW settings before constructing CozoScript; earlier releases interpolated those configuration values directly.

from llama_index.core import VectorStoreIndex, StorageContext, Document
from llama_index.vector_stores.mnestic import MnesticVectorStore

vector_store = MnesticVectorStore(dim=1536, engine="sqlite", path="mydocs.db")
storage_context = StorageContext.from_defaults(vector_store=vector_store)

index = VectorStoreIndex.from_documents(
    [Document(text="the cat sat on the mat")],
    storage_context=storage_context,
)
nodes = index.as_retriever(similarity_top_k=4).retrieve("feline")

dim must match your embedding model's dimension. query runs hybrid search when the query carries text (the usual index path), otherwise vector-only.

Engine pass-through: graph legs and more

Extra keyword arguments flow from the retriever to the engine's hybrid query via vector_store_kwargs. That includes graph_legs — fuse graph proximity into the ranking alongside the dense and keyword legs, in the same single call:

retriever = index.as_retriever(
    similarity_top_k=4,
    vector_store_kwargs={"graph_legs": [{
        "edge_relation": "links", "from_col": "src", "to_col": "dst",
        "seeds": ["doc-1"], "max_hops": 2, "label": "graph",
    }]},
)

MnesticRetriever(..., search_kwargs={...}) forwards the same way, and so do extra_lists, vector_k, fts_k, rrf_k, and future engine keys — no adapter release needed when the engine grows new knobs.

License

Mozilla Public License 2.0.

Download files

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

Source Distribution

llama_index_vector_stores_mnestic-0.2.1.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file llama_index_vector_stores_mnestic-0.2.1.tar.gz.

File metadata

File hashes

Hashes for llama_index_vector_stores_mnestic-0.2.1.tar.gz
Algorithm Hash digest
SHA256 ab192be1f85abe3b04f841ca53e4291927477d5910ae27d1a642100c07df8890
MD5 1887e0e94c52e90e3402ea0511c65db6
BLAKE2b-256 3fa0660769de332debd2809bed218be645abcf50805fa7bf93f8ad2cf445c5ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for llama_index_vector_stores_mnestic-0.2.1.tar.gz:

Publisher: python-publish.yml on shuruheel/mnestic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file llama_index_vector_stores_mnestic-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_vector_stores_mnestic-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 38c881cfd063bd6ae5b8eb87fcc569af1506b45e05fc413e7bae08e3ba3756f4
MD5 5245f4ab95bf0ea8e0c0f262c2af8285
BLAKE2b-256 e44231d59653addab6f617c4c55694a6a9b99c847d4bca2ac26707e1038cc239

See more details on using hashes here.

Provenance

The following attestation bundles were made for llama_index_vector_stores_mnestic-0.2.1-py3-none-any.whl:

Publisher: python-publish.yml on shuruheel/mnestic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page