Skip to main content
Embeddings let you compare and group rows by their content. Chowder exposes these operations as SQL analytics. The demo bucket includes 42,306 movie summaries with a precomputed summary_embedding AI envelope, so you can start without generating vectors.
For the recorded Toy Story row, the nearest movies include Toy Story 2, Toy Story 3, and Small Fry. The projection keeps the nested result small; each neighbor also carries its similarity. To see one movie’s neighbors, compute them in a CTE and filter afterward, as in Flatten neighbors. A WHERE filter or a LIMIT in a subquery changes which movies are compared. For one movie against the full catalog, use a nearest-neighbor join.

Group similar plots and count the groups

At this high threshold, one recorded group contains versions of A Christmas Carol. Other groups include remakes with the same title. This is similarity of plot summaries, not a genre classifier. Cluster IDs and approximate-neighbor results can change between executions. clusterize connects rows through a thresholded nearest-neighbor graph. Lower thresholds may merge groups through chains of intermediate rows. COUNT(*) counts movies even when titles repeat; array_agg(DISTINCT title) lists distinct titles.

Compare one pair of populations

This compares Toy Story to the same catalog and excludes the source movie by ID. Both vectors come from the same saved embedding space. Before comparing the saved movie vectors with new embed vectors, check that their model_id values match.

Create text embeddings

Keep the full envelope to retain model, model_id, and error; access content_embedding.output for the FLOAT[N] vector.

Compare product images with a description

The default embedding model supports text and images in the same vector space. Start with a bounded set of 24 cup photos:
The result ranks that selected set, not the entire product catalog. ORDER BY requires embedding every selected image even though the final LIMIT returns only three. Increase the input limit deliberately when expanding the analysis.

Inspect the result

Replace SQL with any of the complete queries above. Materialize the relation with to_polars(), then pass the DataFrame to chowder.display(result) to inspect nested neighbor values or image columns. Null inputs preserve row count. neighbors and clusterize require FLOAT[N] embeddings and need the complete selected input population. Use remote compute when you want model work to run on a configured server.

Generate embeddings on Chowder Cloud

The saved movie vectors let you explore analytical operators without an embedding call. To create embeddings for your own text or images on managed GPU compute, follow the Cloud quickstart. Keep model identity with saved vectors and inspect usage on a bounded input batch first.