This is a command-line tool that uses a local Ollama language model to automatically grade programming assignments. It compares student submissions against a sample solution, generates marks in JSON format, and presents the results in a clean, editable HTML dashboard.
- Automated Grading: Leverages a local LLM (via Ollama) to evaluate code submissions.
- Structured Output: Generates detailed JSON files for each submission, including marks, confidence scores, and reasoning.
- Interactive Dashboard: Produces a single HTML file that provides a comprehensive overview of all grades, allowing for manual edits and recalculations.
- CLI Interface: Easy to use from the terminal with simple arguments.
- Extensible: Built with a clear structure and can be adapted for different types of assignments.
- Python 3.6+
- An active Ollama instance running on
http://localhost:11434. You can download Ollama from https://ollama.com/. - A model downloaded for Ollama (e.g.,
ollama run llama2).
-
Clone the repository or download the files.
-
Install the required Python packages:
pip install -r requirements.txt
This tool runs in an interactive mode with an autodetection feature to speed up the setup process.
For the fastest experience, structure your project as follows:
- Question File: Place your assignment description in
question.mdorquestion.txtin the project's root folder. - Solution File: Place your single sample solution file inside the
solutions/directory. - Submissions: Place all student submission files inside the
submissions/directory.
-
Start the tool:
python3 checker.py
-
Autodetection & Confirmation: The tool will first look for the files and directories mentioned above. If it finds them, it will ask you to confirm their use with a
(Y/n)prompt. -
Manual Input (Fallback): If any path is not detected or you decline the suggestion, the tool will prompt you to enter the information manually.
-
Select a Model: Next, the tool will show you a list of your available local Ollama models. Enter the number corresponding to the model you wish to use.
-
Grading Process: The checker will begin the grading process, showing progress as it evaluates each submission.
- JSON Files: For each submission, a corresponding
.jsonfile will be created in theresults/directory. - HTML Dashboard: A single
dashboard.htmlfile will be generated in theresults/directory. You can open this file in any web browser to view, review, and edit the grades.