toloka.client.task.BaseTask.KnownSolution | Source code
KnownSolution( self, *, output_values: Optional[Dict[str, Any]] = None, correctness_weight: Optional[float] = None )
Answers and hints for control and training tasks.
If several output fields are taken into account when checking, you must specify all combinations of the correct answer.
Correct answers in the task (for control tasks). If there are several correct answer options, for each option you need to define output_values and give the weight of the correct answer (key correctness_weight). "<output field id 1>": "<correct answer value 1>", "<output field id 2>": "<correct answer value 2>", ... "<output field id n>": "<correct answer value n>"
Weight of the correct answer. Allows you to set several options for correct answers and rank them by correctness. For example, if the weight of the correct answer is 0.5, half of the error is counted to the user. The more correct the answer in correctValues, the higher its weight.