Stanford University's CS336: Language Modeling from Scratch published comprehensive AI agent guidelines on June 1, 2026, establishing strict rules for how AI agents should interact with students in the implementation-heavy course. The guidelines explicitly ban AI agents from writing code or providing direct solutions, requiring them to function as teaching assistants that facilitate learning rather than solution generators.
Course Requires Students to Implement Transformers from Scratch
CS336 is a 5-unit Spring 2026 course where students implement all components necessary to train a standard Transformer language model with minimal scaffolding. The curriculum requires substantial Python and PyTorch code covering tokenizers, model architecture, optimizers, training loops, Triton kernels, and distributed training logic. The online version runs March 30 through June 10, 2026, with an estimated commitment of 20-25 hours per week over 10 weeks.
Prerequisites include strong familiarity with PyTorch and basic systems concepts, reflecting the course's technical depth and focus on ground-up implementation rather than using pre-built frameworks.
AI Agents Must Guide Understanding, Not Provide Solutions
The published guidelines at github.com/stanford-cs336/assignment1-basics/blob/main/CLAUDE.md specify that AI agents should explain concepts by guiding students to understanding rather than providing answers, reference materials from lectures and documentation, review student code and suggest improvements through dialogue, debug collaboratively by asking guiding questions, and explain errors from Python, PyTorch, CUDA, Triton, and distributed training tools.
AI agents are explicitly permitted to suggest testing approaches including:
- Sanity checks and toy examples
- Assertions for validating assumptions
- Profiler-based investigations for performance issues
Strict Prohibitions Cover Direct Problem-Solving
AI agents must refuse to write Python or pseudocode, provide direct solutions, complete TODO sections in assignment code, edit student repositories or run bash commands, refactor code into finished solutions, implement core components, reference third-party implementations, or disclose problem-solving strategies.
When students seek help, the guidelines prescribe a specific teaching methodology:
- Ask clarifying questions about attempts and outcomes
- Reference lecture materials rather than giving answers
- Suggest next steps instead of implementing them
- Identify improvement areas through dialogue
- Explain reasoning, not just procedures
- Prioritize tests and invariants over direct fixes
Academic Integrity Standard Emphasizes Learning by Doing
The guidelines state: "The goal is for students to learn by doing, not by watching an AI generate solutions." When student requests cross into direct problem-solving territory, agents must pivot to explanation, debugging guidance, code review, or non-executable outlines.
This approach addresses growing concerns in computer science education about AI tools undermining the learning process in implementation-focused coursework. By requiring agents to function as Socratic guides rather than code generators, Stanford aims to preserve the pedagogical value of hands-on implementation while still allowing students to benefit from AI assistance for conceptual understanding and debugging.
Key Takeaways
- Stanford CS336 published guidelines requiring AI agents to act as teaching assistants, not solution generators, explicitly banning code writing and direct answers
- The course requires students to implement all Transformer components from scratch, including tokenizers, architecture, optimizers, and distributed training logic
- AI agents may explain concepts, reference lecture materials, review code through dialogue, and suggest testing approaches, but cannot write code or provide solutions
- When students request direct help, agents must pivot to asking clarifying questions, referencing materials, and guiding understanding rather than implementing solutions
- The guidelines establish an academic integrity standard emphasizing "learning by doing, not by watching an AI generate solutions"