Skip to main content
Loading

Using the Product Preview

When you're ready, use the Python client and connect to the product preview. Use the following instructions to run a demo application for searching quotes.

Prerequisites

You don't have to know Aerospike to get started, but you do need the following:

  1. A Python 3.10 - 3.11 environment. See venv docs for more information about configuring your Python environment.
  2. The URL to your product preview environment, provided by Aerospike.

1. Clone the Examples Repository and Install Dependencies

git clone https://github.com/aerospike/proximus-examples.git && \\
cd proximus-examples/quote-semantic-search/quote-search && \\
python3 -m pip install -r requirements.txt --extra-index-url https://aerospike.jfrog.io/artifactory/api/pypi/aerospike-pypi-dev/simple

2. Set Environment Variables

Before starting the application, you need to set PROXIMUS_HOST to your product preview host.

export PROXIMUS_HOST=<PREVIEW-HOST>

By default the app will index 5000 quotes, but the dataset included in this repo has 100K quotes. Depending on the size of your dataset, you may want to configure concurrent parallelism for generating the text embeddings. Higher parallelism will consume more CPU resources. See the full list of configurable settings

3. Start the Application

To start the application locally, run the following:

waitress-serve --host 127.0.0.1 --port 8080 --threads 32 quote_search:app

Embeddings will be generated from each quote using the MiniLM model and those quotes will be added to the index to become searchable.

After starting the application, go to http://localhost:8080/search to perform a search.

The demo application enables semantic search for semantic meanings within quotes. Try using natural language searches, such as "Show me quotes about the meaning of life".