langchain/libs/community/langchain_community
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.
2024-01-23 18:18:28 -08:00
..
adapters community[patch]: Add safe lookup to OpenAI response adapter (#14765) 2023-12-20 01:17:23 -05:00
agent_toolkits core[patch], community[patch], langchain[patch], docs: Update SQL chains/agents/docs (#16168) 2024-01-22 08:19:08 -08:00
callbacks community[minor]: Improve mlflow callback (#15691) 2024-01-23 18:16:51 -08:00
chat_loaders Do not issue beta or deprecation warnings on internal calls (#15641) 2024-01-07 20:54:45 -08:00
chat_message_histories communty[minor]: Store Message History to TiDB Database (#16304) 2024-01-22 13:56:56 -08:00
chat_models feat: adding paygo api support for Azure ML / Azure AI Studio (#14560) 2024-01-23 17:08:51 -08:00
docstore community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
document_loaders community[minor]: New documents loader for visio files (with extension .vsdx) (#16171) 2024-01-22 22:07:03 -08:00
document_transformers community[minor]: Adding asynchronous function implementation for Doctran (#15941) 2024-01-15 10:39:25 -08:00
embeddings community: normalize bedrock embeddings (#15103) 2024-01-23 17:05:24 -08:00
graphs Fix neo4j sanitize (#16439) 2024-01-23 10:56:28 -05:00
indexes community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
llms feat: adding paygo api support for Azure ML / Azure AI Studio (#14560) 2024-01-23 17:08:51 -08:00
output_parsers langchain[patch], community[minor]: move output_parsers.ernie_functions (#16057) 2024-01-17 10:06:18 -08:00
retrievers community[patch]: Handle when documents are not provided in the Cohere response (#16144) 2024-01-17 09:11:00 -08:00
storage community: SQLStrStore/SQLDocStore provide an easy SQL alternative to InMemoryStore to persist data remotely in a SQL storage (#15909) 2024-01-23 16:50:48 -08:00
tools community[patch]: Update bing results tool name (#16395) 2024-01-22 11:11:03 -08:00
utilities core[patch], community[patch], langchain[patch], docs: Update SQL chains/agents/docs (#16168) 2024-01-22 08:19:08 -08:00
utils openai[minor]: implement langchain-openai package (#15503) 2024-01-05 15:03:28 -08:00
vectorstores community[patch]: Include scores in MongoDB Atlas QA chain results (#14666) 2024-01-23 18:18:28 -08:00
__init__.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
cache.py Do not issue beta or deprecation warnings on internal calls (#15641) 2024-01-07 20:54:45 -08:00
py.typed community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00