GradeWithAI: Revolutionizing Academic Grading System with GPT-4
In the technologically advanced world we live in today, artificial intelligence (AI) has proven to be a game-changer in multiple industries, be it CS, marketing, and even education. As an aspiring innovator, I found myself intrigued by the potential that AI held to repair and reform our education system. Particularly, after discussions with my AP CSA teacher reflected the challenges they faced with grading Free Response Questions (FRQs), I was inspired to develop an innovative solution to reshape the traditional grading process- manifesting into the project GradeWithAI.
The Inspiration
The idea for GradeWithAI sprung from a candid conversation with my AP CSA teacher. It was made apparent that they spent a considerable chunk of their time manually grading FRQs and practices FRQs. This was time that could otherwise be utilized in delivering more enriching and comprehensive learning experiences to students. Seeing this gap in efficiency, I was inspired to leverage GPT-4 to create a solution that would significantly reduce manual labour and free up educators to concentrate on what truly matters: teaching students.
The Learning Experience
Working on GradeWithAI was an enriching learning experience where I dived deep into Python, learned more about web development using Flask, and explored the extensive capabilities of OpenAI and their most advanced model, GPT-4.
In particular, the Google Documents API and OpenAI's GPT-4 played crucial roles in the development of GradeWithAI. GPT-4, the latest version of OpenAI, was instrumental in delivering accurate grading and insightful feedback based on a given rubric. I also learned to work with Refresh Tokens to manage session authorizations and tackled handling edge cases to ensure secure access and universal compatibility.
How GradeWithAI Was Built
The foundation of GradeWithAI relies on the OpenAI's GPT-4 model and Google Docs APIs. The process begins with teachers providing two Google Doc URLs- one presents the grading rubric, and the other contains the student's work. Once submitted, the AI starts processing the request.
Here's a short snippet of how the grading function works:
def grade(text):
try:
completion = openai.ChatCompletion.create(
model="gpt-4",
messages=[
{ "role": "system", "content": "You are a professional..." },
{ "role": "user", "content": "Here is the student's response..." }
],
temperature=0.0,
)
result = completion.choices[0].message["content"].replace("```", "")
return result
except Exception as e:
print(e)
return "OpenAI API Request failed, please wait a few minutes and try again."
Once my project receives the documents, it uses the credentials to call this function:
def fetch_document_text(document_id, token):
[...]
doc = docs_service.documents().get(documentId=document_id).execute()
doc_content = doc.get('body').get('content')
return read_structural_elements(doc_content)
Through these scripts, the AI reads and evaluates the student's work according to the guidelines provided by the rubric, and assigns grades. The AI also provides a detailed analysis of the work, highlighting key strengths and areas of improvement. The feedback is appended to the student's document as well as made available on the platform.
Of course, there's a lot I'm leaving out, but if you would like to learn more, be sure to go to my website.
Challenges & Future Insights
Working with LLMs and understanding their complex functionalities was certainly the most challenging aspect of the project. Handling dependencies, maintaining session authorizations without compromising security, handling edge-cases, and ensuring a smooth user-experience posed significant issues.
However, it was through overcoming these hurdles that I have refined my problem-solving skills and gained an in-depth understanding of LLM functioning. Looking ahead, I am determined to enhance the capacity of GradeWithAI. Specifically, I would love to add support for a broader range of subjects and provide multi-language compatibility to benefit more educators and students across the globe.
I would also like to build a team of backend developers, especially database specialists. The reason for this is because I would like teachers to be able to create classrooms, post assignments, and manage grades all in one place.
For more details on the project, feel free to hop in here.
IMPORTANT: GradeWithAI is currently undergoing the approval process with Google for OAuth. If you're eager to give it a test drive, please reach out to me directly so I can add you as a tester. Your patience is appreciated!
Log in or sign up for Devpost to join the conversation.