From e433842363d83431d817c709be9c7582a8ebcdd2 Mon Sep 17 00:00:00 2001 From: David Sertic <62056091+davidmyriel@users.noreply.github.com> Date: Mon, 19 Jun 2023 09:54:27 +0200 Subject: [PATCH] fix aleph alpha active voice and docs structure --- .../documentation/integrations/_index.md | 12 +++++ .../content/documentation/tutorials/_index.md | 7 +-- .../documentation/tutorials/bulk-upload.md | 2 +- .../multimodal-search.md} | 48 +++++++++---------- .../documentation/tutorials/neural-search.md | 2 +- .../documentation/tutorials/optimize.md | 2 +- 6 files changed, 42 insertions(+), 31 deletions(-) rename qdrant-landing/content/documentation/{integrations/aleph-alpha-search.md => tutorials/multimodal-search.md} (67%) diff --git a/qdrant-landing/content/documentation/integrations/_index.md b/qdrant-landing/content/documentation/integrations/_index.md index 1f8ccc8fb..f63c7e04f 100644 --- a/qdrant-landing/content/documentation/integrations/_index.md +++ b/qdrant-landing/content/documentation/integrations/_index.md @@ -5,3 +5,15 @@ weight: 24 is_empty: true --- +| Integration Instructions | Examples | +|---|---| +|AlephAlpha| Multimodal Search | +|Cohere | Adaptive Q&A Engine| +|DocArray | +|FiftyOne| +|Haystack | +|LangChain | +|LlamaIndex | Adaptive Q&A Engine| +|OpenAI | +|txtai | + diff --git a/qdrant-landing/content/documentation/tutorials/_index.md b/qdrant-landing/content/documentation/tutorials/_index.md index 83bf9be08..cca2d3008 100644 --- a/qdrant-landing/content/documentation/tutorials/_index.md +++ b/qdrant-landing/content/documentation/tutorials/_index.md @@ -14,10 +14,11 @@ These tutorials demonstrate different ways you can build vector search into your | Tutorial | Description | Stack | |-----------------------|----------------------------------------------|--------| -| [Optimize Qdrant](../tutorials/optimize/) | Configure Qdrant for best resource use. | Qdrant | +| [Configure Optimal Use](../tutorials/optimize/) | Configure Qdrant collections for best resource use. | Qdrant | | [Separate Partitions](../tutorials/multiple-partitions/) | Serve vectors for many independent users. | Qdrant | -| [Bulk Upload](../tutorials/bulk-upload/) | Upload a large scale dataset. | Qdrant | -| [Create a Simple Neural Search Service](../tutorials/neural-search/) | Build and deploy a neural search that browses startup data. | Qdrant, BERT, FastAPI | +| [Bulk Upload Vectors](../tutorials/bulk-upload/) | Upload a large scale dataset. | Qdrant | +| [Simple Neural Search](../tutorials/neural-search/) | Build and deploy a neural search that browses startup data. | Qdrant, BERT, FastAPI | +| [Multimodal Semantic Search](../tutorials/multimodal-search/) | Build a simple semantic search that combines text and image data. | Qdrant, Aleph Alpha | | [Troubleshooting](../tutorials/common-errors/) | Solutions to common errors and fixes | Qdrant | diff --git a/qdrant-landing/content/documentation/tutorials/bulk-upload.md b/qdrant-landing/content/documentation/tutorials/bulk-upload.md index eb140de50..1f6959a99 100644 --- a/qdrant-landing/content/documentation/tutorials/bulk-upload.md +++ b/qdrant-landing/content/documentation/tutorials/bulk-upload.md @@ -1,5 +1,5 @@ --- -title: Bulk upload vectors +title: Bulk Upload Vectors weight: 13 --- diff --git a/qdrant-landing/content/documentation/integrations/aleph-alpha-search.md b/qdrant-landing/content/documentation/tutorials/multimodal-search.md similarity index 67% rename from qdrant-landing/content/documentation/integrations/aleph-alpha-search.md rename to qdrant-landing/content/documentation/tutorials/multimodal-search.md index 532f1d497..13d8cac16 100644 --- a/qdrant-landing/content/documentation/integrations/aleph-alpha-search.md +++ b/qdrant-landing/content/documentation/tutorials/multimodal-search.md @@ -1,17 +1,17 @@ --- -title: Multimodal Search with Aleph Alpha -weight: 1100 +title: Multimodal Semantic Search +weight: 15 +hideInSidebar: true --- # Multimodal Semantic Search with Aleph Alpha -Semantic search goes well beyond textual data. It is surely a great alternative for the full-text search -but also allows us to perform a reverse image search and many more. However, in most cases, we were limited -to using the same data type for both documents and queries (text-text, image-image, audio-audio, etc.). With -the recent growth of multimodal architectures, it became possible to encode different data types into the same -latent space — for example, texts and images. That opens up some great possibilities, as we can finally **explore +| Time: 30 min | Level: Beginner | | | +| --- | ----------- | ----------- |----------- | + +In most cases, semantic search is limited to homogenous data types for both documents and queries (text-text, image-image, audio-audio, etc.). With the recent growth of multimodal architectures, it is now possible to encode different data types into the same latent space. That opens up some great possibilities, as you can finally **explore non-textual data, for example visual, with text queries**. In the past, it would require labelling every image -with a description of what it presents. Right now, we can rely on vector embeddings, which can represent all +with a description of what it presents. Right now, you can rely on vector embeddings, which can represent all the inputs in the same space. ![](/docs/integrations/aleph-alpha/2d_text_image_embeddings.png) @@ -23,24 +23,26 @@ https://deepai.org generated the images with pangrams used as input prompts.* ## Sample dataset You will be using [COCO](https://cocodataset.org/), a large-scale object detection, segmentation, and captioning dataset. It provides -various splits, 330K images in total. For the demonstration purposes we can choose a -[2017 validation split](http://images.cocodataset.org/zips/train2017.zip) that contains 5K images from different +various splits, 330,000 images in total. For demonstration purposes, this tutorials uses the +[2017 validation split](http://images.cocodataset.org/zips/train2017.zip) that contains 5000 images from different categories. ## Prerequisites There is no need to curate your datasets and train the models. [Aleph Alpha](https://www.aleph-alpha.com/), already has multimodality and multilinguality already built-in. There is an [official Python client](https://github.com/Aleph-Alpha/aleph-alpha-client) that simplifies the integration. -In order to enable the search capabilities, you need to build the search index to query on. For our purposes, -we are going to vectorize the images and store their embeddings along with the filenames, we can then return the most -similar files for given query. There are two things we need to set up before we start though: +In order to enable the search capabilities, you need to build the search index to query on. For this example, +you are going to vectorize the images and store their embeddings along with the filenames. You can then return the most +similar files for given query. -1. A Qdrant instance has to be running. If you want to launch it locally, +There are two things you need to set up before you start: + +1. You need to have a Qdrant instance running. If you want to launch it locally, [Docker is the fastest way to do that](https://qdrant.tech/documentation/quick_start/#installation). -2. You need to have a [Aleph Alpha account registered and confirmed](https://app.aleph-alpha.com/). Once it’s done, - the API key has to be created (see: [API Tokens](https://app.aleph-alpha.com/profile)). +2. You need to have a registered [Aleph Alpha account](https://app.aleph-alpha.com/). +3. Upon registration, create an API key (see: [API Tokens](https://app.aleph-alpha.com/profile)). -Now we can store the Aleph Alpha API key in a variable and choose the model we’re going to use. +Now you can store the Aleph Alpha API key in a variable and choose the model your are going to use. ```python aa_token = "<< your_token >>" @@ -113,13 +115,12 @@ qdrant_client.upsert( ## Query the database -Since `luminous-base`, a model we selected, can provide us the vectors for both texts and images, we can run both -text queries and reverse image search. No matter what we choose, the process won’t be much different. Let’s assume -we want to find images similar to the one below: +The `luminous-base`, model can provide you the vectors for both texts and images, which means you can run both +text queries and reverse image search. Assume you want to find images similar to the one below: ![An image used to query the database](/docs/integrations/aleph-alpha/visual_search_query.png) -With the following code snippet we create its vector embedding and then perform the lookup in Qdrant: +With the following code snippet create its vector embedding and then perform the lookup in Qdrant: ```python async with AsyncCliet(token=aa_token) as client: @@ -179,7 +180,4 @@ Here are the top 3 results for “Surfing”: ## Demo -In some cases, just a few lines of code might be enough to run a proper multimodal semantic search system. We were -able to do that, without any need to annotate the data or train our networks. Moreover, we are also able to query -it using multiple languages, thanks to Aleph Alpha multilinguality. If you are interested in seeing the full source code, -please check out [the repository](https://github.com/tugot17/Qdrant-Aleph-Alpha-Demo). +This tutorial showed you how to run a proper multimodal semantic search system with a few lines of code, without the need to annotate the data or train your networks. Moreover, due to Aleph Alpha multilinguality, you are also able to query it using multiple languages. diff --git a/qdrant-landing/content/documentation/tutorials/neural-search.md b/qdrant-landing/content/documentation/tutorials/neural-search.md index 33d4946a9..8e5fa1af6 100644 --- a/qdrant-landing/content/documentation/tutorials/neural-search.md +++ b/qdrant-landing/content/documentation/tutorials/neural-search.md @@ -1,5 +1,5 @@ --- -title: Create a Simple Neural Search Service +title: Simple Neural Search weight: 14 --- diff --git a/qdrant-landing/content/documentation/tutorials/optimize.md b/qdrant-landing/content/documentation/tutorials/optimize.md index bed71da47..7b0feee64 100644 --- a/qdrant-landing/content/documentation/tutorials/optimize.md +++ b/qdrant-landing/content/documentation/tutorials/optimize.md @@ -1,5 +1,5 @@ --- -title: Configure for optimal use +title: Configure Optimal Use weight: 11 ---