tubeshowcase●1,194,391 videos♡ My collection 0
← Learn to Code

Learn to Code07:15

Optimizing GitHub Copilot: Better Results, Fewer Tokens

Microsoft Developer ↗

From the creator

Optimize GitHub Copilot context and token usage to get better AI results with fewer tokens. Learn how the context window works and use /context, /init, and /compact to keep Copilot sessions focused, accurate, and efficient. Episode 5 of 10 in Build your personal brand with Copilot. Continue to Episode 6 and explore the full series: https://aka.ms/student-learning-series-website Build your personal brand with Copilot is a beginner-friendly Microsoft Developer series for students. Follow Microsoft employees as they use GitHub Copilot, Visual Studio Code, GitHub Pages, Microsoft Foundry, MCP servers, and agent skills to create, publish, and improve a professional portfolio website. In this episode: 0:00 Welcome and an introduction to context and tokens 0:21 What context includes 0:38 How Copilot processes information as tokens 0:46 Viewing context with /context 0:53 Understanding the context window with a suitcase analogy 1:04 Why too little or too much context can hurt results 2:07 Generating a case study page without project context 3:04 Adding project files for better results 3:57 Refreshing project context with /init 4:02 How copilot-instructions.md guides Copilot 5:02 Starting a focused session with the right context 6:08 Checking context usage 6:44 Reducing token usage with /compact 7:11 Recap of context and token optimization Connect with the presenters: Emily Rothrock - Software Engineer at Microsoft: https://www.linkedin.com/in/emily-rothrock/ Shivani Sundaresan - S

Published 2026-08-21 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.

Keep exploring Learn to Code