High-Fidelity Infrastructure for High-Integrity Learning

It’s not a wrapper – it’s a RAG (Retrieval Augmented Generation)

CustomAILab does not utilize "wrapper" logic. We have engineered a federated, multi-agent RAG (Retrieval-Augmented Generation) environment designed to solve the three core failures of standard LLMs: Hallucination, Academic Dishonesty, and Data Privacy.

1. Federated RAG & Semantic Chunking

Unlike generalist AI, Cal utilizes a Local Knowledge Base with vector embeddings stored in pgvector, orchestrated by a Canadian-hosted Google Cloud Run (GCR) instance. 

  • The Tech: All documents in Cal’s Knowledge Base are run through Mathpix to produce clean, readable markdown that Cal can read easily. They are then split into large semantic ‘chunks’ based on unit/chapter headings. 

  • The Benefit: This semantic chunking takes advantage of Gemini’s large context window size (1-2 million tokens) and Google’s brand new context caching feature (January 2026) to ensure that Cal is getting the details and the context right. 

2. Multi-Agent Orchestration (The Triumvirate)

Our system operates through three distinct LLM instances that serve as "checks and balances" for one another:

  • Cal (The Tutor): Optimized for Socratic Rigour and pedagogical agility. Cal uses a system of "Context Injection" to adapt his personality to the student's chosen learning style (e.g., Step-by-Step vs. Analogy-Based). A specialized router sends queries to Gemini 3.0 Flash for simpler questions, and Gemini Pro for higher level reasoning questions from advanced level Math and Physics courses. 

  • The Librarian: An automated curator that manages the retrieval of long-term memory and high-fidelity data. The Librarian matches the student’s query with the right

information from Cal’s KB, and adds relevant information from the student’s personal KB to ensure maximum accuracy and personalization. 

  • The Dean (The Auditor): A separate, independent LLM auditor running on Gemini 3.0 Pro. The Dean does not interact with the student; he reviews chat logs against our proprietary Cognitive Depth Index (CDI) to measure student engagement and the depth of understanding. These reviews are summarized in a monthly, bi-monthly, or weekly report that goes to the parent’s email. 

3. Advanced OCR & STEM Notation

To support rigorous high school STEM curricula, we have integrated Mathpix Document Intelligence. 

  • The Tech: This allows the conversion of complex PDFs, chemical diagrams, and handwritten equations into high-fidelity LaTeX and Markdown.

  • The Benefit: Cal can "see" and solve math and physics problems with a level of symbolic accuracy that standard vision models cannot match. This includes a student’s handwritten notes, assignments and tests. 

Canadian flag with a red maple leaf in the center.

4. Sovereign Compute & Bill 194 Compliance 

We have eliminated "Data Drift." By utilizing Google Cloud Run Regional Endpoints, CustomAILab ensures that AI inference—the process where the model generates a response—is pinned to the Montreal region. Unlike standard AI tools that route data through global nodes, our architecture ensures that sensitive student information and intellectual property never leave Canadian sovereign infrastructure.

  • Database: Supabase & Google Cloud Run handle the computation, inference, and storage all here in Canada (Montreal). 

  • Encryption: All student interactions are encrypted at rest and in transit, with PII (Personally Identifiable Information) scrubbing before any third-party API calls.

  • Enterprise API: Our exclusive use of enterprise API keys ensures that lessons cannot be used for LLM pre-training or for any other commercial purpose.