By the end of this module, you will be able to:
The AI Toolkit for Visual Studio Code is Microsoft's flagship extension that transforms VS Code into a comprehensive AI development environment.
It bridges the gap between AI research and practical application development, making generative AI accessible to developers of all skill levels.
| Feature | Description | Use Case |
|---------|-------------|----------|
| ๐๏ธ Model Catalog | Access 100+ models from GitHub, ONNX, OpenAI, Anthropic, Google | Model discovery and selection |
| ๐ BYOM Support | Integrate your own models (local/remote) | Custom model deployment |
| ๐ฎ Interactive Playground | Real-time model testing with chat interface | Rapid prototyping and testing |
| ๐ Multi-Modal Support | Handle text, images, and attachments | Complex AI applications |
| โก Batch Processing | Run multiple prompts simultaneously | Efficient testing workflows |
| ๐ Model Evaluation | Built-in metrics (F1, relevance, similarity, coherence) | Performance assessment |
Step 1: Access Extensions Marketplace
1. Open Visual Studio Code
2.
Navigate to the Extensions view (Ctrl+Shift+X or Cmd+Shift+X)
3. Search for "AI Toolkit"
Step 2: Choose Your Version
Step 3: Install and Activate
๐ฏ Objective: Master the Model Catalog and test your first AI model
The Model Catalog is your gateway to the AI ecosystem. It aggregates models from multiple providers, making it easy to discover and compare options.
๐ Navigation Guide:
Click on MODELS - Catalog in the AI Toolkit sidebar
๐ก Pro Tip: Look for models with specific capabilities that match your use case (e.g., code generation, creative writing, analysis).
โ ๏ธ Note: GitHub-hosted models (i.e.
GitHub Models) are free to use but are subject to rate limits on requests and tokens.
If you want to access non-GitHub models (that is, external models hosted via Azure AI or other endpoints), you'll need to supply the appropriate API key or authentication.
Model Selection Strategy:
๐ง Configuration Process:
1. Select OpenAI GPT-4.1 from the catalog
2. Click Add to My Models - this registers the model for use
3. Choose Try in Playground to launch the testing environment
4. Wait for model initialization (first-time setup may take a moment)
โ๏ธ Understanding Model Parameters:
The Playground is your AI experimentation lab. Here's how to maximize its potential:
๐จ Prompt Engineering Best Practices:
1. Be Specific: Clear, detailed instructions yield better results
2. Provide Context: Include relevant background information
3. Use Examples: Show the model what you want with examples
4. Iterate: Refine prompts based on initial results
๐งช Testing Scenarios:
# Example 1: Code Generation
"Write a Python function that calculates the factorial of a number using recursion. Include error handling and docstrings."
# Example 2: Creative Writing
"Write a professional email to a client explaining a project delay, maintaining a positive tone while being transparent about challenges."
# Example 3: Data Analysis
"Analyze this sales data and provide insights: [paste your data]. Focus on trends, anomalies, and actionable recommendations."
๐ฏ Goal: Compare different models using identical prompts to understand their strengths
๐ Instructions:
1. Add Phi-4-mini to your workspace
2. Use the same prompt for both GPT-4.1 and Phi-4-mini
3. Compare response quality, speed, and accuracy
4. Document your findings in the results section
๐ก Key Insights to Discover:
๐ฏ Objective: Create specialized AI agents tailored for specific tasks and workflows
Agent Builder is where AI Toolkit truly shines. It allows you to create purpose-built AI assistants that combine the power of large language models with custom instructions, specific parameters, and specialized knowledge.
๐ง Agent Architecture Components:
๐จ Creating Effective System Prompts:
# Template Structure:
## Role Definition
You are a [specific role] with expertise in [domain].
## Capabilities
- List specific abilities
- Define scope of knowledge
- Clarify limitations
## Behavior Guidelines
- Response style (formal, casual, technical)
- Output format preferences
- Error handling approach
## Examples
Provide 2-3 examples of ideal interactions
*Of course, you can also use Generate System Prompt to use AI to help you generate and optimize prompts*
๐ง Parameter Optimization:
| Parameter | Recommended Range | Use Case |
|-----------|------------------|----------|
| Temperature | 0.1-0.3 | Technical/factual responses |
| Temperature | 0.7-0.9 | Creative/brainstorming tasks |
| Max Tokens | 500-1000 | Concise responses |
| Max Tokens | 2000-4000 | Detailed explanations |
๐ฏ Mission: Create a specialized Python coding assistant
๐ Configuration Steps:
1. Model Selection: Choose Claude 3.5 Sonnet (excellent for code)
2. System Prompt Design:
# Python Programming Expert Agent
## Role
You are a senior Python developer with 10+ years of experience. You excel at writing clean, efficient, and well-documented Python code.
## Capabilities
- Write production-ready Python code
- Debug complex issues
- Explain code concepts clearly
- Suggest best practices and optimizations
- Provide complete working examples
## Response Format
- Always include docstrings
- Add inline comments for complex logic
- Suggest testing approaches
- Mention relevant libraries when applicable
## Code Quality Standards
- Follow PEP 8 style guidelines
- Use type hints where appropriate
- Handle exceptions gracefully
- Write readable, maintainable code
3. Parameter Configuration:
- Temperature: 0.2 (for consistent, reliable code)
- Max Tokens: 2000 (detailed explanations)
- Top-p: 0.9 (balanced creativity)
Test Scenarios:
1. Basic Function: "Create a function to find prime numbers"
2. Complex Algorithm: "Implement a binary search tree with insert, delete, and search methods"
3. Real-world Problem: "Build a web scraper that handles rate limiting and retries"
4. Debugging: "Fix this code [paste buggy code]"
๐ Success Criteria:
Test your understanding:
๐ Congratulations! You've mastered the fundamentals of AI Toolkit and are ready to build more advanced AI applications!
Ready for more advanced capabilities? Continue to Module 2: MCP with AI Toolkit Fundamentals where you'll learn how to:
์ด ๋ชจ๋์ ๋ง์น๋ฉด ๋ค์์ ํ ์ ์์ต๋๋ค:
Visual Studio Code์ฉ AI Toolkit์ ๋ง์ดํฌ๋ก์ํํธ์ ๋ํ ํ์ฅ ๊ธฐ๋ฅ์ผ๋ก, VS Code๋ฅผ ์ข ํฉ์ ์ธ AI ๊ฐ๋ฐ ํ๊ฒฝ์ผ๋ก ๋ฐ๊ฟ์ค๋๋ค. AI ์ฐ๊ตฌ์ ์ค์ ์ ํ๋ฆฌ์ผ์ด์ ๊ฐ๋ฐ ๊ฐ์ ๊ฐ๊ทน์ ๋ฉ์ฐ๋ฉฐ, ๋ชจ๋ ์์ค์ ๊ฐ๋ฐ์๊ฐ ์์ฑํ AI๋ฅผ ์ฝ๊ฒ ํ์ฉํ ์ ์๋๋ก ๋์ต๋๋ค.
| ๊ธฐ๋ฅ | ์ค๋ช | ํ์ฉ ์ฌ๋ก |
|---------|-------------|----------|
| ๐๏ธ ๋ชจ๋ธ ์นดํ๋ก๊ทธ | GitHub, ONNX, OpenAI, Anthropic, Google ๋ฑ 100๊ฐ ์ด์์ ๋ชจ๋ธ ์ ๊ทผ | ๋ชจ๋ธ ํ์ ๋ฐ ์ ํ |
| ๐ BYOM ์ง์ | ์์ฒด ๋ชจ๋ธ(๋ก์ปฌ/์๊ฒฉ) ํตํฉ | ๋ง์ถคํ ๋ชจ๋ธ ๋ฐฐํฌ |
| ๐ฎ ์ธํฐ๋ํฐ๋ธ ํ๋ ์ด๊ทธ๋ผ์ด๋ | ์ฑํ ์ธํฐํ์ด์ค๋ฅผ ํตํ ์ค์๊ฐ ๋ชจ๋ธ ํ ์คํธ | ๋น ๋ฅธ ํ๋กํ ํ์ดํ ๋ฐ ํ ์คํธ |
| ๐ ๋ฉํฐ๋ชจ๋ฌ ์ง์ | ํ ์คํธ, ์ด๋ฏธ์ง, ์ฒจ๋ถํ์ผ ์ฒ๋ฆฌ | ๋ณตํฉ AI ์ ํ๋ฆฌ์ผ์ด์ |
| โก ๋ฐฐ์น ์ฒ๋ฆฌ | ์ฌ๋ฌ ํ๋กฌํํธ ๋์ ์คํ | ํจ์จ์ ์ธ ํ ์คํธ ์ํฌํ๋ก์ฐ |
| ๐ ๋ชจ๋ธ ํ๊ฐ | ๋ด์ฅ ์งํ(F1, ๊ด๋ จ์ฑ, ์ ์ฌ์ฑ, ์ผ๊ด์ฑ) | ์ฑ๋ฅ ํ๊ฐ |
1๋จ๊ณ: ํ์ฅ ๋ง์ผํ๋ ์ด์ค ์ ์
1. Visual Studio Code ์คํ
2. ํ์ฅ ๋ทฐ ์ด๊ธฐ (Ctrl+Shift+X ๋๋ Cmd+Shift+X)
3. "AI Toolkit" ๊ฒ์
2๋จ๊ณ: ๋ฒ์ ์ ํ
3๋จ๊ณ: ์ค์น ๋ฐ ํ์ฑํ
๐ฏ ๋ชฉํ: ๋ชจ๋ธ ์นดํ๋ก๊ทธ๋ฅผ ์ตํ๊ณ ์ฒซ AI ๋ชจ๋ธ ํ ์คํธํ๊ธฐ
๋ชจ๋ธ ์นดํ๋ก๊ทธ๋ AI ์ํ๊ณ๋ก ๊ฐ๋ ๊ด๋ฌธ์ ๋๋ค. ์ฌ๋ฌ ์ ๊ณต์ ์ฒด์ ๋ชจ๋ธ์ ํ๋ฐ ๋ชจ์ ์ฝ๊ฒ ํ์ํ๊ณ ๋น๊ตํ ์ ์์ต๋๋ค.
๐ ํ์ ๊ฐ์ด๋:
AI Toolkit ์ฌ์ด๋๋ฐ์์ MODELS - Catalog ํด๋ฆญ
๐ก ํ: ์ฝ๋ ์์ฑ, ์ฐฝ์์ ๊ธ์ฐ๊ธฐ, ๋ถ์ ๋ฑ ์ฌ์ฉ ์ฌ๋ก์ ๋ง๋ ํน์ ๊ธฐ๋ฅ์ ๊ฐ์ง ๋ชจ๋ธ์ ์ฐพ์๋ณด์ธ์.
โ ๏ธ ์ฃผ์: GitHub์ ํธ์คํ ๋ ๋ชจ๋ธ(GitHub Models)์ ๋ฌด๋ฃ๋ก ์ฌ์ฉํ ์ ์์ง๋ง ์์ฒญ ๋ฐ ํ ํฐ์ ์ ํ์ด ์์ต๋๋ค. Azure AI๋ ๋ค๋ฅธ ์๋ํฌ์ธํธ๋ฅผ ํตํด ํธ์คํ ๋ ๋น-GitHub ๋ชจ๋ธ์ ์ ๊ทผํ๋ ค๋ฉด ์ ์ ํ API ํค๋ ์ธ์ฆ์ด ํ์ํฉ๋๋ค.
๋ชจ๋ธ ์ ํ ์ ๋ต:
๐ง ์ค์ ์ ์ฐจ:
1. ์นดํ๋ก๊ทธ์์ OpenAI GPT-4.1 ์ ํ
2. Add to My Models ํด๋ฆญํ์ฌ ๋ชจ๋ธ ๋ฑ๋ก
3. Try in Playground ์ ํํด ํ ์คํธ ํ๊ฒฝ ์คํ
4. ๋ชจ๋ธ ์ด๊ธฐํ ๋๊ธฐ (์ฒซ ์คํ ์ ์๊ฐ์ด ๊ฑธ๋ฆด ์ ์์)
โ๏ธ ๋ชจ๋ธ ํ๋ผ๋ฏธํฐ ์ดํดํ๊ธฐ:
ํ๋ ์ด๊ทธ๋ผ์ด๋๋ AI ์คํ์ค์ ๋๋ค. ์ต๋ํ ํ์ฉํ๋ ๋ฐฉ๋ฒ์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค:
๐จ ํ๋กฌํํธ ์์ง๋์ด๋ง ๋ชจ๋ฒ ์ฌ๋ก:
1. ๊ตฌ์ฒด์ ์ผ๋ก ์์ฑ: ๋ช ํํ๊ณ ์์ธํ ์ง์๊ฐ ๋ ์ข์ ๊ฒฐ๊ณผ๋ฅผ ๋ง๋ญ๋๋ค
2. ๋งฅ๋ฝ ์ ๊ณต: ๊ด๋ จ ๋ฐฐ๊ฒฝ ์ ๋ณด๋ฅผ ํฌํจํ์ธ์
3. ์์ ์ฌ์ฉ: ์ํ๋ ๋ฐ๋ฅผ ์์๋ก ๋ณด์ฌ์ฃผ์ธ์
4. ๋ฐ๋ณต ๊ฐ์ : ์ด๊ธฐ ๊ฒฐ๊ณผ๋ฅผ ๋ฐํ์ผ๋ก ํ๋กฌํํธ๋ฅผ ๋ค๋ฌ์ผ์ธ์
๐งช ํ ์คํธ ์๋๋ฆฌ์ค:
# Example 1: Code Generation
"Write a Python function that calculates the factorial of a number using recursion. Include error handling and docstrings."
# Example 2: Creative Writing
"Write a professional email to a client explaining a project delay, maintaining a positive tone while being transparent about challenges."
# Example 3: Data Analysis
"Analyze this sales data and provide insights: [paste your data]. Focus on trends, anomalies, and actionable recommendations."
๐ฏ ๋ชฉํ: ๋์ผํ ํ๋กฌํํธ๋ก ์ฌ๋ฌ ๋ชจ๋ธ์ ๋น๊ตํด ๊ฐ์ ์ ํ์ ํ๊ธฐ
๐ ์ง์นจ:
1. ์์ ๊ณต๊ฐ์ Phi-4-mini ์ถ๊ฐ
2. GPT-4.1๊ณผ Phi-4-mini์ ๋์ผํ ํ๋กฌํํธ ์ฌ์ฉ
3. ์๋ต ํ์ง, ์๋, ์ ํ๋ ๋น๊ต
4. ๊ฒฐ๊ณผ ์น์ ์ ๋ฐ๊ฒฌ ๋ด์ฉ ๊ธฐ๋ก
๐ก ์์์ผ ํ ํต์ฌ ์ธ์ฌ์ดํธ:
๐ฏ ๋ชฉํ: ํน์ ์์ ๊ณผ ์ํฌํ๋ก์ฐ์ ๋ง์ถ ์ ๋ฌธ AI ์์ด์ ํธ ์์ฑ
Agent Builder๋ AI Toolkit์ ํต์ฌ ๊ธฐ๋ฅ์ ๋๋ค. ๋ํ ์ธ์ด ๋ชจ๋ธ์ ํ์ ๋ง์ถคํ ์ง์, ํน์ ํ๋ผ๋ฏธํฐ, ์ ๋ฌธ ์ง์๊ณผ ๊ฒฐํฉํด ๋ชฉ์ ์ ๋ง๋ AI ๋น์๋ฅผ ๋ง๋ค ์ ์์ต๋๋ค.
๐ง ์์ด์ ํธ ์ํคํ ์ฒ ๊ตฌ์ฑ์์:
๐จ ํจ๊ณผ์ ์ธ ์์คํ ํ๋กฌํํธ ์์ฑ:
# Template Structure:
## Role Definition
You are a [specific role] with expertise in [domain].
## Capabilities
- List specific abilities
- Define scope of knowledge
- Clarify limitations
## Behavior Guidelines
- Response style (formal, casual, technical)
- Output format preferences
- Error handling approach
## Examples
Provide 2-3 examples of ideal interactions
*๋ฌผ๋ก Generate System Prompt ๊ธฐ๋ฅ์ ์ฌ์ฉํด AI๊ฐ ํ๋กฌํํธ ์์ฑ๊ณผ ์ต์ ํ๋ฅผ ๋์์ค ์๋ ์์ต๋๋ค*
๐ง ํ๋ผ๋ฏธํฐ ์ต์ ํ:
| ํ๋ผ๋ฏธํฐ | ๊ถ์ฅ ๋ฒ์ | ํ์ฉ ์ฌ๋ก |
|-----------|------------------|----------|
| Temperature | 0.1-0.3 | ๊ธฐ์ ์ /์ฌ์ค์ ์๋ต |
| Temperature | 0.7-0.9 | ์ฐฝ์์ /๋ธ๋ ์ธ์คํ ๋ฐ ์์ |
| Max Tokens | 500-1000 | ๊ฐ๊ฒฐํ ์๋ต |
| Max Tokens | 2000-4000 | ์์ธํ ์ค๋ช |
๐ฏ ๋ฏธ์ : ์ ๋ฌธ์ ์ธ ํ์ด์ฌ ์ฝ๋ฉ ์ด์์คํดํธ ๋ง๋ค๊ธฐ
๐ ์ค์ ๋จ๊ณ:
1. ๋ชจ๋ธ ์ ํ: Claude 3.5 Sonnet ์ ํ (์ฝ๋ ์์ ์ ํ์)
2. ์์คํ ํ๋กฌํํธ ์ค๊ณ:
# Python Programming Expert Agent
## Role
You are a senior Python developer with 10+ years of experience. You excel at writing clean, efficient, and well-documented Python code.
## Capabilities
- Write production-ready Python code
- Debug complex issues
- Explain code concepts clearly
- Suggest best practices and optimizations
- Provide complete working examples
## Response Format
- Always include docstrings
- Add inline comments for complex logic
- Suggest testing approaches
- Mention relevant libraries when applicable
## Code Quality Standards
- Follow PEP 8 style guidelines
- Use type hints where appropriate
- Handle exceptions gracefully
- Write readable, maintainable code
3. ํ๋ผ๋ฏธํฐ ์ค์ :
- Temperature: 0.2 (์ผ๊ด๋๊ณ ์ ๋ขฐํ ์ ์๋ ์ฝ๋)
- Max Tokens: 2000 (์์ธํ ์ค๋ช )
- Top-p: 0.9 (๊ท ํ ์กํ ์ฐฝ์์ฑ)
ํ ์คํธ ์๋๋ฆฌ์ค:
1. ๊ธฐ๋ณธ ๊ธฐ๋ฅ: "์์ ์ฐพ๊ธฐ ํจ์ ์์ฑ"
2. ๋ณต์กํ ์๊ณ ๋ฆฌ์ฆ: "์ฝ์ , ์ญ์ , ๊ฒ์ ๋ฉ์๋๋ฅผ ํฌํจํ ์ด์ง ํ์ ํธ๋ฆฌ ๊ตฌํ"
3. ์ค์ ๋ฌธ์ : "์์ฒญ ์ ํ๊ณผ ์ฌ์๋๋ฅผ ์ฒ๋ฆฌํ๋ ์น ์คํฌ๋ํผ ๋ง๋ค๊ธฐ"
4. ๋๋ฒ๊น : "์ด ์ฝ๋๋ฅผ ์์ ํด ์ฃผ์ธ์ [๋ฒ๊ทธ ์๋ ์ฝ๋ ๋ถ์ฌ๋ฃ๊ธฐ]"
๐ ์ฑ๊ณต ๊ธฐ์ค:
์ดํด๋๋ฅผ ํ์ธํด ๋ณด์ธ์:
๐ ์ถํํฉ๋๋ค! AI Toolkit์ ๊ธฐ๋ณธ๊ธฐ๋ฅผ ๋ง์คํฐํ์ผ๋ฉฐ, ๋ ๊ณ ๊ธ AI ์ ํ๋ฆฌ์ผ์ด์ ์ ๋ง๋ค ์ค๋น๊ฐ ๋์์ต๋๋ค!
๋ ๊ณ ๊ธ ๊ธฐ๋ฅ์ ๋ฐฐ์ฐ๊ณ ์ถ๋ค๋ฉด ๋ชจ๋ 2: MCP with AI Toolkit Fundamentals ๋ก ์ด๋ํ์ธ์. ์ฌ๊ธฐ์ ๋ค์์ ๋ฐฐ์ฐ๊ฒ ๋ฉ๋๋ค:
๋ฉด์ฑ ์กฐํญ:
์ด ๋ฌธ์๋ AI ๋ฒ์ญ ์๋น์ค Co-op Translator๋ฅผ ์ฌ์ฉํ์ฌ ๋ฒ์ญ๋์์ต๋๋ค.
์ ํ์ฑ์ ์ํด ์ต์ ์ ๋คํ๊ณ ์์ผ๋, ์๋ ๋ฒ์ญ์๋ ์ค๋ฅ๋ ๋ถ์ ํํ ๋ถ๋ถ์ด ์์ ์ ์์์ ์ ์ํ์๊ธฐ ๋ฐ๋๋๋ค.
์๋ฌธ์ ํด๋น ์ธ์ด์ ์๋ณธ ๋ฌธ์๊ฐ ๊ถ์ ์๋ ์ถ์ฒ๋ก ๊ฐ์ฃผ๋์ด์ผ ํฉ๋๋ค.
์ค์ํ ์ ๋ณด์ ๊ฒฝ์ฐ ์ ๋ฌธ์ ์ธ ์ธ๊ฐ ๋ฒ์ญ์ ๊ถ์ฅํฉ๋๋ค.
๋ณธ ๋ฒ์ญ ์ฌ์ฉ์ผ๋ก ์ธํด ๋ฐ์ํ๋ ์คํด๋ ์๋ชป๋ ํด์์ ๋ํด ๋น์ฌ๋ ์ฑ ์์ ์ง์ง ์์ต๋๋ค.