Skip to main content

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


Download files

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

Source Distribution

langchain_mnestic-0.1.0.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

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

langchain_mnestic-0.1.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

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

Hashes for langchain_mnestic-0.1.0.tar.gz
Algorithm Hash digest
SHA256 523200ad30bbb0da9a7da2de2e5e46563a0bf4b3d2738138f3622afa6e9901a6
MD5 a0b2b9df975a42e4ba769b6843622c71
BLAKE2b-256 c0914aec9f27106e0b1e302346827ad717ced4f93f1560eaa7fe259a3f6f4193

See more details on using hashes here.

Provenance

The following attestation bundles were made for langchain_mnestic-0.1.0.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 langchain_mnestic-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_mnestic-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9d0e0e442fd126ec14f456cf89075e0b40cf153117cd786bab1c8e4c0625b0ca
MD5 b21cf126fc6c2e167021e4f9998558d7
BLAKE2b-256 49bfd6266fe65f88c7f6852b400e553ad77d8786ade4d99ebb355d38565db805

See more details on using hashes here.

Provenance

The following attestation bundles were made for langchain_mnestic-0.1.0-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.

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