Getting Started with Feedback Aide API

Preview API Documentation - Subject to change

Integrating Learnosity Feedback Aide API into your system is a simple process.

1. Prerequisites

As well as some developer skills, you'll need the following:

2. Include the script to load Feedback Aide API

Include the following script in your HTML page, and also a DOM node where you want the UI to appear.

<script src="https://feedbackaide.learnosity.com/js"></script>
...
<div class="feedback-session-01"></div>

This script will add a `LearnosityFeedbackAide` object to the JavaScript runtime.

3. Create an Instance of FeedbackAide - LearnosityFeedbackAide.init()

In the JavaScript code of your app, create an instance of Feedback Aide.

const feedbackApp = await LearnosityFeedbackAide.init();

4. Create a feedback session using feedbackApp.feedbackSession()

rubric = "JSON Formatted rubric";

const feedbackSession = await feedbackApp.feedbackSession(
security,
{
"session_uuid": "36eebda5-b6fd-4e74-ad06-8e69dfb89e3e",
"stimulus": "Write an essay about obesity and its impact on the society",
"response": "Obesity is ...",
"rubric": JSON.parse(rubric)
}
)

5. Display the UI and evaluate the essay

We now use the feedbackSession to create the UI and attach it to the page. Finally, we make a call to generate the feedback.

// Create the UI object
const sessionUI = await feedbackSession.createUI();

// Attach the UI to the DOM
await sessionUI.attach(document.querySelector('.feedback-session-01'));

// Generate the AI feedback
await sessionUI.generateFeedback({"model":"standard-essay"});

You have now done your first FeedbackAide session.

 

Was this article helpful?

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