setFeedback - Methods - Feedback Aide API

Feedback Aide API Methods

setFeedback()

Overrides the current feedback session's data.

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, for example.

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 value to true will mark the session's score as zero and disable all rubric interactions.

      • rubric_scores array[object]

        An array of rubric score objects to override the feedback session's rubric scores.

        Important This option expects different object definitions depending on the rubric type: the criteria attribute is required for essay rubrics, and the id attribute is required for short response rubrics.

        // Essay
        {
            type: 'criteria_score'
            criteria: 'Identification of Personal and Societal Problems',
            score: 2,
            grade_type: 'manual'
        }
        
        // Short Response
        {
            type: 'shortresponseitem',
            id: 'id_2',
            score: 1,
            grade_type: 'auto'
        }
        

        The following properties are supported.

        • type string

          The type of rubric score to update.

          Possible values

          • "criteria_score" - essay criteria scoring.
          • "shortresponseitem" - short response item scoring.
        • id string

          The ID of the rubric entry being graded. This value should match an ID in the current rubric.

          Recommended format: id_0, id_1, ...

          Note Short response rubrics only.

        • criteria string

          The title of the criterion to be graded. This value should match a criterion in the current rubric.

          Note Essay rubrics only.

        • grade_type string

          Indicates whether the score was assigned automatically by Feedback Aide AI or manually by an educator.

          Possible values

          • "manual" - graded manually.
          • "auto" - graded by Feedback Aide AI.
          • "" - not graded yet.
        • score number

          The rubric score.

          For essays, this value must match a score defined in the current rubric criterion.

          For short responses, this value must match the score defined for the corresponding rubric entry.

      • max_score number

        The maximum score for the feedback session.

        Note This option has no effect, but is allowed for convenience as it is output from the getFeedback() method.

      • score number

        The score assigned to the feedback session.

        Note This option has no effect, but is allowed for convenience as it is output from the getFeedback() method.

Return value

Type Promise

Returns a promise that resolves when the feedback data has been successfully updated.

Was this article helpful?

Did you arrive here by accident? If so, learn more about Learnosity.