From b8271bbc4a1a3e1e7a99649d001ac75a8e9245de Mon Sep 17 00:00:00 2001 From: aditya thomas Date: Sun, 31 Mar 2024 19:57:19 +0530 Subject: [PATCH] docs: (minor) updates to voyage ai documentation (#19819) **Description:** Updates to Voyage AI documentation **Issue:** Not Applicable **Dependencies:** None --- .../document_transformers/voyageai-reranker.ipynb | 14 +++++++------- docs/docs/integrations/providers/voyageai.mdx | 3 +-- .../integrations/text_embedding/voyageai.ipynb | 4 ++-- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/docs/docs/integrations/document_transformers/voyageai-reranker.ipynb b/docs/docs/integrations/document_transformers/voyageai-reranker.ipynb index 8571814cbdc..3457436e541 100644 --- a/docs/docs/integrations/document_transformers/voyageai-reranker.ipynb +++ b/docs/docs/integrations/document_transformers/voyageai-reranker.ipynb @@ -77,7 +77,7 @@ }, { "cell_type": "markdown", - "id": "6fa3d916", + "id": "36b283af", "metadata": { "jp-MarkdownHeadingCollapsed": true, "tags": [] @@ -310,13 +310,13 @@ "from langchain_community.document_loaders import TextLoader\n", "from langchain_community.vectorstores import FAISS\n", "from langchain_text_splitters import RecursiveCharacterTextSplitter\n", - "from langchain_voyageai import VoyageEmbeddings\n", + "from langchain_voyageai import VoyageAIEmbeddings\n", "\n", "documents = TextLoader(\"../../modules/state_of_the_union.txt\").load()\n", "text_splitter = RecursiveCharacterTextSplitter(chunk_size=500, chunk_overlap=100)\n", "texts = text_splitter.split_documents(documents)\n", "retriever = FAISS.from_documents(\n", - " texts, VoyageEmbeddings(model=\"voyage-2\")\n", + " texts, VoyageAIEmbeddings(model=\"voyage-2\")\n", ").as_retriever(search_kwargs={\"k\": 20})\n", "\n", "query = \"What did the president say about Ketanji Brown Jackson\"\n", @@ -326,11 +326,11 @@ }, { "cell_type": "markdown", - "id": "b7648612", + "id": "28f5da35", "metadata": {}, "source": [ "## Doing reranking with VoyageAIRerank\n", - "Now let's wrap our base retriever with a `ContextualCompressionRetriever`. We'll add an `VoyageAIRerank`, uses the Voyage AI rerank endpoint to rerank the returned results." + "Now let's wrap our base retriever with a `ContextualCompressionRetriever`. We'll use the Voyage AI reranker to rerank the returned results." ] }, { @@ -390,7 +390,7 @@ }, { "cell_type": "markdown", - "id": "b83dfedb", + "id": "aa8f3d24", "metadata": {}, "source": [ "You can of course use this retriever within a QA pipeline" @@ -457,7 +457,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.3" + "version": "3.9.6" } }, "nbformat": 4, diff --git a/docs/docs/integrations/providers/voyageai.mdx b/docs/docs/integrations/providers/voyageai.mdx index ffabe077315..d40cb69bedf 100644 --- a/docs/docs/integrations/providers/voyageai.mdx +++ b/docs/docs/integrations/providers/voyageai.mdx @@ -3,7 +3,6 @@ All functionality related to VoyageAI >[VoyageAI](https://www.voyageai.com/) Voyage AI builds embedding models, customized for your domain and company, for better retrieval quality. -> customized for your domain and company, for better retrieval quality. ## Installation and Setup @@ -12,7 +11,7 @@ Install the integration package with pip install langchain-voyageai ``` -Get an VoyageAI api key and set it as an environment variable (`VOYAGE_API_KEY`) +Get a VoyageAI API key and set it as an environment variable (`VOYAGE_API_KEY`) ## Text Embedding Model diff --git a/docs/docs/integrations/text_embedding/voyageai.ipynb b/docs/docs/integrations/text_embedding/voyageai.ipynb index 0e7b2a30133..486f762ef01 100644 --- a/docs/docs/integrations/text_embedding/voyageai.ipynb +++ b/docs/docs/integrations/text_embedding/voyageai.ipynb @@ -9,7 +9,7 @@ "\n", ">[Voyage AI](https://www.voyageai.com/) provides cutting-edge embedding/vectorizations models.\n", "\n", - "Let's load the Voyage Embedding class. (Install the LangChain partner package with `pip install langchain-voyageai`)" + "Let's load the Voyage AI Embedding class. (Install the LangChain partner package with `pip install langchain-voyageai`)" ] }, { @@ -219,7 +219,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.12" + "version": "3.9.6" }, "vscode": { "interpreter": {