Skip to content

Commit

Permalink
[DOCS] Fine-tunes inference connector and action docs (elastic#198345)
Browse files Browse the repository at this point in the history
(cherry picked from commit dc8322a)
  • Loading branch information
szabosteve committed Oct 30, 2024
1 parent d92ea83 commit 2036c3a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 10 deletions.
4 changes: 2 additions & 2 deletions docs/management/action-types.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ a| <<gemini-action-type,{gemini}>>

| Send a request to {gemini}.

a| <<inference-action-type,{inference}>>
a| <<inference-action-type,{infer}>>

| Send a request to {inference}.
| Send a request to {infer}.

a| <<email-action-type,Email>>

Expand Down
32 changes: 24 additions & 8 deletions docs/management/connectors/action-types/inference.asciidoc
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
[[inference-action-type]]
== {infer-cap} connector and action
++++
<titleabbrev>{inference}</titleabbrev>
<titleabbrev>{infer-cap}</titleabbrev>
++++
:frontmatter-description: Add a connector that can send requests to {inference}.
:frontmatter-tags-products: [kibana]
:frontmatter-tags-content-type: [how-to]
:frontmatter-tags-user-goals: [configure]


The {infer} connector uses the {es} client to send requests to an {infer} service. The connector uses the <<execute-connector-api,run connector API>> to send the request.
The {infer} connector uses the {es} client to send requests to an {infer} service.
The connector uses the <<execute-connector-api,run connector API>> to send the request.

[float]
[[define-inference-ui]]
Expand All @@ -19,7 +20,7 @@ You can create connectors in *{stack-manage-app} > {connectors-ui}*. For example

[role="screenshot"]
image::management/connectors/images/inference-connector.png[{inference} connector]
// NOTE: This is an autogenerated screenshot. Do not edit it directly.


[float]
[[inference-connector-configuration]]
Expand All @@ -44,7 +45,8 @@ while creating or editing the connector in {kib}. For example:

[role="screenshot"]
image::management/connectors/images/inference-completion-params.png[{infer} params test]
// NOTE: This is an autogenerated screenshot. Do not edit it directly.


[float]
[[inference-connector-actions]]
=== {infer-cap} connector actions
Expand All @@ -56,33 +58,40 @@ The {infer} actions have the following configuration properties. Properties depe
==== Completion

The following example performs a completion task on the example question.

Input::
The text on which you want to perform the {infer} task. For example:
+
[source,text]
--
[source,text]
------------------------------------------------------------
{
input: 'What is Elastic?'
}
------------------------------------------------------------
--

[float]
[[inference-connector-perform-text-embedding]]
==== Text embedding

The following example performs a text embedding task.

Input::
The text on which you want to perform the {infer} task. For example:
+
[source,text]
--
[source,text]
------------------------------------------------------------
{
input: 'The sky above the port was the color of television tuned to a dead channel.',
task_settings: {
input_type: 'ingest'
}
}
------------------------------------------------------------
--

Input type::
An optional string that overwrites the connector's default model.

Expand All @@ -91,16 +100,20 @@ An optional string that overwrites the connector's default model.
==== Reranking

The following example performs a reranking task on the example input.

Input::
The text on which you want to perform the {infer} task. Should be a string array. For example:
+
[source,text]
--
[source,text]
------------------------------------------------------------
{
input: ['luke', 'like', 'leia', 'chewy', 'r2d2', 'star', 'wars'],
query: 'star wars main character'
}
------------------------------------------------------------
--

Query::
The search query text.

Expand All @@ -109,14 +122,17 @@ The search query text.
==== Sparse embedding

The following example performs a sparse embedding task on the example sentence.

Input::
The text on which you want to perform the {infer} task. For example:
+
[source,text]
--
[source,text]
------------------------------------------------------------
{
input: 'The sky above the port was the color of television tuned to a dead channel.'
}
------------------------------------------------------------
--

[float]
Expand Down

0 comments on commit 2036c3a

Please sign in to comment.