marvelai-org / marvel-ai-backend

This is the Marvel Teaching Assistant ai repo.
MIT License
17 stars 85 forks source link

Rubric Generator Expedition - Silicone Sages #110

Open asleem opened 3 weeks ago

asleem commented 3 weeks ago

Summary

This Pull Request is for the Rubric Generator expedition, a new feature added to the Marvel-AI that allows educators to generate a customized rubric for an assignment based on the learning standard, point_scale and grade level specified. Moreover, educators can download the generated rubric as a pdf document. In this PR we are using the extended file support (document loaders) that was created in epic 7.1 so educators can upload an assignment in a wide range of file type/format in order to generate the corresponding rubric.

Changes

Testing

RG terminal pytest

Results

The result is a downloadable pdf document that contain the rubric generated in a table template. RG fastapi screenshot- rubric.pdf

Notes

First, the LLM generates the rubric in JSON format. Next, we create a LaTeX document and insert the rubric into a table template. Finally, the LaTeX document is compiled into a PDF file. The max number for the point scale is set to 8, the suggested value is 4 for optimal granularity in grading and to better fit in the generated rubric table template in the pdf document. A feedback is added to the generated pdf document; this is an evaluation of the rubric created by the LLM for more assistance for the educators.

Request interface

Schema: Screenshot 2024-10-23 at 2 25 59 PM

Example:

{
  "user": {
    "id": "string",
    "fullName": "string",
    "email": "string"
  },
  "type": "chat",
  "tool_data": {
    "tool_id": 15,
    "inputs": [
      {
        "name": "rubric_generator_args",
        "value": {
             "standard": "To make an ensemble Machine Learning model",
             "point_scale":8,
             "grade_level": "college",
             "file_type": "pdf",
             "lang": "en",
             "file_url": "https://raw.githubusercontent.com/asleem/uploaded_files/main/assignment_build_LM.pdf"
        }
      }
    ]
  }
}

Response interface

Schema: Screenshot 2024-10-23 at 2 28 49 PM

Example: rubric-47.pdf

kyl88 commented 3 weeks ago

Code implementation of the API and Schema looks solid :)

The hyperparameters were implemented well

It does match the criteria on PDF documents

Pytest test cases were implemented well

tool utilities and routing of app is good

kyl88 commented 3 weeks ago

@Wilfredo

Any feedback from you with regard to Abir implementation and test cases