Skip to main content

langchain-vectorpanda

LangChain VectorStore integration for Vector Panda.

Drop Vector Panda into any LangChain RAG application — from_texts, similarity_search, get_by_ids, MMR re-ranking, metadata filters, all work out of the box.

Install

pip install langchain-vectorpanda

Quickstart

from langchain_openai import OpenAIEmbeddings
from langchain_vectorpanda import VectorPandaStore

embeddings = OpenAIEmbeddings()

# Create + populate in one call
store = VectorPandaStore.from_texts(
    texts=[
        "Pandas are bears native to south-central China.",
        "The Eiffel Tower is in Paris.",
        "Bamboo makes up 99% of a giant panda's diet.",
    ],
    embedding=embeddings,
    collection_name="my_docs",
    api_key="vp_...",
)

# Search
results = store.similarity_search("what do pandas eat?", k=2)
for doc in results:
    print(doc.page_content)

# With diversity (MMR)
results = store.max_marginal_relevance_search(
    "what do pandas eat?", k=2, fetch_k=10, lambda_mult=0.5
)

# With metadata filters (Mongo-style)
results = store.similarity_search(
    "Paris landmarks",
    k=3,
    filter={"category": {"$eq": "travel"}},
)

# Fetch documents back by ID (missing IDs are skipped, never raise)
docs = store.get_by_ids(["doc-1", "doc-2"])

Use an existing collection

from veep import VP
from langchain_vectorpanda import VectorPandaStore

client = VP(api_key="vp_...")
store = VectorPandaStore(
    collection_name="my_existing_collection",
    embedding=embeddings,
    client=client,
)

Use with RetrievalQA

from langchain.chains import RetrievalQA
from langchain_openai import ChatOpenAI

retriever = store.as_retriever(search_type="mmr", search_kwargs={"k": 4})
qa = RetrievalQA.from_chain_type(llm=ChatOpenAI(), retriever=retriever)
qa.invoke({"query": "What do pandas eat?"})

Filter syntax

Vector Panda accepts Mongo-style metadata filters:

Operator Example
$eq, $ne {"color": {"$eq": "red"}}
$gt, $gte, $lt, $lte {"price": {"$gt": 100}}
$in, $nin {"tag": {"$in": ["a", "b"]}}
$and, $or {"$and": [{"a": 1}, {"b": 2}]}

A bare value is shorthand for $eq: {"color": "red"} ≡ {"color": {"$eq": "red"}}.

License

MIT — see LICENSE.

Metadata

Release files for langchain-vectorpanda 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langchain-vectorpanda 0.1.3
File Size Uploaded Provenance
langchain_vectorpanda-0.1.3.tar.gz 14.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for langchain-vectorpanda 0.1.3
File Interpreter ABI Platform
langchain_vectorpanda-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 22.6 kB

Release files / langchain_vectorpanda-0.1.3.tar.gz

Download URL langchain_vectorpanda-0.1.3.tar.gz
Size 14.0 kB
Tags Source
SHA-256 checksum
How to use checksums
8607ef2a328ddb419c71d576f8af82757318eb911e1d57eb9789bf10ff25af63
BLAKE2b-256 checksum
How to use checksums
99abce93c791fc00a92088f2a3e5f2818ac8b482d132fbdcbe12cb61a502e4ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / langchain_vectorpanda-0.1.3-py3-none-any.whl

Download URL langchain_vectorpanda-0.1.3-py3-none-any.whl
Size 8.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
29c34580a87e6c0218257de4eac308c47b569fd3145c54d57f5b4fb351b2db3e
BLAKE2b-256 checksum
How to use checksums
010afd72daf9348354b1446fb3f3440a6d0e52f4a4940a9963ad2fd3892fb7e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for langchain-vectorpanda 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files No provenance

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