Quickstart
info
This is a preview of the new Shaped docs. Found an issue or have feedback? Let us know!
In this tutorial, you'll learn how to upload your first data table and train your first engine.
Step 1: Get the data from Github
We'll use the movielens dataset enriched with data from IMDb and build a semantic search model.
Get the dataset here - Download movielens.jsonl
Step 2: Upload the data as a new table
- Open your Shaped dashboard
- Click Tables in the leftpane
- Click Add new table in the top right
Step 3: Configure a new engine
- In the leftpane, go to Engines
- Click Upload a new engine in the top right
- Paste the following YAML into the query editor:
version: v2
name: movielens_movie_recommendation_v2
data:
# specify a Shaped table to represent the items in your catalog
item_dataset:
name: movies_2018
# define how to index your data
index:
# specify a model to use to generate embeddings
embeddings:
- name: text_embedding
encoder:
type: hugging_face
model_name: sentence-transformers/all-MiniLM-L6-v2
item_fields:
- movie_title
Step 4: Query your engine
- In the leftpane, go to the Query section
- Copy the query below into the left-hand side
- Press Run
query:
type: rank_items
retrieve:
name: similar_items
embedding_ref: als
type: item_similarity
query_encoder:
input_item_id: $param.item_id
type: item_attribute_pooling
params:
item_id: db1234