An intelligent academic assignment grading system that uses LLM-based evaluation with parallel processing for efficient analysis of student submissions.
Criterion | Scale | Description |
---|---|---|
Factual Accuracy | 0-10 | Content accuracy compared to source material |
Relevance to Source | 0-10 | How well assignment relates to reference material |
Coherence | 0-10 | Logical structure and flow of writing |
Grammar | 1-10 | Writing quality, spelling, grammar (minimum score: 1) |
Clone the repository
git clone https://github.com/felixchess5/RT-Project-2.git cd RT-Project-2
Create virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
Install dependencies
pip install -r requirements.txt
Environment setup
# Copy the example environment file cp .env.example .env # Edit .env file and add your API keys # Required: # GROQ_API_KEY=your_actual_api_key_here # Optional (for LangSmith tracing): # LANGCHAIN_TRACING_V2=true # LANGCHAIN_API_KEY=your_langsmith_api_key # LANGCHAIN_PROJECT=Assignment Grader
Configure paths (Optional)
paths.py
to customize file locationsPlace assignment files
.txt
files to the Assignments/
folderName: John Doe
Date: 2025-08-25
Class: 10
Subject: English
[Assignment content here...]
Run the grading system
python main.py
View results
output/summary.csv
for all resultsplagiarism_reports/
folderSample Output File https://mega.nz/file/XVECGCbC#C1lwufkNkqmF3qL1Y1LrlUW7oTqmKDuWoXVgXXdD_fc
βββββββββββββββββββββββ
β Main Pipeline β
β β
β βββββββββββββββββ β
β β Orchestrator ββββΌβββ Executes nodes in parallel
β β (Async) β β
β βββββββββββββββββ β
β β β
β βββββββββββββββββββ β
β β Parallel Nodes β β
β β βββββββ βββββββ β β
β β βGram.ββPlag.β β β
β β βββββββ βββββββ β β
β β βββββββ βββββββ β β
β β βRel. ββGrad.β β β
β β βββββββ βββββββ β β
β β βββββββ β β
β β βSumm.β β β
β β βββββββ β β
β βββββββββββββββββββ β
βββββββββββββββββββββββ
RT-Project-2/
βββ main.py # Application entry point
βββ nodes.py # Processing nodes (grammar, plagiarism, etc.)
βββ orchestrator_node # Parallel execution orchestrator
βββ llms.py # LLM configuration and setup
βββ prompts.py # Centralized prompt templates
βββ utils.py # Utility functions and graph visualization
βββ paths.py # File path configurations
βββ requirements.txt # Python dependencies
βββ .env.example # Environment variables template
βββ .gitignore # Git ignore patterns
βββ Assignments/ # Student assignment files (.txt)
βββ plagiarism_reports/ # Generated plagiarism reports (.json)
βββ output/ # Generated CSV and other outputs
βββ README.md # This documentation
Initialization (main.py
)
File Processing (process_assignments()
)
.txt
filesParallel Execution (orchestrator_node()
)
asyncio.gather()
Individual Node Processing
Export Results (export_summary()
)
The system includes comprehensive LangSmith tracing for monitoring and debugging:
Enable tracing by setting LANGCHAIN_TRACING_V2=true
in your .env
file.
Copy the example file:
cp .env.example .env
Edit .env
and add your API key:
GROQ_API_KEY=your_actual_groq_api_key_here
Edit paths.py
to customize:
ASSIGNMENTS_FOLDER = "Assignments" PLAGIARISM_REPORTS_FOLDER = "plagiarism_reports" SUMMARY_CSV_PATH = "output/summary.csv" GRAPH_OUTPUT_PATH = "graph.png"
Modify llms.py
to adjust:
def create_groq_llm(model="llama-3.1-8b-instant", temperature=0.7): # Customize model and parameters
git checkout -b feature/amazing-feature
)git commit -m 'Add amazing feature'
)git push origin feature/amazing-feature
)This project is licensed under the MIT License - see the LICENSE file for details.
Built with β€οΈ for educators and students