The register is the product
Lala speaks Turkish, in the register of an older sibling: warm, flat, and unhurried. It is not a teacher, and it is not a generic chatbot. That register is the product, and most of the engineering value sits in the system prompt. Two consequences for the client:- Do not paraphrase, translate, or reformat the answer text. Render it as it arrives.
- Do not add your own assistant copy in the chat stream. A “Lala is typing” indicator is fine. A Lala-voiced message that the server did not send is not.
One turn, step by step
1
Load the student
Profile, context, notes, the last 60 messages, and the last 5 rolling summaries.
2
Persist the student message
The message is written before the model runs.
3
Mark time gaps
The history is annotated with Turkish time markers, so Lala knows that three days passed.
4
Retrieve context
A vector search over real coaching transcripts. A failure here degrades the turn, silently.
5
Attach tools and stream
The model runs, with up to 5 steps and a 60-second limit. Text deltas stream out as
chunk
events.6
Summarize
After the answer, a rolling summary is written in the background. This never blocks the
response.
What Lala can do inside a turn
A turn can use several tools, so the first
chunk sometimes arrives seconds after the request.
Show a waiting state from the moment you send.
Memory
Lala has three memory tiers. None of them are exposed by the API:- Profile and notes. Structured profile fields, plus a free-text scratchpad that Lala maintains itself, up to 2000 characters.
- The message window. The last 60 messages, the same window that
GET /api/chat/historyreturns. - Rolling summaries. Written after each answer, to carry older context forward.
Guardrails
Two guardrails change what the client must expect:- The approved resource list. Lala recommends only from a hand-curated list of YouTube channels and books. It is calibrated against hallucinated recommendations. Do not build a feature that asks Lala to name arbitrary resources.
- Tools are not commands. A student cannot tell Lala to write a note, change the profile, or
schedule a message. The prompt treats a direct request of that kind as a manipulation attempt
and refuses it. Use
PATCH /api/profilefor user-interface edits.