From 150251fd498788a7287ebb0dd134f89dcb3d53d8 Mon Sep 17 00:00:00 2001 From: Leonid Ganeline Date: Mon, 2 Sep 2024 15:08:50 -0700 Subject: [PATCH] docs: `integrations` reference updates 13 (#25711) Added missed provider pages and links. Fixed inconsistent formatting. Added arxiv references to docstirngs. --------- Co-authored-by: Harrison Chase Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com> --- docs/docs/integrations/providers/falkordb.mdx | 26 +++++++++++++++ .../docs/integrations/providers/firecrawl.mdx | 22 +++++++++++++ docs/docs/integrations/providers/friendly.md | 32 +++++++++++++++++++ docs/docs/integrations/providers/qdrant.mdx | 13 ++++++++ .../integrations/vectorstores/faiss.ipynb | 6 ++-- .../vectorstores/faiss_async.ipynb | 4 ++- .../embeddings/fastembed.py | 1 + .../langchain_community/vectorstores/faiss.py | 2 ++ libs/langchain/langchain/chains/flare/base.py | 5 ++- templates/rag-aws-bedrock/README.md | 6 ++-- 10 files changed, 111 insertions(+), 6 deletions(-) create mode 100644 docs/docs/integrations/providers/falkordb.mdx create mode 100644 docs/docs/integrations/providers/firecrawl.mdx create mode 100644 docs/docs/integrations/providers/friendly.md diff --git a/docs/docs/integrations/providers/falkordb.mdx b/docs/docs/integrations/providers/falkordb.mdx new file mode 100644 index 00000000000..66afc5522e7 --- /dev/null +++ b/docs/docs/integrations/providers/falkordb.mdx @@ -0,0 +1,26 @@ +# FalkorDB + +>[FalkorDB](https://www.falkordb.com/) is a creator of the [FalkorDB](https://docs.falkordb.com/), +> a low-latency Graph Database that delivers knowledge to GenAI. + + +## Installation and Setup + +See [installation instructions here](/docs/integrations/graphs/falkordb/). + + +## Graphs + +See a [usage example](/docs/integrations/graphs/falkordb). + +```python +from langchain_community.graphs import FalkorDBGraph +``` + +## Chains + +See a [usage example](/docs/integrations/graphs/falkordb). + +```python +from langchain_community.chains.graph_qa.falkordb import FalkorDBQAChain +``` diff --git a/docs/docs/integrations/providers/firecrawl.mdx b/docs/docs/integrations/providers/firecrawl.mdx new file mode 100644 index 00000000000..bbee26ceede --- /dev/null +++ b/docs/docs/integrations/providers/firecrawl.mdx @@ -0,0 +1,22 @@ +# FireCrawl + +>[FireCrawl](https://firecrawl.dev/?ref=langchain) crawls and converts any website into LLM-ready data. +> It crawls all accessible subpages and give you clean markdown +> and metadata for each. No sitemap required. + + +## Installation and Setup + +Install the python SDK: + +```bash +pip install firecrawl-py +``` + +## Document loader + +See a [usage example](/docs/integrations/document_loaders/firecrawl). + +```python +from langchain_community.document_loaders import FireCrawlLoader +``` diff --git a/docs/docs/integrations/providers/friendly.md b/docs/docs/integrations/providers/friendly.md new file mode 100644 index 00000000000..834a1ebfe80 --- /dev/null +++ b/docs/docs/integrations/providers/friendly.md @@ -0,0 +1,32 @@ +# Friendli AI + +>[Friendli AI](https://friendli.ai/) is a company that fine-tunes, deploys LLMs, +> and serves a wide range of Generative AI use cases. + + +## Installation and setup + +- Install the integration package: + + ``` + pip install friendli-client + ``` + +- Sign in to [Friendli Suite](https://suite.friendli.ai/) to create a Personal Access Token, +and set it as the `FRIENDLI_TOKEN` environment. + +## Chat models + +See a [usage example](/docs/integrations/chat/friendli). + +```python +from langchain_community.chat_models.friendli import ChatFriendli +``` + +## LLMs + +See a [usage example](/docs/integrations/llms/friendli). + +```python +from langchain_community.llms.friendli import Friendli +``` diff --git a/docs/docs/integrations/providers/qdrant.mdx b/docs/docs/integrations/providers/qdrant.mdx index 021f73d33ff..ad047ce0721 100644 --- a/docs/docs/integrations/providers/qdrant.mdx +++ b/docs/docs/integrations/providers/qdrant.mdx @@ -13,6 +13,19 @@ Install the Python partner package: pip install langchain-qdrant ``` +## Embedding models + +### FastEmbedSparse + +```python +from langchain_qdrant import FastEmbedSparse +``` + +### SparseEmbeddings + +```python +from langchain_qdrant import SparseEmbeddings +``` ## Vector Store diff --git a/docs/docs/integrations/vectorstores/faiss.ipynb b/docs/docs/integrations/vectorstores/faiss.ipynb index 1cc19a9b2c7..60106946982 100644 --- a/docs/docs/integrations/vectorstores/faiss.ipynb +++ b/docs/docs/integrations/vectorstores/faiss.ipynb @@ -7,7 +7,9 @@ "source": [ "# Faiss\n", "\n", - ">[Facebook AI Similarity Search (FAISS)](https://engineering.fb.com/2017/03/29/data-infrastructure/faiss-a-library-for-efficient-similarity-search/) is a library for efficient similarity search and clustering of dense vectors. It contains algorithms that search in sets of vectors of any size, up to ones that possibly do not fit in RAM. It also contains supporting code for evaluation and parameter tuning.\n", + ">[Facebook AI Similarity Search (FAISS)](https://engineering.fb.com/2017/03/29/data-infrastructure/faiss-a-library-for-efficient-similarity-search/) is a library for efficient similarity search and clustering of dense vectors. It contains algorithms that search in sets of vectors of any size, up to ones that possibly do not fit in RAM. It also includes supporting code for evaluation and parameter tuning.\n", + ">\n", + ">See [The FAISS Library](https://arxiv.org/pdf/2401.08281) paper.\n", "\n", "You can find the FAISS documentation at [this page](https://faiss.ai/).\n", "\n", @@ -528,7 +530,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.9" + "version": "3.10.12" } }, "nbformat": 4, diff --git a/docs/docs/integrations/vectorstores/faiss_async.ipynb b/docs/docs/integrations/vectorstores/faiss_async.ipynb index 770f8b78e0f..8c248e427ec 100644 --- a/docs/docs/integrations/vectorstores/faiss_async.ipynb +++ b/docs/docs/integrations/vectorstores/faiss_async.ipynb @@ -7,7 +7,9 @@ "source": [ "# Faiss (Async)\n", "\n", - ">[Facebook AI Similarity Search (Faiss)](https://engineering.fb.com/2017/03/29/data-infrastructure/faiss-a-library-for-efficient-similarity-search/) is a library for efficient similarity search and clustering of dense vectors. It contains algorithms that search in sets of vectors of any size, up to ones that possibly do not fit in RAM. It also contains supporting code for evaluation and parameter tuning.\n", + ">[Facebook AI Similarity Search (Faiss)](https://engineering.fb.com/2017/03/29/data-infrastructure/faiss-a-library-for-efficient-similarity-search/) is a library for efficient similarity search and clustering of dense vectors. It contains algorithms that search in sets of vectors of any size, up to ones that possibly do not fit in RAM. It also includes supporting code for evaluation and parameter tuning.\n", + ">\n", + ">See [The FAISS Library](https://arxiv.org/pdf/2401.08281) paper.\n", "\n", "[Faiss documentation](https://faiss.ai/).\n", "\n", diff --git a/libs/community/langchain_community/embeddings/fastembed.py b/libs/community/langchain_community/embeddings/fastembed.py index ac7253c21e3..3a0940c866c 100644 --- a/libs/community/langchain_community/embeddings/fastembed.py +++ b/libs/community/langchain_community/embeddings/fastembed.py @@ -12,6 +12,7 @@ MIN_VERSION = "0.2.0" class FastEmbedEmbeddings(BaseModel, Embeddings): """Qdrant FastEmbedding models. + FastEmbed is a lightweight, fast, Python library built for embedding generation. See more documentation at: * https://github.com/qdrant/fastembed/ diff --git a/libs/community/langchain_community/vectorstores/faiss.py b/libs/community/langchain_community/vectorstores/faiss.py index d6aacb2e36f..48225888e59 100644 --- a/libs/community/langchain_community/vectorstores/faiss.py +++ b/libs/community/langchain_community/vectorstores/faiss.py @@ -74,6 +74,8 @@ def _len_check_if_sized(x: Any, y: Any, x_name: str, y_name: str) -> None: class FAISS(VectorStore): """FAISS vector store integration. + See [The FAISS Library](https://arxiv.org/pdf/2401.08281) paper. + Setup: Install ``langchain_community`` and ``faiss-cpu`` python packages. diff --git a/libs/langchain/langchain/chains/flare/base.py b/libs/langchain/langchain/chains/flare/base.py index 1d55bed468b..53f3dd1e40e 100644 --- a/libs/langchain/langchain/chains/flare/base.py +++ b/libs/langchain/langchain/chains/flare/base.py @@ -73,7 +73,10 @@ def _low_confidence_spans( class FlareChain(Chain): """Chain that combines a retriever, a question generator, - and a response generator.""" + and a response generator. + + See [Active Retrieval Augmented Generation](https://arxiv.org/abs/2305.06983) paper. + """ question_generator_chain: Runnable """Chain that generates questions from uncertain spans.""" diff --git a/templates/rag-aws-bedrock/README.md b/templates/rag-aws-bedrock/README.md index a1bce7dcdd9..5d3afae72b4 100644 --- a/templates/rag-aws-bedrock/README.md +++ b/templates/rag-aws-bedrock/README.md @@ -1,10 +1,12 @@ -# RAG - AWS Bedrock +# RAG - AWS Bedrock, FAISS This template is designed to connect with the `AWS Bedrock` service, a managed server that offers a set of foundation models. It primarily uses the `Anthropic Claude` for text generation and `Amazon Titan` for text embedding, and utilizes FAISS as the vectorstore. -For additional context on the RAG pipeline, refer to [this notebook](https://github.com/aws-samples/amazon-bedrock-workshop/blob/main/03_QuestionAnswering/01_qa_w_rag_claude.ipynb). +For additional context on the RAG pipeline, refer to [these notebooks](https://github.com/aws-samples/amazon-bedrock-workshop/tree/main/02_KnowledgeBases_and_RAG). + +See [The FAISS Library](https://arxiv.org/pdf/2401.08281) paper for more details. ## Environment Setup