Back to notes
The Tesseract MemoryTechnical note

Letting AI write recommendation copy without choosing the destination

Laravel chooses and ranks the learner's next actions, then accepts generated wording for those existing candidates without changing their targets or order.

Topics

Choose the next action from learner state

Recommendations start in application code. Laravel builds candidates from active lessons and course progress: continue an unfinished lesson, move on, review incomplete material, open a guide or ask an assistant follow-up. The ranker applies a confidence floor, removes duplicate targets, uses stable tie-breaks and limits the result count.

The copy generator then sends bounded titles, excerpts and content cues to the chat provider. Its prompt treats source text as untrusted and forbids new targets or reordering. The application doesn't rely on that instruction alone; it limits what the returned fields can change.

Apply wording without rebuilding the action

Laravel matches returned entries to their original index and walks the candidates it already selected. It accepts validated title, reason, action-label and eligible prompt fields without recreating the targets or ranking. Missing or unsuitable copy gets a bounded regeneration attempt, followed by a copy-unavailable exception if it still cannot be used.

Runtime settings gate the feature. An optional cache key includes configuration, progress, enrollment and study-guide signals, so a learner-state change can invalidate old copy. The workflow doesn't call Python and isn't a learned recommendation model; it hasn't established improved learning outcomes.