Browse Source

[Inference API] Add Google Vertex AI reranking docs (#110390)

Tim Grein 1 year ago
parent
commit
406b969c62
1 changed files with 25 additions and 1 deletions
  1. 25 1
      docs/reference/inference/service-google-vertex-ai.asciidoc

+ 25 - 1
docs/reference/inference/service-google-vertex-ai.asciidoc

@@ -25,6 +25,7 @@ include::inference-shared.asciidoc[tag=task-type]
 --
 Available task types:
 
+* `rerank`
 * `text_embedding`.
 --
 
@@ -79,12 +80,19 @@ More information about the rate limits for Google Vertex AI can be found in the
 (Optional, object)
 include::inference-shared.asciidoc[tag=task-settings]
 +
+.`task_settings` for the `rerank` task type
+[%collapsible%closed]
+=====
+`top_n`:::
+(optional, boolean)
+Specifies the number of the top n documents, which should be returned.
+=====
++
 .`task_settings` for the `text_embedding` task type
 [%collapsible%closed]
 =====
 `auto_truncate`:::
 (optional, boolean)
-For `googlevertexai` service only.
 Specifies if the API truncates inputs longer than the maximum token length automatically.
 =====
 
@@ -109,3 +117,19 @@ PUT _inference/text_embedding/google_vertex_ai_embeddings
 }
 ------------------------------------------------------------
 // TEST[skip:TBD]
+
+The next example shows how to create an {infer} endpoint called
+`google_vertex_ai_rerank` to perform a `rerank` task type.
+
+[source,console]
+------------------------------------------------------------
+PUT _inference/rerank/google_vertex_ai_rerank
+{
+    "service": "googlevertexai",
+    "service_settings": {
+        "service_account_json": "<service_account_json>",
+        "project_id": "<project_id>"
+    }
+}
+------------------------------------------------------------
+// TEST[skip:TBD]