AnswerBuilder Parameters

Check the init an runtime parameters you can define for the AnswerBuilder component.

YAML Init Parameters

These are the parameters you can pass for AnswerBuilder in the pipeline YAML:

Parameter

Type

Possible Values

Description

pattern

String

Default: None

The regular expression you want to use to extract the answer text from the Generator's output. If not specified, uses the whole string as the answer.

The regular expression can have one capturing group at a maximum. If a capturing group is defined, the text that matches it is used as the answer. If there's no capturing group, the whole match is used as the answer.

For example: [^\n]+$ finds this is an answer in a string this is an argument.\\nthis is an answer. Answer: (.\*) finds this is an answer in a string this is an argument. Answer: this is an answer.

Optional

reference_pattern

String

Default: None

The regular expression you want to use to parse document references. It assumes references are specified as indices of the documents and indices start at 1.
For example: \[(\\d+)\] finds 1 in a string this is an answer[1].

If not specified, no parsing is done, and all documents are referenced.

Optional.

REST API Runtime Parameters

These are the parameters you can pass for AnswerBuilder through the Search REST API endpoint: