Logo Lanfrica

TIMBURG23/Bhala-Tutor-Personal

Domain:

educationnatural language processing

Record type:

software
Creator:
TIM
Host:
Bhala-Smart is an Ollama-powered tutor built for South African Grade 12 learners. Unlike generic AI, it acts like a strict CAPS teacher—rooting out informal slang (like "eish" or "bra") and fixing comma splices without rewriting the essay for you. It’s local, private, and designed to help students actually learn to write better. Bhala-Smart: CAPS Essay Assistant Bhala-Smart is a local AI writing tutor designed specifically for the South African educational context. Built using Ollama and the llama3.2 model, it serves as a specialized critique tool for Grade 12 English First Additional Language (FAL) students. Unlike standard AI tools that simply rewrite text, Bhala-Smart is engineered to act as a strict South African educator. It provides critical feedback based on the CAPS curriculum guidelines, ensuring students improve their own writing skills rather than relying on automated generation. Key Features CAPS Alignment: Evaluates structure, tone, and language according to Grade 12 standards. South Africanism Detection: Automatically flags informal local slang (e.g., eish, bra, yebo, sharp-sharp) that is inappropriate for formal academic essays. Grammar Focus: Deep-scans for common mechanical errors like comma splices and run-on sentences. No-Rewrite Policy: Follows a strict rule to critique only, forcing the student to perform the actual edits. Privacy-First: Runs locally via Ollama; no student data is sent to external cloud APIs. Prerequisites Ollama: Download and install Ollama Model: Pull the Llama 3.2 model: Bash ollama pull llama3.2 Python: Version 3.8 or higher. Installation Clone the repository: Bash git clone github.com cd bhala-smart Install dependencies: Bash pip install ollama Complete Source Code (bhala_tutor.py) Python import ollama import sys def bhala_tutor(essay_text): """ Bhala-Smart: CAPS ESSAY ASSISTANT (v1) Provides critical feedback for Grade 12 English FAL essays. """ system_prompt = ( "You are a strict South African Grade 12 English FAL teacher. " "Your goal is to critique the student's essay based on CAPS standards. " "Rules:\n" "1. Do NOT rewrite the essay for the student.\n" "2. Identify informal South Africanisms (e.g., 'eish', 'bra', 'yebo', 'sharp-sharp', 'mzansi') " "and mark them as inappropriate for form …