Feedback Aide API Methods
getFeedback()
Retrieves the feedback data for the current session instance.
You would want to use this to manually retrieve the feedback data which includes the score, max score, comment, and selected rubric item of the current session instance.
Note This method returns normalized data, not your raw input to setFeedback() (or the initial feedbackSession() options). The feedback data is sanitized when it is set, so the returned value may differ from what you originally supplied.
Examples
// Using the feedback session instance
const feedbackData = await feedbackSession.getFeedback();
// Using the session UI instance
const feedbackData = await sessionUI.getFeedback();
Arguments
None.
Return value
Type Promise
Resolves to an object with the following properties:
-
score number
The total score. Returns
0wheninsufficient_to_gradeistrue. -
max_score number
The maximum achievable score for this rubric.
-
comment string
The feedback comment as an HTML string. When set via
setFeedback(), the value is sanitized, so the returned HTML may differ from what was originally supplied. -
rubric_scores array[object]
An array of per-criterion score objects. The shape of each object depends on the rubric type. May be
nullorundefinedif no scores have been set.The following properties are supported.
-
type string
A discriminator indicating the rubric score type. Either
"criteria_score"for essay rubrics or"shortresponseitem"for short-response rubrics. -
id string
The identifier of the rubric criterion or short-response item.
-
score number
The score awarded for this criterion or item.
-
grade_type string
Indicates how the score was assigned. One of
"auto","manual", or""(ungraded). -
criteria string
The criterion title. Present only for
"criteria_score"type entries. -
comment string
A per-criterion comment. Present only for
"criteria_score"type entries. -
justification_of_score string
An explanation of why this score was awarded. Present only for
"criteria_score"type entries.
-
-
insufficient_to_grade boolean
Indicates that the response could not be scored, either because the AI determined it was not scorable or because it was manually flagged.