LangChain VectorStore for mnestic — embedded graph + vector + full-text store with one-call hybrid retrieval.
Project description
langchain-mnestic
A LangChain VectorStore backed by
mnestic — an embedded graph + vector +
full-text database (a maintained fork of CozoDB). Retrieval is hybrid by
default: dense (HNSW) + keyword (full-text) fused with Reciprocal Rank Fusion, in
one call.
pip install langchain-mnestic
from langchain_mnestic import MnesticVectorStore
from langchain_openai import OpenAIEmbeddings
store = MnesticVectorStore.from_texts(
["the cat sat on the mat", "a dog ran in the park"],
embedding=OpenAIEmbeddings(),
metadatas=[{"src": "a"}, {"src": "b"}],
engine="sqlite", path="mydocs.db", # or engine="mem" for ephemeral
)
docs = store.similarity_search("feline", k=2)
retriever = store.as_retriever(search_kwargs={"k": 4})
Scores returned by similarity_search_with_score are RRF fused scores — higher
is better (a relevance score, not a distance).
License
Mozilla Public License 2.0.
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 langchain_mnestic-0.1.0.tar.gz.
File metadata
- Download URL: langchain_mnestic-0.1.0.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
523200ad30bbb0da9a7da2de2e5e46563a0bf4b3d2738138f3622afa6e9901a6
|
|
| MD5 |
a0b2b9df975a42e4ba769b6843622c71
|
|
| BLAKE2b-256 |
c0914aec9f27106e0b1e302346827ad717ced4f93f1560eaa7fe259a3f6f4193
|
Provenance
The following attestation bundles were made for langchain_mnestic-0.1.0.tar.gz:
Publisher:
python-publish.yml on shuruheel/mnestic
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langchain_mnestic-0.1.0.tar.gz -
Subject digest:
523200ad30bbb0da9a7da2de2e5e46563a0bf4b3d2738138f3622afa6e9901a6 - Sigstore transparency entry: 1784577542
- Sigstore integration time:
-
Permalink:
shuruheel/mnestic@7fbb90351e19dafa1598bace81ede452caf47d1f -
Branch / Tag:
refs/tags/py-v0.8.4 - Owner: https://github.com/shuruheel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@7fbb90351e19dafa1598bace81ede452caf47d1f -
Trigger Event:
push
-
Statement type:
File details
Details for the file langchain_mnestic-0.1.0-py3-none-any.whl.
File metadata
- Download URL: langchain_mnestic-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d0e0e442fd126ec14f456cf89075e0b40cf153117cd786bab1c8e4c0625b0ca
|
|
| MD5 |
b21cf126fc6c2e167021e4f9998558d7
|
|
| BLAKE2b-256 |
49bfd6266fe65f88c7f6852b400e553ad77d8786ade4d99ebb355d38565db805
|
Provenance
The following attestation bundles were made for langchain_mnestic-0.1.0-py3-none-any.whl:
Publisher:
python-publish.yml on shuruheel/mnestic
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langchain_mnestic-0.1.0-py3-none-any.whl -
Subject digest:
9d0e0e442fd126ec14f456cf89075e0b40cf153117cd786bab1c8e4c0625b0ca - Sigstore transparency entry: 1784580100
- Sigstore integration time:
-
Permalink:
shuruheel/mnestic@7fbb90351e19dafa1598bace81ede452caf47d1f -
Branch / Tag:
refs/tags/py-v0.8.4 - Owner: https://github.com/shuruheel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@7fbb90351e19dafa1598bace81ede452caf47d1f -
Trigger Event:
push
-
Statement type: