ApilageAI
A local study assistant for the Sri Lankan G.C.E. A/L ICT subject. It answers questions from three English-medium books, cites the PDF page, and says when it can't find the answer.
Check answers against the cited page. Do not treat this as an exam-accurate source; see Measured accuracy.
What this is
ApilageAI is a modified version of Gemma 4, not an original model. It was not trained or fine-tuned on these books; the books are searched at question time (RAG).
- Base model: Gemma 4 E2B, QAT build, as distributed by Ollama (
gemma4:e2b-it-qat) - Changes to the model files: the name and finetune metadata fields now read
apilageai, and the context size is 6144. The weights are unchanged. - Licence: Apache 2.0, in LICENSE
The chat is instructed to decline questions about its underlying model. This page is the accurate description.
Measured accuracy
The target of 99% has not been reached. The questions were written by the project author and graded by keyword and by reading the answers, not checked line by line against the books. Real exam questions may score lower.
| Test | Keyword check | Reading the answers |
|---|---|---|
| 30 new English questions, not used for tuning | 28/30 | about 24/30 |
| 5 new Sinhala questions | 5/5 found the right page | about 3/5 |
| 97 answerable + 10 off-topic tuning questions | 93/107 | not fully regraded |
Off-topic questions were refused 10 out of 10 times in the last graded run.
Known weaknesses:
- Some answers are wrong, such as steps given in the wrong order or one topic described as another.
- Formulas and tables extract poorly, so De Morgan's law and some table figures can be wrong.
- Diagrams and images are not indexed.
- Database Management (Unit 8) is barely covered by these books.
- Sinhala answers are uneven and can include invalid citations.
- Thinking mode scored 33/35 on the keyword check for the new questions, about 41 seconds per answer versus 13. Some answers read better and it refused one question instead of answering wrongly, but those answers were not fully graded.
Run it
Needs macOS with Ollama. Tested on an M1 MacBook Air with 8 GB of RAM, where replies averaged about 13 seconds and memory was tight.
hf download thisisdineth/apilageai --local-dir apilageai
cd apilageai/model
ollama create apilageai -f Modelfile
ollama pull nomic-embed-text
cd ..
perl serve.pl
Then open http://localhost:8765. The server also listens on your local network, with no login or encryption, so only run it on a network you trust.
To use other books, extract them with rag/extract.js, update the titles in rag/build_index.pl, and run it. rag/evaluate.pl runs the tests.
Book data
rag/data/ contains text extracted from these National Institute of Education, Sri Lanka publications, which remain under their owner's copyright and are not covered by the Apache 2.0 licence:
- G.C.E. A/L ICT Syllabus
- Grade 12 ICT Teacher's Guide
- Grade 13 ICT Resource Book for Teachers
Open a discussion on this repository to request removal.
- Downloads last month
- -
We're not able to determine the quantization variants.