A retrieval-augmented generation system built for IB Sciences (Physics, Chemistry, Biology). It answers questions using the exact terminology and phrasing that IB mark schemes expect, so you can check your understanding against how the examiner would grade it.
The problem this solves: you can study IB content with any AI tool, but most give you grammatically polished answers that use words the IB mark scheme does not accept. This system pulls from actual IB syllabi, mark schemes, and examiner reports to match the specific language you need in the exam.
- You feed it IB documents: subject guides, past paper mark schemes, examiner reports, and command term glossaries
- It indexes them into a vector store
- When you ask a question, it retrieves the most relevant mark scheme excerpts and syllabus references
- It generates an answer that uses the same terminology and structure you would see in an official mark scheme
cd ib-rag
pip install -r requirements.txtPlace your source documents in data/<subject>/:
- Subject guides (syllabus PDFs)
- Past paper mark schemes
- Examiner reports
- Command term glossary
Then run the ingestion pipeline. These documents are not included in the repo. You need to source them from IB or publicly available resources.
{
"question": "Explain how a catalyst increases the rate of a reaction",
"subject": "chemistry",
"level": "HL"
}Set your API key (OPENAI_API_KEY or equivalent) in your environment.
src/
ingest/ # Document loading, chunking, embedding
query/ # Retrieval and answer generation
server/ # FastAPI server, /api/ask endpoint, chat UI