Skip to content

Commit 4e7650f

Browse files
update doc for negative values in relevance score
1 parent 7444595 commit 4e7650f

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

docs/reference/reranking/semantic-reranking.asciidoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ The retriever syntax makes it simple to configure both the retrieval and re-rank
103103
[%collapsible]
104104
==============
105105
The following example shows a search request that uses a semantic reranker to reorder the top-k documents based on their semantic similarity to the query.
106+
107+
NOTE: The relevance scores produced during reranking depend on the text similarity model used and can include negative values.
108+
106109
[source,console]
107110
----
108111
POST _search
@@ -121,8 +124,7 @@ POST _search
121124
"field": "text",
122125
"inference_id": "elastic-rerank",
123126
"inference_text": "How often does the moon hide the sun?",
124-
"rank_window_size": 100,
125-
"min_score": 0.5
127+
"rank_window_size": 100
126128
}
127129
}
128130
}

docs/reference/search/retriever.asciidoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ Defaults to `10`.
602602
+
603603
Sets a minimum threshold score for including documents in the re-ranked results.
604604
Documents with similarity scores below this threshold will be excluded.
605-
Note that score calculations vary depending on the model used.
605+
Note that score calculations vary depending on the model used and can result in negative values.
606606

607607
`filter`::
608608
(Optional, <<query-dsl, query object or list of query objects>>)
@@ -641,6 +641,8 @@ PUT _inference/rerank/my-elastic-rerank
641641
+
642642
. Define a `text_similarity_rerank` retriever:
643643
+
644+
NOTE: The relevance scores produced during reranking depend on the text similarity model used and can include negative values.
645+
+
644646
[source,console]
645647
----
646648
POST _search
@@ -659,8 +661,7 @@ POST _search
659661
"field": "text",
660662
"inference_id": "my-elastic-rerank",
661663
"inference_text": "How often does the moon hide the sun?",
662-
"rank_window_size": 100,
663-
"min_score": 0.5
664+
"rank_window_size": 100
664665
}
665666
}
666667
}

0 commit comments

Comments
 (0)