You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The .query() method can currently optionally return 1) the distance value, and 2) the metadata for records, along with the vector ids. However, AFAIK, the developer has to take those returned vector IDs, instantiate a separate supabase client, and use those ids to actually pull down the embeddings for the records. It'd be nice (and clean) to allow the developer to just get the embeddings back too. That way, you just need to make the one .query() call in order to get your records.
Rationale
It's frustrating to have to make a whole second db call just to get back the embeddings.
Design
Feels like you could just add an include_embedding argument that would do this:
if include_embedding:
cols.append(self.table.c.vec)
Examples
From the vecs Introduction docs:
docs.query(
data=[0.4,0.5,0.6], # required
limit=1, # number of records to return
filters={"year": {"$eq": 2012}}, # metadata filters
include_embedding=true,
)
# Returns: [("vec1", [0.7, 0.8, 0.9])]
Drawbacks
I dunno what's happening on the db side to know if this is awful for some reason.
Alternatives
I can make another db call if I have to.
The text was updated successfully, but these errors were encountered:
Summary
The
.query()
method can currently optionally return 1) the distance value, and 2) the metadata for records, along with the vector ids. However, AFAIK, the developer has to take those returned vector IDs, instantiate a separatesupabase
client, and use those ids to actually pull down the embeddings for the records. It'd be nice (and clean) to allow the developer to just get the embeddings back too. That way, you just need to make the one.query()
call in order to get your records.Rationale
It's frustrating to have to make a whole second db call just to get back the embeddings.
Design
Feels like you could just add an
include_embedding
argument that would do this:Examples
From the
vecs
Introduction docs:Drawbacks
I dunno what's happening on the db side to know if this is awful for some reason.
Alternatives
I can make another db call if I have to.
The text was updated successfully, but these errors were encountered: