The embedding data type represents a dense vector derived from text. It is
opaque and meant for similarity comparisons and arithmetic combinations.
Embeddings can be written and read in .ion files, but they are not supported
in .csv or .tsv files. Use spark to get a compact text
representation.
Embeddings support == and !=, as well as +, -, and * operators.
embedding(text: text) ?? embedding, function
def pure embedding(t: text): embedding
Returns the embedding vector associated with the input text.
Example
table T = with
[| as Left, as Right |]
[| "supply chain", "inventory optimization" |]
[| "apple", "orange" |]
T.L = embedding(T.Left)
T.R = embedding(T.Right)
T.Score = similarity(T.L, T.R)
T.Label = spark(T.L)
show table "Embeddings" with
T.Left
T.Right
T.Label
T.Score