Hey guys,
I’m having a table with a text and an embedding of this text. The embedding is stored in a JSON field, as an array with 1536 floats.
My goal is to fetch the closest objects to a new given embedding. The logic itself is quite simple.
In a 2D coordinate system the formula would be d=√((x2 – x1)² + (y2 – y1)²). I adjusted the formula for the 1536 dimensions of the embeddings, which enables me to calculate the distance between any two embeddings. I planned to place the formula in the properties section [ABS(SQRT(formula)) AS distance] and then sort by distance ascending.
But I encountered several problems when trying to use the “Load table objects” block:
- ABS & SQRT are unknown formulas
- When I remove ABS/SQRT I receive the error “Parenthesis allowed only after keywords. There is no keyword or token before it.”
I hope that someone can point me in any direction to achieve the original goal (get objects with the closes distance to a new given embedding).