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
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.
7 months ago
..
langchain_community community[patch]: Include scores in MongoDB Atlas QA chain results (#14666) 7 months ago
scripts infra: import checking bugfix (#14569) 9 months ago
tests feat: adding paygo api support for Azure ML / Azure AI Studio (#14560) 7 months ago
Makefile create mypy cache dir if it doesn't exist (#14579) 9 months ago
README.md Batch update of alt text and title attributes for images in md/mdx files across repo (#15357) 8 months ago
_test_minimum_requirements.txt community[patch]: Release 0.0.14 (#16384) 7 months ago
poetry.lock multiple: update langsmith dep (#16407) 7 months ago
pyproject.toml community[patch]: Release 0.0.15 (#16474) 7 months ago

README.md

🦜🧑‍🤝‍🧑 LangChain Community

Downloads License: MIT

Quick Install

pip install langchain-community

What is it?

LangChain Community contains third-party integrations that implement the base interfaces defined in LangChain Core, making them ready-to-use in any LangChain application.

For full documentation see the API reference.

Diagram outlining the hierarchical organization of the LangChain framework, displaying the interconnected parts across multiple layers.

📕 Releases & Versioning

langchain-community is currently on version 0.0.x

All changes will be accompanied by a patch version increase.

💁 Contributing

As an open-source project in a rapidly developing field, we are extremely open to contributions, whether it be in the form of a new feature, improved infrastructure, or better documentation.

For detailed information on how to contribute, see the Contributing Guide.