Inspiration

I study computing at a Malaysian university where most of us write in our second or third language, and most of us now use AI somewhere in our assignments. In the UK, HEPI's 2026 survey found 94% of undergraduates use generative AI on assessed work. Universities are answering with AI detectors. But in a Stanford study, seven detectors flagged 61% of TOEFL essays written by non-native English speakers as AI-generated. The students most likely to be wrongly accused are students like us.

The fair way to check whether someone understands their own work has always been to ask them about it: a viva. A lecturer can't hold one for 300 students, and an English-only viva penalises second-language speakers a second time. So I built one that scales, and that listens in the language you actually think in.

What it does

Faham ("understand" in Malay) reads a student's submitted work and runs a five-question oral check on it.

  1. It drafts questions anchored to specific passages of the student's own writing (not the brief, rubric, contents page or references).
  2. A second model tries to answer every draft without seeing the document. If that blind guess would pass, the question is thrown out, and the guess is shown so anyone can check the decision.
  3. The student answers out loud or by typing, in English, Malay, Mandarin or the Manglish most Malaysians actually speak. The passage is folded by default; the report notes whether they opened it.
  4. If an answer is vague or contradicts the work, Faham asks one fair follow-up.
  5. The lecturer gets an evidence report: the transcript as spoken, a meaning-only rendering, the passage with the grader's quotes highlighted, three scores per answer, and cautions. It never says "cheated" or "AI-written". A person decides.

Innovation and originality

AI vivas exist as research prototypes (Oxford's viva simulator, UTS's VivaBuddy, Coursera's AI Viva pilot). Faham is built around three ideas I haven't seen together:

  • Language-blind scoring. Answers are kept verbatim, code-switching included, then turned into a plain meaning-only English rendering. The grader only ever sees that rendering, so grammar, accent and language choice cannot move the score.
  • A closed-book filter for questions. Ordinary viva questions are easy to fake with AI: on my own 143-page deep learning report, an AI that never saw the report gave a passing answer to 5 of 12 draft questions. Faham throws those out and drafts again, focusing on details only the document contains.
  • Verified evidence. The grader must quote both the passage and the answer, and every quote is checked against the source text; invented quotes are dropped before a lecturer sees them. The closed-book judge is held to the same rule: it must quote the blind guess, or the question is kept.

How I built it

  • Next.js 15 + TypeScript on Vercel; Google Gemini through @google/genai, with JSON-schema structured output re-validated by zod.
  • Six model roles: question writer, closed-book answerer, closed-book judge (also checks that each question's premise is true to the passage), listener (speech → verbatim code-switched transcript + meaning-only gloss), follow-up examiner and grader.
  • Document handling in the browser: PDF/DOCX text is extracted client-side (unpdf, mammoth), so a 143-page, 11 MB report becomes ~200 KB of text. Running page headers and footers are stripped, line-break hyphens rejoined, and text split into ~140-word passages without breaking at "et al." or "e.g.".
  • No database: the session (passages, questions, expected points) is sealed with AES-256-GCM and carried by the browser, so students can't read the expected points in dev tools or tamper with them.
  • Resilience: when Gemini models report high demand, Faham times out after 45 s, skips overloaded models for two minutes, and falls back through the Flash family to Flash-Lite. It reports which model it used.
  • Cost guard: per-device daily limit, with failed attempts refunded.
  • 25 unit tests (chunking, header stripping, quote verification, question selection, scoring, sealing, model fallback ordering).

Measured results

All on my own ODL (Optimisation and Deep Learning) report, through the live site.

Check Result
Questions drafted, then set aside because an AI answered them without the report 5 of 12
Time to read the report and produce 5 checked questions 13–54 s depending on Gemini load
Same answer content written five ways, score out of 30 Polished English 29 · second-language English 30 · Manglish 30 · Malay 29 · English + Mandarin 29
Vague, low-effort answers, score out of 30 9 (follow-up asked 5 of 5 times)
Grader quotes that could not be found in the source 1 across the six test sets, removed automatically

How to read these: the language test uses answers I wrote for testing, not recorded speech, and they are strong answers, so it shows fairness near the top of the scale only. These are small tests that show the approach works, not that it is accurate.

AI integration and responsible use

  • Evidence for a human, never a verdict on misconduct. The report says so on screen.
  • Language is removed before scoring, and the fairness test checks that this holds.
  • Consent before recording. Faham stores nothing after the session; audio and text go to the Gemini API for processing. On Gemini's free tier Google may use inputs to improve its products, so a real deployment would use a paid tier with data-use terms a university can sign off.
  • Typing is always available for students who can't or prefer not to speak.
  • Questions that could be guessed are labelled as such if they ever have to be used.

Challenges

  • Model overload. During testing every Gemini Flash model returned "high demand" at some point, and one accepted a request and never answered. That forced the timeout, overload memory and model fallback.
  • A judge that cheated. My first closed-book judge marked blind guesses as correct while quoting details only the passage contained. I now make it quote the guess and verify the quote; the reported numbers come from the fixed version.
  • PDF reality. Page headers glued onto sentences, footers in the middle of pages, "et al." ending sentences, and an 11 MB file over the server's request limit all broke early versions.

Limitations

  • Small tests, with test answers rather than a study with real students.
  • A well-prepared reader can still do well, and a nervous author can do badly. Faham measures understanding, not authorship.
  • Transcription can stumble on heavy code-switching or noisy rooms; the transcript is shown so a lecturer can catch it.
  • The meaning-only rendering is made by a model; it's shown beside the transcript so it can be checked.

What's next

A small study with classmates (authors vs non-authors), lecturer-set questions, Tamil support, and a pilot with one module at my university.

Built With

Share this project:

Updates

Submission history