Feedback Aide API Methods
setFeedback()
Overrides the current feedback session's data to the provided values for rubric_scores
, comment
, or insufficient_to_grade
.
You would want to use this method to make corrections to the rubric scores or programmatically set your own feedback data when building your own user interface for Feedback Aide.
Note: rubric_scores
expects different formats for short response and essay rubrics.
Examples
// Essay Example
const feedbackData = await feedbackSession.setFeedback({
data: {
comment: 'Great job!',
insufficient_to_grade: false,
rubric_scores: [
{
type: 'criteria_score'
criteria: 'Understanding of the topic',
score: 1,
grade_type: 'manual'
},
{
type: 'criteria_score'
criteria: 'Identification of Personal and Societal Problems',
score: 2,
grade_type: 'manual'
},
{
type: 'criteria_score'
criteria: 'Use of Evidence',
score: 3,
grade_type: 'auto'
},
{
type: 'criteria_score'
criteria: 'Organization and Clarity',
score: 4,
grade_type: 'manual'
},
{
type: 'criteria_score'
criteria: 'Grammar and Mechanics',
score: 5,
grade_type: 'auto'
}
]
}
});
// Short Response Example
const feedbackData = await feedbackSession.setFeedback({
data: {
comment: 'First points were right but the last couple of points were wrong',
insufficient_to_grade: false,
rubric_scores: [
{
type: 'shortresponseitem',
id: 'id_0',
score: 1,
grade_type: 'auto'
},
{
type: 'shortresponseitem',
id: 'id_1',
score: 1,
grade_type: 'auto'
},
{
type: 'shortresponseitem',
id: 'id_2',
score: 1,
grade_type: 'auto'
},
{
type: 'shortresponseitem',
id: 'id_3',
score: 0,
grade_type: 'manual'
},
{
type: 'shortresponseitem',
id: 'id_4',
score: 0,
grade_type: 'auto'
}
]
}
});
Arguments
-
options object
Options to override the feedback session's data.
The following properties are supported.
-
data object
The feedback data to override the current session's data.
The following properties are supported.
-
comment string
A comment for the feedback session. This will override the current value in the session's overall comment text area.
-
insufficient_to_grade boolean
Indicates whether the feedback session is insufficient to grade, for example, the learner entered only one sentence for their essay. Setting this to
true
will mark the session's score as zero and disable all rubric interactions. -
rubric_scores array[RubricScore]
An array of rubric score objects to override the feedback session's rubric scores.
The following properties are supported.
-
RubricScore(Essay) object
The following properties are supported.
-
type string
The type of rubric_score, for essay this should be exactly 'criteria_score'
Possible values
"criteria_score"
- for essay criteria scoring."shortresponseitem"
- for short response item scoring.
-
criteria string
The title of the criterion to be graded. This value should match a criterion in the current rubric.
-
score number
The rubric score. This value should exist in the current rubric.
-
grade_type string
The grading type for the rubric. This is used in the default user interface to indicate which rubric scores were chosen by Feedback Aide AI or manually chosen by the educator. Accepted values are
manual
(graded manually),auto
(graded by Feedback Aide AI), or an empty string (indicating it hasn't been graded yet).Possible values
"manual"
- graded manually."auto"
- graded by Feedback Aide AI.""
- not graded yet.
-
-
RubricScore(ShortResponse) object
The following properties are supported.
-
type string
The type of rubric_score, for short response this should be exactly 'shortresponseitem'
Possible values
"criteria_score"
- for essay criteria scoring."shortresponseitem"
- for short response item scoring.
-
id string
The id of the item being graded. This value should match an id in the current rubric. (Recommended to be in the form 'id_0' etc.)
-
score number
The score that this item should be set too.
-
grade_type string
The grading type for the rubric. This is used in the default user interface to indicate which rubric scores were chosen by Feedback Aide AI or manually chosen by the educator. Accepted values are
manual
(graded manually),auto
(graded by Feedback Aide AI), or an empty string (indicating it hasn't been graded yet).Possible values
"manual"
- graded manually."auto"
- graded by Feedback Aide AI.""
- not graded yet.
-
-
-
-
Return value
Type Promise
Returns a promise that resolves when the feedback data has been successfully set.