Passage Generation and Diagnostic Test

  • The diagnostic test API is an async API so the response of the diagnostic API will contain diagonistic_test_status_url where you can make a GET request to check the status of test creation.

  • The number of mcqs generated will depend on the length of content

Why is this API async?

Diagnostic test creation might take more time as we’ve to execute the different algorithms so to avoid timeout errors & long response time we’re making the api async.

Some of the benefits of this approach are:

  • Non-blocking operations & improved scalability: you can request to create multiple tests without waiting for previous request completion.

  • Better User experience: You don’t have to wait for a response as you can check them back later.

Create diagnostic test

Path: /api/v1/test/diagnostic/

Method: POST

Payload Definition:

  • curriculum(required): object

    • sample_passage(required): string

      • Sample passage that needs to be used as a base for generating passage

    • sample_questions(required): string

      • Sample questions that need to be used as a base for generating questions

    • topics(required): list of strings

      • For which topics questions need to be generated

    • learning_outcome(required): string

      • Description about what're the learning goals student should achieve after going through the passage & the questions

  • grade(required): number

    • Grade of student

  • interest(required): string

    • interest that will be used for generating the passage

  • level(required): number

    • The level for which the diagnostic test needs to be generated

  • generation(required): number

    • 1: The first individual in a family tree to complete at least one baccalaureate degree.

    • 2: The individual whose parents have completed at least one baccalaureate degree.

    • 3: The individual whose grandparents and parents have completed at least one baccalaureate degree.

  • demography: string

    • demography of student(urban,semi_urban, rural…)

  • num_of_questions(optional): number

    • A maximum of 25 questions can be generated for a given passage

    • If the parameter is not passed we generate the 10 questions which default value

  • lexemes(optional): list of strings

    • words need to be emphasized while generating the passage & questions.

Request Data

Response Data

Once the request for creating the diagnostic test is made, we will send the above response where you can make a GET request to diagonistic_test_status_url where you can poll the api to get the status of diagnostic test creation. Once the test is successfully created you will get the following response.

Example

Request Data

Response Data

Check the status of diagnostic test creation

Path: /api/v1/test/diagnostic/<test_id>/status/

Method: GET

Request Data

Response Data

Example

Request Data

Response Data

success

Error

Last updated