Paths/AI Engineer/LLM Fundamentals / Tokens and Context Windows
Count the Turns in a Chat Log
Applications log every user turn so they can be replayed and analyzed later. Build a four-line chat transcript, count its lines with wc, and record the turn count in a summary file.
Validator
IDLE — checks run live as you type commands; submit when done
01Requirements
live checks- File ~/llm-lab/transcript.txt exists with exactly 4 lines○
- File ~/llm-lab/summary.txt exists and records the turn count○
02Walkthrough
1 of 8 revealed- 01
Create the lab directory
mkdir makes a new directory. You may already have ~/llm-lab from the previous task — that is fine, the files here are new.
mkdir ~/llm-lab - 7 locked · each failed submit reveals one
03Stuck?
0 of 3 revealedTake a hint without losing the lab — each one points at the thing to look at, not at the answer.
04AI Tutor
guides, never solvesTell me what you're stuck on — I'll nudge, not solve. Which requirement are you looking at?
04Notebook
saved locally in this browserlearner@lab — ubuntu:24.04
Session is disposable
↑/↓ recalls commands · Ctrl+Enter submits · type help for the command list