superlinked_app/.env-example
as a template, create superlinked_app/.env
and set OPENAI_API_KEY
required for Natural Query Interface.
superlinked cli
is a one-package solution to deploy the Superlinked cluster on your GCP cloud.
Via superlinked cli
you will be able to run superlinked application at scale with additional important components such as batch engine, logging and more, utilizing the same superlinked configuration you used in your local setup!
Want to try it now? Contact us at superlinked.com.
__init__.py
It’s needed just to make a python package, you can keep it empty.
config.py
Settings of our application are read from .env
file.
You can create one simply by copying .env-example
and setting openai_api_key
which is needed for NLQ.
index.py
This file defines three important things:
description
) and three numeric fields (price
, rating
, rating_count
).
Description is embedded using all-mpnet-base-v2.
If you need faster model, you can try all-MiniLM-L6-v2.
Or if you are aiming for better retrieval quality, bigger models like gte-large-en-v1.5 are worth checking out.
Note. Apart from texts and numbers, out-of-the-box Superlinked can embed images, categories, recency.
It also supports arbitrary embeddings via custom spaces.
Learn more about Superlinked embeddings in our github!
Attribues like city, hotel-type, and amenities are used for hard-filtering.
query.py
and nlq.py
These two files define superlinked queries used for multi-modal semantic search with Natural Language Interface (NLI) on top.
Our github contains many helpful notebooks that show how to configure superlinked queries:
api.py
This file sets the following components: