Quick Feature Tour

Try out RelevanceAI in 5 steps!

Relevance AI is designed and built to help developers to experiment, build and share the best vectors to solve similarity and relevance based problems across the organisation.

Welcome to RelevanceAI!Welcome to RelevanceAI!

Welcome to RelevanceAI!

In 5 short steps, get a shareable dashboard for experiments insight!

Run this Quickstart in Colab: Open In ColabOpen In Colab

1. Set up Relevance AI and Vectorhub for Encoding!

!pip install -U RelevanceAI==0.27.0
!pip install -U vectorhub[clip]

Follow the signup flow and get your credentials below. Alternatively, you can sign up/login and find your credentials in the Settings Area here

from relevanceai import Client 

"""
Running this cell will provide you with 
the link to sign up/login page where you can find your credentials.
Once you have signed up, click on the value under `Authorization token` 
in the API tab
and paste it in the appreared Auth token box below
"""

client = Client()
Get your Auth DetailsGet your Auth Details

Get your Auth Details

2. Create a dataset and insert data

Use one of your sample datasets to insert into your own dataset!

from relevanceai.datasets import get_sample_ecommerce_dataset
documents = get_sample_ecommerce_dataset()
documents[0]

client.insert_documents(dataset_id="quickstart", documents=documents)
See your dataset in the dashboardSee your dataset in the dashboard

See your dataset in the dashboard

3. Encode data and upload vectors into your new dataset

Encode new product image vector using our models out of the box using Vectorhub's Clip2Vec models and update your dataset.

from vectorhub.bi_encoders.text_image.torch import Clip2Vec
enc = Clip2Vec()

# Set the default encode to encoding an image
enc.encode = enc.encode_image
documents = enc.encode_documents(fields=["product_image"], documents=documents)

client.update_documents(dataset_id="quickstart", documents=documents)

client.datasets.schema(dataset_id="quickstart")
Monitor your vectors in the dashboardMonitor your vectors in the dashboard

Monitor your vectors in the dashboard

View your dataset in the dashboardView your dataset in the dashboard

View your dataset in the dashboard

4. Run clustering on your vectors

Run clustering on your vectors to better understand your data. Yo can view the clusters in our clustering dashboard following the provided link when clustering finishes.

centroids = client.vector_tools.cluster.kmeans_cluster(
    dataset_id = "quickstart", 
    vector_fields = ["product_image_clip_vector_"],
    k = 10
)

client.services.cluster.centroids.list_closest_to_center(
  dataset_id = "quickstart", 
  vector_field = "product_image_clip_vector_", 
  cluster_ids = [],                 # Leave this as an empty list if you want all of the clusters,
  alias = "kmeans_10"
)
See what your clusters representSee what your clusters represent

See what your clusters represent

You can read more about how to analyse clusters in your data here.

5. Run a vector search

See your search results on the dashboard here https://cloud.relevance.ai/sdk/search.

query = "xmas gifts"  # query text
query_vec_txt = client.services.encoders.text(text=query)

client.services.search.vector(
    dataset_id = "quickstart", 
  multivector_query = [
    {"vector": query_vec_txt["vector"], 
     "fields": ["product_image_clip_vector_"]},
  ],
  page_size = 3,
  query = "sample search" # Stored on the dashboard
)
Visualise your search resultsVisualise your search results

Visualise your search results

You can read more about how to construct a multi-vector query with those features here.

6. Project your vectors in 3D space

Coming soon!

7. Compare model, clustering, search and application configurations over a series of different experiments

Coming soon!

This is just the start. Relevance AI comes out of the box with support for features such as cluster aggregation, and evaluation to further make sense of your unstructured data and multi-vector search, filters, facets and traditional keyword matching to enhance your vector search capabilities.

Get started with some example applications you can build with Relevance AI. Check out some other guides below!


Did this page help you?