You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
langchain/libs/community/langchain_community/vectorstores
Noah Stapp e135e5257c
community[patch]: Include scores in MongoDB Atlas QA chain results (#14666)
Adds the ability to return similarity scores when using
`RetrievalQA.from_chain_type` with `MongoDBAtlasVectorSearch`. Requires
that `return_source_documents=True` is set.

Example use:

```
vector_search = MongoDBAtlasVectorSearch.from_documents(...)

qa = RetrievalQA.from_chain_type(
	llm=OpenAI(), 
	chain_type="stuff", 
	retriever=vector_search.as_retriever(search_kwargs={"additional": ["similarity_score"]}),
	return_source_documents=True
)

...

docs = qa({"query": "..."})

docs["source_documents"][0].metadata["score"] # score will be here
```

I've tested this feature locally, using a MongoDB Atlas Cluster with a
vector search index.
8 months ago
..
docarray community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
redis docs, experimental[patch], langchain[patch], community[patch]: update storage imports (#15429) 8 months ago
__init__.py community: Added Lantern as VectorStore (#12951) 8 months ago
alibabacloud_opensearch.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
analyticdb.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
annoy.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
astradb.py Fix AstraDB logical operator filtering (#15699) 8 months ago
atlas.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
awadb.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
azure_cosmos_db.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
azuresearch.py community: Fixing a performance issue with AzureSearch to perform batch embedding (#15594) 8 months ago
bageldb.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
baiducloud_vector_search.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
bigquery_vector_search.py community[minor]: add additional support for `BigQueryVectorSearch` (#15904) 8 months ago
cassandra.py community[patch]: Use newer MetadataVectorCassandraTable in Cassandra vector store (#15987) 8 months ago
chroma.py docs, experimental[patch], langchain[patch], community[patch]: update storage imports (#15429) 8 months ago
clarifai.py Community : Modified doc strings and example notebook for Clarifai (#15816) 8 months ago
clickhouse.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
dashvector.py community[patch]: fix dashvector endpoint params error (#14484) 9 months ago
databricks_vector_search.py docs: Add Databricks Vector Search example notebook (#14158) 9 months ago
deeplake.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
dingo.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
elastic_vector_search.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
elasticsearch.py community[patch]: ElasticsearchStore enable max inner product (#16393) 8 months ago
epsilla.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
faiss.py community[patch]: fix a bug that mistakenly handle zip iterator in FAISS.from_embeddings (#16020) 8 months ago
hippo.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
hologres.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
jaguar.py community[patch]: jaguar vector store fix integer-element error when joining metadata values (#15939) 8 months ago
lancedb.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
lantern.py community: Added Lantern as VectorStore (#12951) 8 months ago
llm_rails.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
marqo.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
matching_engine.py community[patch]: Matching engine, return doc id (#14930) 9 months ago
meilisearch.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
milvus.py community: add a flag that determines whether to load the milvus collection (#15693) 8 months ago
momento_vector_index.py community[patch]: support momento vector index filter expressions (#14978) 9 months ago
mongodb_atlas.py community[patch]: Include scores in MongoDB Atlas QA chain results (#14666) 8 months ago
myscale.py community: fix myscale delete function bug (#15675) 8 months ago
neo4j_vector.py Fix RRF and lucene escape characters for neo4j vector store (#14646) 9 months ago
nucliadb.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
opensearch_vector_search.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
pgembedding.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
pgvecto_rs.py community[patch]: fix typo in pgvecto_rs debug msg (#16318) 8 months ago
pgvector.py community[patch]: Implement vector length definition at init time in PGVector for indexing (#16133) 8 months ago
pinecone.py community[patch]: add vector param to index query for pinecone vec store (#16054) 8 months ago
qdrant.py community[patch]: implement adelete from VectorStore in Qdrant (#16005) 8 months ago
rocksetdb.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
scann.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
semadb.py fix: correct spelling mistakes of "seperate, intialise, pre-defined" (#14647) 9 months ago
singlestoredb.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
sklearn.py docs: docstrings `langchain_community` update (#14889) 9 months ago
sqlitevss.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
starrocks.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
supabase.py Support `score_threshold` in SupabaseVectorStore similarity search (#14439) 8 months ago
surrealdb.py community[minor]: Fix to match SurrealDB 0.3.2 SDK (#15996) 8 months ago
tair.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
tencentvectordb.py docs: docstrings `langchain_community` update (#14889) 9 months ago
tigris.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
tiledb.py docs: docstrings `langchain_community` update (#14889) 9 months ago
timescalevector.py docs: docstrings `langchain_community` update (#14889) 9 months ago
typesense.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
usearch.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
utils.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
vald.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
vearch.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
vectara.py template: Update Vectara templates (#15363) 8 months ago
vespa.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
vikngdb.py community[minor]: add vikingdb vecstore (#15155) 8 months ago
weaviate.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
xata.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
yellowbrick.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
zep.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
zilliz.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago