This project is an AI-powered assignment grading assistant designed to streamline the evaluation process for educators. It leverages a team of specialized AI agents (built with the agno framework and powered by Google's Gemini model) to read student assignments, apply a grading rubric, provide detailed feedback, and offer specific justifications for scores. The application features a user-friendly web interface built with Streamlit, allowing users to easily upload PDF or DOCX assignment files.
- File Upload: Supports PDF and DOCX assignment file uploads.
- Text Extraction: Automatically extracts clean text content from uploaded documents.
- AI-Powered Grading: Utilizes a multi-agent system to grade assignments based on a predefined rubric (Content Relevance, Accuracy, Structure/Clarity, Grammar/Presentation).
- Constructive Feedback: Generates detailed feedback highlighting strengths, weaknesses, and suggestions for improvement.
- Grade Justification: Provides specific, detailed explanations for low scores (C or below) and general encouragement for higher grades.
- Intuitive UI: A simple and clear web interface for interacting with the grading system.
The grading pipeline involves several AI agents working in sequence:
- AssignmentReader: Extracts and cleans text from the uploaded assignment.
- GradingAgent: Evaluates the cleaned text against a rubric and provides a score and letter grade.
- FeedbackAgent: Generates constructive feedback based on the assignment content and assigned grade.
- GradeJustifier: Provides additional justification for the grade, particularly detailed for lower scores, including what the correct answer should contain and improvement suggestions.
- Python 3.8+
- A Google Gemini API Key
-
Clone the repository:
git clone [https://github.com/AnshGajera/AUTOMATED-GRADING-BOT.git](https://github.com/AnshGajera/AUTOMATED-GRADING-BOT.git) cd AUTOMATED-GRADING-BOT -
Create a virtual environment (recommended):
python -m venv venv # On Windows: .\venv\Scripts\activate # On macOS/Linux: source venv/bin/activate
-
Install dependencies:
pip install -r requirements.txt
-
Set up your Gemini API Key: Create a file named
.envin the root directory of your project (wheremain.pyis located) and add your Gemini API key:GEMINI_API_KEY=YOUR_GEMINI_API_KEY_HEREImportant: Do not commit your
.envfile to GitHub! It's already included in the.gitignorebelow.
Once setup is complete, you can run the Streamlit application:
streamlit run app.py