Skip to content

Open Answer

Free text answer. Evaluated by character similarity or minimum length.

With correctAnswer (Levenshtein similarity)

Texts are truncated to 500 characters for calculation.

FeedbackCondition
"Good answer!" + correct: true, score 8-10similarity >= 0.8
"Your answer is partially correct." + correct: false, score 5-70.5 <= sim < 0.8
"Incorrect. Review the topic and try again." + correct: false, score 0-4similarity < 0.5
{
"exerciseId": "ex_003",
"area": "writing",
"type": "open_answer",
"answer": "The cat is sleeping on the couch",
"correctAnswer": "The cat sleeps on the sofa"
}
{
"correct": false,
"score": 7,
"feedback": "Your answer is partially correct. Try to be more precise.",
"metadata": { "area": "writing", "type": "open_answer" }
}

Without correctAnswer (minimum length)

FeedbackCondition
"Answer received." + correct: true, score 10length >= 10 characters
"Answer too short." + correct: false, score 0length < 10 characters
{
"exerciseId": "ex_003b",
"area": "writing",
"type": "open_answer",
"answer": "I think dogs are loyal companions to humans."
}

Without correctAnswer, only checks that the user wrote something meaningful. For quality evaluation, always include correctAnswer.