A document store is a kind of database that stores text and metadata and then provides them to the Retriever at query time. In deepset Cloud, you can use the DeepsetCloudDocumentStore. Learn how it works.
Working with pipelines in different environments requires a document store that can be shared among them and is compatible with all retrievers. This is why we created the DeepsetCloudDocumentStore. It makes it possible to interact with documents stored in deepset Cloud without having to index your data again.
DeepsetCloudDocumentStore is designed to access data that's already stored in deepset Cloud. It is not intended for use in production-like scenarios. For these scenarios, use API endpoints.
In most cases, you use
DeepsetCloudDocumentStore within a pipeline. However, if you want to initialize it on its own, run:
import os os.environ["DEEPSET_CLOUD_API_KEY"] = "<your_api_key>" os.environ["DEEPSET_CLOUD_API_ENDPOINT"] = "https://api.cloud.deepset.ai/api/v1" from haystack.document_stores import DeepsetCloudDocumentStore document_store = DeepsetCloudDocumentStore(index=pipeline_name)
These are the arguments the
When you create DeepsetCloudDocumentStore using a pipeline YAML in the deepset Cloud pipeline editor, these parameters are ignored:
In the Python SDK, all parameters are used.
|String||The secret value of the API key. This is the value that you copy in step 4 of Generating an API Key.|
If you do not specify it, it is read from the
|String||Specifies the deepset Cloud workspace containing the pipeline, string. Optional. Set this value to |
|String||The name of the pipeline to access within the deepset Cloud workspace.|
In deepset Cloud, indexes share the name with their respective pipelines.
|String||Specifies how to handle duplicate documents.|
|String||Specifies the URL of the deepset Cloud API. The API endpoint is: |
If you don't specify it, it's read from the
|String||Specifies the similarity function used to compare document vectors.|
|String||Specifies the name of the evaluation set uploaded to deepset Cloud.|
In deepset Cloud, label indexes share the name with their corresponding evaluation sets.
|Boolean||True/False||Returns document embeddings.|
|int||Default: 768||Specifies the dimensionality of the embedding vector. This is only needed when using a dense retriever, such as a |
|Specifies when to apply filters to search. By default, DeepsetCloudDocumentStore uses post-filtering when querying with filters. This means the filters are applied after the documents are retrieved. You can change it to pre-filtering, where the filters are applied before retrieving the documents. this comes at the cost of higher latency, though.|
DeepsetCloudDocumentStore is read-only and cannot be used for creating new pipelines. To use this document store, the pipeline must already exist.
Updated about 1 month ago