mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 06:39:28 +08:00
Three chips for the home composer, each two strings doing different jobs:
``label`` is what the learner reads, sized for a chip; ``prompt`` is what gets
sent as their own message when they click, so it is first-person and complete
— "把我上次做错的那道链式法则的题再讲一遍", not "你上次在学链式法则", which a
model can only agree with.
Reads are stale-while-revalidate. The request path does exactly one thing:
read a small JSON file. Deciding whether the material changed means walking
seven surfaces, so that lives in the background task, throttled to once a
minute per user and deduped by an in-flight map — a burst of page loads must
not become a burst of LLM calls. Regeneration is due when the material's
fingerprint moves or the set is older than six hours; the reroll endpoint
bypasses both, because there a human is waiting.
Material comes from recall, capped per surface and interleaved so the three
chips differ in kind rather than being three chat sessions. No material means
no model call at all — a new learner gets an empty list, and the client shows
its own fixed starters, which is honest about knowing nothing yet.
Partial model output is discarded whole: one lonely chip under the composer
reads as a rendering bug.
The endpoints go above dashboard's ``/{entry_id}``, which matches any single
segment and would otherwise turn /suggestions into an activity lookup.