diff --git a/bootcamp/tutorials/integration/rag_with_milvus_and_haystack.ipynb b/bootcamp/tutorials/integration/rag_with_milvus_and_haystack.ipynb index 0bd2ef984..f96ccf273 100644 --- a/bootcamp/tutorials/integration/rag_with_milvus_and_haystack.ipynb +++ b/bootcamp/tutorials/integration/rag_with_milvus_and_haystack.ipynb @@ -25,7 +25,7 @@ "\n", "This guide demonstrates how to build a Retrieval-Augmented Generation (RAG) system using Haystack and Milvus.\n", "\n", - "The RAG system combines a retrieval system with a generative model to generate new text based on a given prompt. The system first retrieves relevant documents from a corpus using Milvus, and then uses a generative model to generate new text based on the retrieved documents.\n", + "The RAG system combines a retrieval system with a generative model to generate new text based on a given prompt. The system first retrieves relevant documents from a corpus using a vector similarity search engine like Milvus, and then uses a generative model to generate new text based on the retrieved documents.\n", "\n", "[Haystack](https://haystack.deepset.ai/) is the open source Python framework by deepset for building custom apps with large language models (LLMs). [Milvus](https://milvus.io/) is the world's most advanced open-source vector database, built to power embedding similarity search and AI applications.\n", "\n", @@ -141,6 +141,7 @@ "from haystack.components.embedders import OpenAIDocumentEmbedder, OpenAITextEmbedder\n", "from haystack.components.preprocessors import DocumentSplitter\n", "from haystack.components.writers import DocumentWriter\n", + "from haystack.utils import Secret\n", "\n", "from milvus_haystack import MilvusDocumentStore\n", "from milvus_haystack.milvus_embedding_retriever import MilvusEmbeddingRetriever\n", @@ -149,7 +150,7 @@ "document_store = MilvusDocumentStore(\n", " connection_args={\"uri\": \"./milvus.db\"},\n", " # connection_args={\"uri\": \"http://localhost:19530\"},\n", - " # connection_args={\"uri\": YOUR_ZILLIZ_CLOUD_URI, \"token\": YOUR_ZILLIZ_API_KEY},\n", + " # connection_args={\"uri\": YOUR_ZILLIZ_CLOUD_URI, \"token\": Secret.from_env_var(\"ZILLIZ_CLOUD_API_KEY\")},\n", " drop_old=True,\n", ")" ], @@ -368,6 +369,18 @@ ")\n", "print(\"RAG answer:\", results[\"generator\"][\"replies\"][0])" ] + }, + { + "cell_type": "markdown", + "source": [ + "For more information about how to use milvus-haystack, please refer to the [milvus-haystack Readme](https://github.com/milvus-io/milvus-haystack)." + ], + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%% md\n" + } + } } ], "metadata": {