✦ Kritik · AI support assistant
A retrieval-grounded help assistant built into the Kritik learning platform. It answers from a curated knowledge base, cites every source, and tailors what it reveals to who's asking.
Groups & Group Activities is managed by instructors in Kritik, so it isn't covered in the student help docs.
A group set is a reusable, named collection of student groups you build once and apply to any group activity. [1]
You can populate it three ways: auto-generate random even groups, upload a CSV pairing emails to group names, or assign manually for full control. [1]
Pure retrieval-augmented generation over a knowledge base we authored to be chunk-friendly — no full-context stuffing, no guessing.
9 code-grounded chapters in docs/help/, one concept per section.
Section-level, breadcrumb-prefixed, with a stable anchor and content hash.
text-embedding-3-small into a pgvector store, reconciled in place.
Top-k by cosine, a similarity floor, and a role-scoped audience filter.
Claude Sonnet, grounded strictly on the retrieved chunks, citing each.
Four decisions do the heavy lifting — each one visible in the demo above.
Role comes from the account permission, server-side. Instructors see the whole corpus; a student asking an instructor-only task gets a clear "that's instructor-managed" flag naming the area — never a confusing dead-end.
Audience is set per section, not just per chapter. A student's answer is assembled only from student-visible chunks; the gate detects instructor topics from similarity alone, surfacing just the title label.
Every claim carries a [n] citation back to a source chunk. Off-corpus questions get an honest "not in the help docs" — plus PII scrubbing and an uncited-answer guard on the way out.
server/rag/ owns its own table, embedder, reconciler, and retriever behind a single ragService seam — ready to become a standalone kritik.io service without touching the rest of the app.
Each phase ran the same loop — brainstorm → spec → plan → test-driven implementation, reviewed before moving on.
Agents proposed a chapter map; nine chapters filled and verified against their source files.
Chunker, embedder, pgvector repository, and a reconciler that re-embeds only what changed.
POST /api/v1/help/ask — validate, sanitize, retrieve, short-circuit, answer, cite.
An ask-first Knowledge Base page, then pared down to a focused chat experience.
The instructor-topic gate, plus a section-level audience fix that closed a whole class of leaks.