Feedback Aide API Methods
feedbackSession()
Create or retrieve the scoring feedback session for the provided student based on his/her essay’s prompt (stimulus), attempted response (response), and rubric (if not set, InitOptions rubric will be used).
You would want to call this method when you want to create a feedback instance to grade or review the student's response.
Each feedback session requires a server-created security object (Feedback Aide - Technical / User Spec Documentation | Generating a secured token for FeedbackAide feedback session) and a unique session_uuid to represent that session.
If the provided session_uuid has been saved in our DB before, we will retrieve the stored stimulus, response, rubric, and feedback_scores. Otherwise, a new feedback session instance will be saved after the user performs save.
Examples
const feedbackSession = await feedbackApp.feedbackSession(
// security
{
access_token: '5eb0cb0f-183b-426c-8c62-0ed18ec113fc',
token_type: 'bearer',
expires_in: 7200
},
// feedback session options
{
state: 'grade',
session_uuid: '36eebda5-b6fd-4e74-ad06-8e69dfb89e3e',
stimulus: 'Write an essay about obesity and its impact on society',
response: 'Obesity is ...',
rubric: {...},
options: {...} // optional Model Options
}
);
Arguments
-
security object
Object containing security details.
See this Generating a secured token for FeedbackAide feedback session article for more information.
-
access_token string
The access token for authentication.
-
token_type string
Accepts "bearer" value only.
-
expires_in number
How long the provided token is valid.
-
-
options object
Object containing feedback session options.
-
state string
Accepts either "grade" or "review".
Default: grade
-
session_uuid string
Unique identifier for the session.
-
stimulus string
Required for
state: "grade"
only. The prompt or stimulus for the essay. -
response string
Required for
state: "grade"
only. The student's response to the essay prompt. -
rubric object
Required for
state: "grade"
only. The rubric that will be used to grade the student's response.See this creating feedback rubric for more information.
-
options object
Model options that can be used to tune the behaviour of the Feedback Aide Models. See Feedback Aide Model Options.
-
Return value
Type Promise
When the promise resolves, it will return a FeedbackSession
interface.
See this FeedbackSession for more information.