Feedback Aide API Methods
getGraderAnnotations()
Retrieves the grader annotations for the current session instance.
You would want to use this to access the highlighted annotations that were generated during feedback, such as thesis statements, supporting evidence, and citations identified in the student's response.
Note This method returns null when the session was not configured with at least one of the annotations.grader evaluation options (thesis, evidence, or citations) set to true.
Examples
// Using the feedback session instance
const annotations = await feedbackSession.getGraderAnnotations();
// Using the session UI instance
const annotations = await sessionUI.getGraderAnnotations();
console.log(annotations);
// { grader_annotations: [{ id, highlight, comment, type }, ...] }
// or { grader_annotations: null }
Arguments
None.
Return value
Type Promise
Resolves to an object with the following property:
-
grader_annotations array[object] | null
An array of annotation objects, or
nullwhen the explainability grader annotations feature is not enabled for this session.The following properties are supported.
-
id string
A unique identifier for the annotation.
-
highlight object
The highlighted portion of the student's response that the annotation refers to.
The following properties are supported.
-
position object
The DOM position of the highlighted text within the response.
The following properties are supported.
-
startContainerPath string
A path identifying the start of the highlight range.
-
endContainerPath string
A path identifying the end of the highlight range.
-
-
content string
The text content of the highlighted passage.
-
-
comment string
A descriptive comment explaining why this passage was annotated.
-
type string
The category of the annotation.
Possible values
"annotation_thesis"- Identifies a thesis statement."annotation_evidence"- Identifies supporting evidence."annotation_citation"- Identifies a citation or reference.
-
Caveats
This method is not available when the feedbackSession state is "review".