Skip to content

Commit 8cd1d98

Browse files
authored
[DOCS] Improves inference processor linking and docs (#66119) (#66985)
1 parent cb041c7 commit 8cd1d98

File tree

2 files changed

+26
-12
lines changed

2 files changed

+26
-12
lines changed

docs/reference/ingest/processors/inference.asciidoc

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=inference-config-classification
8888

8989
[source,js]
9090
--------------------------------------------------
91-
{
91+
"inference":{
92+
"model_id":"my_model_id"
9293
"inference_config": {
9394
"regression": {
9495
"results_field": "my_regression"
@@ -105,7 +106,8 @@ object.
105106

106107
[source,js]
107108
--------------------------------------------------
108-
{
109+
"inference":{
110+
"model_id":"my_model_id"
109111
"inference_config": {
110112
"classification": {
111113
"num_top_classes": 2,
@@ -123,14 +125,18 @@ categories for which the predicted probabilities are reported is 2
123125
classes to the `probabilities` field. Both fields are contained in the
124126
`target_field` results object.
125127

128+
Refer to the
129+
{ml-docs}/ml-lang-ident.html#ml-lang-ident-example[language identification]
130+
trained model documentation for a full example.
131+
126132

127133
[discrete]
128134
[[inference-processor-feature-importance]]
129135
==== {feat-imp-cap} object mapping
130136

131-
Update your index mapping of the {feat-imp} result field as you can see below to
132-
get the full benefit of aggregating and searching for
133-
{ml-docs}/ml-feature-importance.html[{feat-imp}].
137+
To get the full benefit of aggregating and searching for
138+
{ml-docs}/ml-feature-importance.html[{feat-imp}], update your index mapping of
139+
the {feat-imp} result field as you can see below:
134140

135141
[source,js]
136142
--------------------------------------------------
@@ -149,14 +155,16 @@ get the full benefit of aggregating and searching for
149155
--------------------------------------------------
150156
// NOTCONSOLE
151157

152-
The mapping field name for {feat-imp} is compounded as follows:
158+
The mapping field name for {feat-imp} (in the example above, it is
159+
`ml.inference.feature_importance`) is compounded as follows:
153160

154161
`<ml.inference.target_field>`.`<inference.tag>`.`feature_importance`
155162

156-
If `inference.tag` is not provided in the processor definition, it is not part
157-
of the field path. The `<ml.inference.target_field>` defaults to `ml.inference`.
163+
* `<ml.inference.target_field>`: defaults to `ml.inference`.
164+
* `<inference.tag>`: if is not provided in the processor definition, then it is
165+
not part of the field path.
158166

159-
For example, you provide a tag `foo` in the definition as you can see below:
167+
For example, if you provide a tag `foo` in the definition as you can see below:
160168

161169
[source,js]
162170
--------------------------------------------------
@@ -168,10 +176,10 @@ For example, you provide a tag `foo` in the definition as you can see below:
168176
// NOTCONSOLE
169177

170178

171-
The {feat-imp} value is written to the `ml.inference.foo.feature_importance`
172-
field.
179+
Then, the {feat-imp} value is written to the
180+
`ml.inference.foo.feature_importance` field.
173181

174-
You can also specify a target field as follows:
182+
You can also specify the target field as follows:
175183

176184
[source,js]
177185
--------------------------------------------------

docs/reference/ml/df-analytics/apis/ml-df-analytics-apis.asciidoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,11 @@ You can use the following APIs to perform {infer} operations.
2323
* <<get-trained-models-stats>>
2424
* <<delete-trained-models>>
2525

26+
You can deploy a trained model to make predictions in an ingest pipeline or in
27+
an aggregation. Refer to the following documentation to learn more.
28+
29+
* <<inference-processor,{infer-cap} processor>>
30+
* <<search-aggregations-pipeline-inference-bucket-aggregation,{infer-cap} bucket aggregation>>
31+
2632

2733
See also <<ml-apis>>.

0 commit comments

Comments
 (0)