Examplary
  • Start for free
    Developer docs

    Grading with source materials

    Attach course materials to an exam, so the AI grades answers against what your students were actually taught.

    Without source materials, the AI grades answers with its own general knowledge and the rubric. When you attach the materials a course is based on, such as a textbook chapter, lecture slides as PDF or a recorded lecture, Examplary looks up what they say about each question and takes that into account when grading. Answers are then judged against what students were taught, including definitions, terminology and examples that are specific to your course.

    Adding source materials takes two steps: create a source material from a file, and attach it to the exam.

    Step 1: Create a source material

    Source materials are created from a file's URL. Any public HTTPS URL works, and Examplary keeps its own copy of the file, so the original link doesn't have to stay online. If your file isn't online, upload it to Examplary first.

    POST/source-materials
    {
      "url": "https://example.com/course-101/chapter-3.pdf",
      "contentType": "application/pdf",
      "externalId": "course-101-chapter-3",
      "tags": [
        "course-101"
      ]
    }

    These file types are supported:

    • Documents: PDF, DOCX, TXT and HTML
    • Images: PNG and JPEG
    • Audio: such as MP3, WAV, M4A, AAC, OGG and FLAC
    • Video: such as MP4, MOV, MPEG, AVI and WebM

    Examplary uses contentType to tell what kind of file it is, or the file extension in the URL if you leave it out. We recommend keeping files under 50 MB. Web pages work when their content is in the page's HTML: set contentType to text/html. Pages that only load their content with JavaScript, and video sites such as YouTube, aren't supported.

    FieldTypeDescription
    urlstringA public HTTPS URL of the file, such as one you uploaded. Required.
    contentTypestringThe file's content type, such as application/pdf.
    externalIdstringYour own ID for the material. You can list materials by it later.
    tagsarrayUp to 20 tags, to organise materials in Examplary.

    The response includes the material's id, which starts with material_.

    Step 2: Attach it to the exam

    Link materials to an exam with its sourceMaterialIds. You can do this straight after creating them: there's no need to wait for them to be processed. Pass them when creating the exam, or set them later:

    PATCH/exams/{id}
    {
      "sourceMaterialIds": [
        "{materialId}"
      ]
    }

    sourceMaterialIds replaces the exam's list of materials, so include all of them when you add one. The same materials are used for every question in the exam.

    Attach materials before importing answers

    Examplary prepares what it needs from the materials when an exam is published or its first answers are graded. Materials you attach after that may not be used for the exam's questions, and answers that were already graded aren't graded again. Attach all materials first, then import answers.