Skip to content

Commit bf7d5df

Browse files
committed
Adding a CSV tests with fork.
1 parent 69928fb commit bf7d5df

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

x-pack/plugin/esql/qa/testFixtures/src/main/resources/text-embedding.csv-spec

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,29 @@ be excellent to each other | 1.0
6666
live long and prosper | 0.0295
6767
all we have to decide is what to do with the time that is given to us | 0.0214
6868
;
69+
70+
71+
text_embedding with multiple knn queries in fork
72+
required_capability: text_embedding_function
73+
required_capability: dense_vector_field_type_released
74+
required_capability: knn_function_v5
75+
required_capability: fork_v9
76+
required_capability: semantic_text_field_caps
77+
78+
FROM semantic_text METADATA _score
79+
| FORK (EVAL query_embedding = TEXT_EMBEDDING("be excellent to each other", "test_dense_inference") | WHERE KNN(semantic_text_dense_field, query_embedding))
80+
(EVAL query_embedding = TEXT_EMBEDDING("live long and prosper", "test_dense_inference") | WHERE KNN(semantic_text_dense_field, query_embedding))
81+
| KEEP semantic_text_field, query_embedding, _score, _fork
82+
| EVAL _score = ROUND(_score, 4)
83+
| SORT _score DESC
84+
| LIMIT 10
85+
;
86+
87+
semantic_text_field:text | query_embedding:dense_vector | _fork:keyword | _score:double
88+
be excellent to each other | [45.0, 55.0, 54.0] | fork1 | 1.0
89+
live long and prosper | [50.0, 57.0, 56.0] | fork2 | 1.0
90+
be excellent to each other | [50.0, 57.0, 56.0] | fork2 | 0.0295
91+
live long and prosper | [45.0, 55.0, 54.0] | fork1 | 0.0295
92+
all we have to decide is what to do with the time that is given to us | [45.0, 55.0, 54.0] | fork1 | 0.0214
93+
all we have to decide is what to do with the time that is given to us | [50.0, 57.0, 56.0] | fork2 | 0.0109
94+
;

0 commit comments

Comments
 (0)