File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed
x-pack/plugin/esql/qa/testFixtures/src/main/resources Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -59,3 +59,17 @@ title:text | completion:keyword
5959War and Peace | THIS IS A PROMPT: WAR AND PEACE
6060War and Peace (Signet Classics) | THIS IS A PROMPT: WAR AND PEACE (SIGNET CLASSICS)
6161;
62+
63+ completion followed by stats
64+ required_capability: completion
65+ required_capability: match_operator_colon
66+
67+ FROM books METADATA _score
68+ | WHERE title:"war and peace" AND author:"Tolstoy"
69+ | COMPLETION CONCAT("This is a prompt: ", title) WITH { "inference_id" : "test_completion" }
70+ | STATS count=COUNT(*), avg_completion_length = AVG(LENGTH(completion))
71+ ;
72+
73+ count:long | avg_completion_length:double
74+ 4 | 50.75
75+ ;
Original file line number Diff line number Diff line change @@ -294,3 +294,18 @@ The Lord of the Rings - Boxed Set | 3.76885509490
294294Return of the King Being the Third Part of The Lord of the Rings | 3.6248698234558105 | 9.000900317914784E-4 | 0.001396648003719747
295295// end::combine-result[]
296296;
297+
298+ reranker followed by stats
299+ required_capability: rerank
300+ required_capability: match_operator_colon
301+
302+ FROM books METADATA _score
303+ | WHERE title:"war and peace" AND author:"Tolstoy"
304+ | SORT _score DESC, book_no ASC
305+ | RERANK "war and peace" ON title WITH { "inference_id" : "test_reranker" }
306+ | STATS count_book = COUNT(*) WHERE _score >= 0.03
307+ ;
308+
309+ count_book:long
310+ 2
311+ ;
You can’t perform that action at this time.
0 commit comments