querying a table with embeddings in sql editor

I am trying to query a table in sql editor. It is just not working.
Here is my query:
select
documents.id,
documents.content,
1 - (documents.embedding <=> query_embedding) as similarity
from documents
where 1 - (documents.embedding <=> query_embedding) > 0.5
order by similarity desc
limit 1
The query_embedding variable I tried to replace with a 1536 long vector definition beginning with "[
-0.016951786,
-0.01891192,
0.0028827498,...
I tried various varients and none worked. query_embedding had to be defined twice. I was not able to define a variable to pre-define query_embedding like in Oracle's PLSQL.

Does anyone no any better?
Was this page helpful?