Notebook 04 · PLXN World · Sep 2024 – Apr 2026

CLUE AI

A syllabus-aware AI tutor for IB students, grounded in their textbooks and their own past lessons.

Role
Sole developer, PLXN World
Shape
RAG + agent + memory
Front
Next.js 16
Back
FastAPI · Celery · pgvector
Placeholder: a chalkboard covered in maths equations
fig. 1 — the syllabus, all of it
≤10 ms vector search
<120 ms to first token
The problem

Answers are easy. Context is the hard part.

A general chatbot knows a bit about everything. An IB student needs a tutor that knows their syllabus, their textbook and what they got stuck on last week.

The best notes a tutor has live in hours-long 1-on-1 recordings that nobody rewatches. I wanted every one of those minutes to be searchable, citable and remembered.

CLUE AI example answer

Student: Why is the derivative of sin x equal to cos x?

Start from the limit definition and the small-angle limits your textbook proves first. You tried the same step in your last lesson and dropped the h in the denominator — so let’s write it out line by line in LaTeX.

hover or tab to the numbers ↑
How it works · 1

Everything the student has seen, made searchable.

Two kinds of source go in. Textbooks are parsed with layout intact. Lessons are transcribed, even when the file is hours long. Both end up as vectors in Postgres, next to each other.

Ingestion pipeline Textbook PDFs go through Docling layout-aware parsing; session recordings up to 200 MB go through Whisper v3 Turbo; Redis and Celery workers chunk and embed both into pgvector, with files kept in MinIO. Textbook PDF chapters · maths 1-on-1 lesson audio, up to 200 MB Docling layout-aware parsing Whisper v3 Turbo hours-long transcripts Celery workers Redis queue · MinIO files chunk → embed pg vector
How it works · 2

An agent that checks its own work before it speaks.

  1. a
    Question in. A LangChain ReAct agent decides what it needs: a textbook passage, a past lesson, or both.
  2. b
    Retrieve. pgvector returns the closest chunks in ≤10 ms, with page and timestamp attached.
  3. c
    Route. A multi-model router picks Gemini, Claude or GPT-4.1 — GPT-4.1 for step-by-step LaTeX maths.
  4. d
    Self-correct. The draft is checked against its own citations. Anything it can’t ground goes back round the loop.
  5. e
    Stream. The first token reaches the student in under 120 ms.
Memory

Three tiers, so it remembers the student, not just the chat.

Tier 1

Token-aware window

The live conversation, trimmed to fit the model’s budget.

Tier 2

Progressive summary

What falls out of the window is folded into a running summary.

Tier 3

Pedagogical memory

Across sessions: what the student finds hard and how they like to learn.

Numbers worth circling

  • ≤10msvector search over textbooks and lessons
  • <120msto the first streamed token
  • 200MBlesson recordings, transcribed whole
  • 3tiersof memory, across every session
Scrapbook

Pinned to the back pages.

the reel · tutor, notes, maths
Placeholder: open textbooks on a desk
textbooks, parsed
Placeholder: a hand writing notes
lesson notes, remembered
Placeholder: tall library shelves
the whole syllabus
Placeholder: a small robot reading a book
the agent, reading
Stack

Packing list.

  • Next.js 16 front end
  • FastAPI back end
  • Redis + Celery workers
  • MinIO for files
  • Docling PDF parsing
  • Whisper v3 Turbo
  • PostgreSQL + pgvector
  • LangChain ReAct agent
  • Gemini · Claude · GPT-4.1

Next application · 05 / 07

Conversation Brain
brain.rec

Live transcripts with fact-check flags.