Hybrid search over California embeddings with Modal, MongoDB, and Clay
A hybrid search app over California combines timestamps, geolocation and satellite image embeddings using Modal, MongoDB Atlas and Clay's foundation model. Daily jobs pull new Sentinel imagery metadata for a GeoJSON area-of-interest into Atlas. A serverless GPU service on A10s embeds unembedded entries with Clay v1, merging hundreds of sub-region forward passes into one embedding via custom PyTorch, and writes them back. An Alpine JS frontend served by FastAPI issues combined geo, vector and time queries to Atlas. The rest of the post promotes the pairing's versatility, scalability and AI capabilities.
Related posts
- Introducing OlmoEarth embeddings: Custom embedding exports from OlmoEarth Studio for downstream analysis
Hugging Face mediumAdeptOlmoEarth Studio can now compute on-demand embedding exports from Ai2's open OlmoEarth Earth-observation foundation models, configurable by area, 1-12 monthly periods, encoder size (Nano 128-dim, Tiny 192-dim, Base 768-dim), 10-80 m resolution, and Sentinel-2/Sentinel-1 inputs. Output is a Cloud-Optimized GeoTIFF with one int8-quantized band per dimension. Worked examples with the Tiny encoder show label-free cosine-similarity search, a 60-pixel logistic-regression linear probe mapping mangroves in Vietnam at weighted F1 0.84, wildfire change detection via per-pixel cosine distance, and PCA false-color exploration. Frozen embeddings are pitched as a cheap entry point, with supervised fine-tuning recommended when higher accuracy is needed.
- Implementing semantic image search with Amazon Titan and Supabase Vector
Supabase mediumAdeptSemantic image search can be built in Python by generating 1024-dimensional embeddings for images with the Amazon Titan multimodal embedding model (amazon.titan-embed-image-v1) via Amazon Bedrock, then storing and querying them in Supabase Vector (Postgres with pgvector) using the vecs client. The walkthrough covers Poetry project setup, base64-encoding images for the Bedrock API, upserting embeddings with metadata into a vecs collection and creating an index. A text query is embedded with the same model and matched against image vectors with a metadata filter, and the top result is displayed with matplotlib. The same approach supports reverse image search.
- Image search with 🤗 datasets
Hugging Face mediumAdeptA text-to-image search over 10,000 British Library book embellishments can be built by loading the images with the 🤗 datasets ImageFolder loader and embedding them with the CLIP ViT-B/32 model via sentence_transformers. The embeddings are indexed with datasets' built-in add_faiss_index, and text prompts are queried with get_nearest_examples. push_to_hub stores intermediate datasets so work can move between machines, such as a laptop and a Colab GPU. Results for prompts like "a steam engine" or "a musical instrument" are not always correct but are usually reasonable, which is enough to search images by semantic content.
- Building a searchable photo library on the Neon backend with TanStack
Neon mediumAdept
Atlas is a TanStack Start app on Vercel that stores private photos in Neon Object Storage, metadata and vectors in Lakebase Postgres, identity in Managed Better Auth, and ranks CLIP embeddings with the Lakebase Search `lakebase_ann` index. The build covers a declarative `neon.ts` config, uploads via aws4fetch that write bytes before inserting the Postgres row, presigned GET URLs for a private bucket, and a Drizzle schema using a pgvector custom type. Every query is scoped to an owner ID taken from a JWKS-verified JWT. Face search runs exact scans over 1024-d descriptors with Chinese Whispers clustering. Because all of these primitives branch with copy-on-write, one Neon branch gives a preview environment with production data, objects, users and search indexes.
- In-Browser Semantic AI Search with PGlite and Transformers.js
Supabase mediumAdeptA fully local, in-browser semantic search can be built by combining PGlite (Postgres compiled to run in the browser, persisted to IndexedDB) with the pgvector extension and Transformers.js running the Supabase/gte-small embedding model. The tutorial sets up a React/Vite app, creates an embeddings table with a 384-dimension vector column and an HNSW index using inner product ops, and seeds it with precomputed embeddings. Queries then embed the user's search text in the browser and run inner product search against the local database. Suggested use cases include e-commerce product search and similar-product suggestions without a server roundtrip.