Module 08 Activity
Scenario
The assistant now has conversations. Everything here is about what crosses between turns and between users.
What you build
Extracted facts instead of transcripts, deliberate trimming, per-user session isolation, and a retention policy for persisted sessions.
Steps
- Take a real multi-turn exchange and extract established facts into named fields. Compare the size against the transcript.
- Implement trimming by tokens, keeping the system message and starting on a human turn. Show what gets dropped.
- Key session state on the authenticated user id and the session id together. Prove two users with the same session id do not cross over.
- Confirm the user id comes from your authenticated session and never from the request body.
- Give persisted sessions a retention limit, access control and a deletion path, and show a purge.
- Mark which facts were verified against a source, and carry only those forward.
Evidence to hand in
- The transcript and the extracted fields, with sizes.
- Trimming output showing what was kept and dropped.
- Two users, one session id, no crossover.
- Where the user id comes from, in code.
- The retention policy and a demonstrated purge.
- The verified/generated marking on carried facts.
Review checklist
- Facts are fields, not a summary.
- Trimming is by tokens and keeps the system message.
- The session key includes the authenticated user id.
- The user id is not read from the request body.
- Only verified facts are carried forward.
