Thrall embedding#20
Draft
tonytw1 wants to merge 66 commits into
Draft
Conversation
tonytw1
force-pushed
the
thrall-embedding
branch
2 times, most recently
from
July 12, 2026 11:43
3f685af to
4024c56
Compare
tonytw1
force-pushed
the
libvips-cropping
branch
3 times, most recently
from
July 12, 2026 21:36
4ba0933 to
80b4976
Compare
tonytw1
force-pushed
the
thrall-embedding
branch
2 times, most recently
from
July 12, 2026 22:05
3f9064e to
11cca56
Compare
tonytw1
force-pushed
the
libvips-cropping
branch
from
July 13, 2026 21:06
80b4976 to
5a33669
Compare
tonytw1
force-pushed
the
thrall-embedding
branch
8 times, most recently
from
July 19, 2026 12:07
711acd9 to
7ce6b8e
Compare
tonytw1
force-pushed
the
libvips-cropping
branch
from
July 19, 2026 12:11
5a33669 to
79be6a6
Compare
tonytw1
force-pushed
the
thrall-embedding
branch
from
July 19, 2026 12:13
7ce6b8e to
962c3b3
Compare
tonytw1
force-pushed
the
libvips-cropping
branch
from
July 23, 2026 21:08
79be6a6 to
5184ad9
Compare
tonytw1
force-pushed
the
thrall-embedding
branch
2 times, most recently
from
July 24, 2026 21:42
2c6f748 to
78f709f
Compare
tonytw1
force-pushed
the
libvips-cropping
branch
from
July 25, 2026 20:04
5184ad9 to
f393db1
Compare
…and optional embedding.
…nterface. embeddingSourceImageFormat so that embedder implementations can describe their required input format.
We have it and some embeddings require it so lets plumb it in.
…bedding object rather than List[Float] to push the specific embedding field choice down to the implementations.
…nts EmbeddingImplementation
…edrock. Push gcpProjectId to config.
…e frame. 1200 keeps image loader sub second.
0.9 looks like a usable cutoff for visually similar.
…rch. Extract embedding for image lookup.
…ike a must filter clause.
…ry. similar is handled with the knn special case.
Fixes no similar results because of:
```
"filter": {
"bool": {
"must": [
{
"match": {
"similar": {
"query": "f7bfe3925ac6562dbb7428e32b36c9f5e605a434",
"operator": "AND"
}
}
}
],
```
…alatiry in place.
…he SQS message; not ideal for billing and size limits.
…to create embedding calls.
Relax.
…past the valid matches.
tonytw1
force-pushed
the
thrall-embedding
branch
from
July 26, 2026 11:04
777fc52 to
9d69d21
Compare
…nd aiSimilarImagesMinimumSimilarity.
tonytw1
force-pushed
the
thrall-embedding
branch
from
July 26, 2026 12:14
5c1b666 to
9ba87a4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this change?
Embedding runs without the embedding lambda using ImageLoader and Thrall.
Tweaks to the general optionally of the embedder so that the absence of an embedding implementation gracefully ignores the embedding related code paths.
Generalises the embedding implementation then
migrates the embedding implementation from Bedrock to Gemini Embedding 2 for running in Google Cloud.
Embedding implementations define an
embeddingSourceImageFormatto indicate what format it needs it's input images to be in.ImageOperationsdefines a newcreateEmbeddingSourceto produce this image format.Image Loader calls
createEmbeddingSourceduring the image upload process placing the formatted image in a new embedding sources S3 Bucket.Image loader continues to publish the SQS embedding messages but Thrall is now the receiver.
Thrall gets a new SQS listener to consume the embedding messages, call the embedding API and publish the current
UpdateEmbeddingmessages onto the low priority queue for indexing.Stores calculated embeddings in an S3 bucket so that they can be reused when reindexing.
Nudges More Like this to be more of a boolean filter and enables it for all images which have an embedding.
Requires this mapping patch:
How should a reviewer test this change?
How can success be measured?
Who should look at this?
Tested? Documented?