Package version:

Interface ExtractiveQueryAnswer

Extracts answer candidates from the contents of the documents returned in response to a query expressed as a question in natural language.

interface ExtractiveQueryAnswer {
    answerType: "extractive";
    count?: number;
    maxAnswerLength?: number;
    threshold?: number;
}

Properties

answerType
count?: number

The number of answers returned. Default count is 1

maxAnswerLength?: number

An optional upper bound on the number of characters in each answer.

threshold?: number

The confidence threshold. Default threshold is 0.7