This workshop is the second part of ALTEN's two-hour advanced training session on optimizing tokens for AI code assistants.
Note
Running the project is not mandatory to follow this workshop.
To start the application and its services (PostgreSQL, Liquibase migration, Traefik, application) in development mode using Docker Compose:
docker compose --env-file docker/conf/.env.dev -f docker/docker-compose.yml up --build -dIf you cannot launch the app in Docker, at least install the dependencies locally so you can test the LLM's outputs:
npm i| # | Module | Description | Level |
|---|---|---|---|
| 0 | ROI mindset | Set up the environment and adopt the core ROI habit where better quality prompts yield fewer retries and lower total cost. | 🟢 |
| 1 | Model selection | Match model size to task complexity using the model picker to balance capability, speed, and cost. | 🟡 |
| 2 | Agent guessing | Contrast the costly "agent gambling" anti-pattern with upfront investment in precise context and stop conditions. | 🟢 |
| 3 | Prompt engineering | Structure prompts with clear intent, explicit context, constraints, and verifiable stop conditions to stop scope creep. | 🟡 |
| 4 | Context optimization | Select only the minimal relevant files rather than full folders to prevent noise, drift, and context dilution. | 🟡 |
| 5 | Context window | Understand statelessness, context accumulation, and window biases to master session reset discipline. | 🟢 |
| 6 | Deterministic controls | Integrate automated guardrails like linters and tests to verify agent changes and stop compounding mistakes. | 🟡 |
| 7 | Advanced Workflow | Decompose complex tasks into Think → Plan → Implement phases with separate clean contexts to prevent compounding errors. | 🔴 |
| 8 | Persistent context | Make quality repeatable using instructions, custom agents, on-demand skills, MCP tools, and sub-agents. | 🔴 |
| 9 | Understand and Improve Your Usage | Develop the analytical skills needed to understand usage patterns and improve context, tools, and token efficiency. | 🔴 |
Throughout the labs you can use these metrics to make the abstract idea of "token value" concrete:
- Retries to success: how many times you had to re-prompt before the result was correct.
- Turns / tool calls: how many round-trips the agent took.
- Correction edits: how many manual fixes you made afterward.
- Guardrail signal: did the process still start, or did
npm test/npm run lintpass.
Lower numbers = higher token value. Use these as a mental check after each lab; you do not need to write them down.
1. Model selection → large = plan/debug · medium = implement · small = trivial · Auto by default
2. Prompt engineering → be precise · add stop conditions · supply context explicitly
3. Context optimization → only relevant files · reset sessions often
4. Advanced workflow → Think → Plan → Implement (separate, clean contexts)
5. Deterministic control → tests · linters · security checks to stop compounding errors
6. Persistent context → instructions · agents · skills · MCP · sub-agents (repeatable, not re-explained)