Updated on 2023-10-12 GMT+08:00

/chatbot/rest/tuc/v1/qualityInspection

Function

Intelligent training interface. After the training model is deployed and trained on the LODAS, the business interface in the intelligent IVR is invoked to send the user voice text information to the LODAS and obtain the scoring result from the intelligent engine. With the help of intelligent capabilities, an integrated system is built to implement capabilities such as customer chatbot simulation call training, automatic evaluation of reply accuracy, and automatic evaluation of operation accuracy. The following are implemented to improve work efficiency from the perspectives of employees, systems, and operations: pre-job tests and appraisals for new employees, training and appraisals for key and difficult business capabilities, job rotation training and appraisals for on-the-job employees, and reinstatement training and appraisals for employees awaiting job assignment.

Input Parameters

Table 1 Parameters in the request body

Parameter

Type

Mandatory (Yes/No)

Description

language

String

Yes

Language. The options are as follows:

zh_CN: Chinese

en_US: English

channelType

String

Yes

Inspection type.

Training scoring: exam.

speeches

JSON string

Yes

Dialog content to be scored.

If channelType is set to exam, the value of this parameter is the question ID and agent's answer.

The following is an example.

"speeches": "{\"examID\":\"jsex001\",\"speech\":\"*******\"}"

Method of using variables:

"speeches": "{\"examID\":\"${examID}\",\"speech\":\"${speech}\"}"

callTime

Long

Yes

Dialog timestamp, accurate to seconds.

In the training scoring scenario, set the timestamp to -1, which is meaningless.

Output Parameters

Table 2 Parameters in the response body

Parameter

Type

Description

examResponse

ExamResponse

Training scoring result, which is returned during training scoring.

qiResponse

QiResponse

Inspection score result, which is returned for common inspection.

(In the inspection scoring scenario, this parameter is not used currently.)

Table 3 Description of the examResponse field

Parameter

Type

Description

examId

String

Question ID.

score

Integer

Exam score (excluding sensitive words).

answerRules

List <Object>

Answer rules and score details.

sensitiveWordRules

sensitiveWordRuleMatch

Sensitive words involved in answers and points deducted.

Table 4 Description of the answerRules field

Parameter

Type

Description

positiveAnswer

String

Answer to the positive assessment point.

positiveWeight

Float

Weight of the positive assessment point.

positiveScore

Float

Score of the positive assessment point.

negativeAnswer

String

Answer to the negative assessment point.

negativeWeight

Float

Weight of the negative assessment point.

negativeScore

Float

Score of the negative assessment point.

Table 5 Description of the sensitiveWordRules field

Parameter

Type

Description

id

String

Sensitive word ID.

name

String

Content of sensitive words.

score

Integer

Sensitive word score.

beginTime

Long

Start timestamp of the training content, accurate to seconds.

endTime

Long

End timestamp of the training content, accurate to seconds.

speechId

Integer

Training content ID.

Request Example

{
    "language": "zh_CN",
    "channelType": "exam",
    "speeches": "{\"examID\":\"${examID}\",\"speech\":\"${speech}\"}",
    "callTime": "${callTime}"
}

Response Example

{
    "examResponse": {
        "examId": "TQ5",
        "score": 80.0,
        "answerRules": [
            {
                "positiveAnswer": "Positive answer of No.18",
                "positiveWeight": 0.5,
                "positiveScore": 40.0,
                "negativeAnswer": null,
                "negativeWeight": 0.0,
                "negativeScore": 0.0
            },
            {
                "positiveAnswer": "Positive answer of No.18",
                "positiveWeight": 0.5,
                "positiveScore": 40.0,
                "negativeAnswer": null,
                "negativeWeight": 0.0,
                "negativeScore": 0.0
            }
        ],
        "sensitiveWordRules": {
            "sensitiveWordRuleMatch": []
        }
    },
    "qiResponse": null
}

Input Parameter Configuration Example

In the manually entered message body, enter a request example. The ${Variable name} variable is automatically displayed on the Input Parameter tab page.

Output Parameter Configuration Example

Parameter

Path

Description

score

$.examResponse.score

Exam score (excluding sensitive words).

This parameter is returned during training scoring.