AI & Machine Learning Labs

Explore image generation, API integration, and multi-agent orchestration through interactive labs with diverse interfaces.

GenAI Advanced Labs - Module 2

Master advanced AI capabilities including image generation, API integration, and autonomous agent systems.

Lab 4: AI Image Generation Studio
Diffusion / Intermediate
Scenario: Marketing Asset Generator
CreativeAI Agency needs to generate on-brand marketing visuals. Build a prompt engineering workflow for image generation models (DALL-E, Stable Diffusion, Midjourney). Learn to craft effective prompts, control styles, and iterate on outputs.

Learning Objectives:

  • Prompt Anatomy: Structure effective image generation prompts
  • Style Control: Apply artistic styles and modifiers
  • Parameter Tuning: Adjust CFG scale, steps, and seeds
  • Negative Prompts: Exclude unwanted elements effectively

Image Generation Studio

Pollinations.ai (Real Images)
πŸ“‹ Prompt Requirements 0/5 requirements met
β—‹ Subject (person, dragon, castle, etc.)
β—‹ Environment (in a forest, at sunset, etc.)
β—‹ Lighting (golden hour, dramatic, etc.)
β—‹ Style (photorealistic, anime, etc.)
β—‹ Quality (highly detailed, 8k, etc.)
Include: who/what, where, and lighting description
Art style keywords (photorealistic, anime, oil painting, etc.)
Resolution/quality keywords (highly detailed, 8k, masterpiece, etc.)
What to avoid in the image
Aspect Ratio
Seed (Optional)
Your generated image will appear here
Complete all 5 prompt requirements to enable generation
ASSEMBLED PROMPT (sent to API):
Type your prompt to see assembled version...
Progress: 0/3 tasks completed
Score: 0/100
0%

Lab Completed!

Great image prompting skills!

Lab 5: LLM API Integration
API / Intermediate
Scenario: Building an AI-Powered Application
DevTech Inc. is integrating LLM capabilities into their product. Learn to make API calls to OpenAI, handle responses, implement streaming, manage rate limits, and build robust error handling for production applications.

Learning Objectives:

  • API Structure: Understand request/response formats
  • Authentication: Properly handle API keys and security
  • Parameters: Configure temperature, max tokens, and more
  • Error Handling: Build resilient API integrations
Challenge 1/4
Fix Invalid JSON
The request body has syntax errors. Find and fix them.
🎯 Your Task
Edit the JSON below to fix errors or add required fields. Click "Validate JSON" to check your answer. All strings must be in double quotes, properties must be separated by commas.
JSON Editor
Edit the JSON and click "Validate JSON" to check your solution.
Progress: 0/4 challenges completed
Score: 0/100
0%

Lab Completed!

Excellent API integration!

Lab 6: AI Agent Orchestration
Agents / Advanced
Scenario: Multi-Agent Research System
ResearchAI Corp needs a system where multiple specialized AI agents collaborate. Build an orchestration pipeline with a Research Agent, Analyst Agent, and Writer Agent that work together to produce comprehensive reports from raw data.

Learning Objectives:

  • Agent Design: Define specialized agent roles and capabilities
  • Workflow Orchestration: Chain agents in logical sequences
  • Message Passing: Handle inter-agent communication
  • Error Recovery: Implement fallbacks and retries

Agent Configuration Console

1 2 3 4 5

Step 1: Configure Research Agent

Define the research agent's system prompt, tools, and parameters
Progress: 0/5 tasks completed
Score: 0/100
0%

Lab Completed!

Excellent orchestration design!

Lab 4: Image Generation Instructions

Objective

Create effective prompts for AI image generation models. You must meet all 5 prompt requirements and generate at least one successful image.

Step-by-Step Guide

  1. Main Prompt (Field 1): Write a descriptive prompt that includes a subject (who/what), environment (where), and lighting conditions.
  2. Style Modifiers (Field 2): Add artistic style keywords like "digital art", "photorealistic", "anime", "oil painting", etc.
  3. Quality Modifiers (Field 3): Include quality keywords such as "highly detailed", "8k", "masterpiece", "cinematic".
  4. Negative Prompt (Field 4): Optionally specify what to avoid: "blurry", "low quality", "watermark".
  5. Output Settings (Field 5): Select aspect ratio and optionally set a seed for reproducibility.
  6. Generate: Click "Generate Real Image" to create your image using Pollinations.ai.
Pro Tips

Use comma-separated keywords for better results. Be specific about lighting ("golden hour", "dramatic shadows", "soft ambient"). Combine multiple style keywords for unique effects.

Hints for Success
  • Subject keywords: person, dragon, castle, landscape, portrait, cityscape
  • Environment keywords: forest, mountains, sunset, ocean, futuristic city
  • Lighting keywords: golden hour, dramatic, neon, soft, cinematic lighting
  • Quality boosters: highly detailed, 8k resolution, masterpiece, professional
Common Mistakes

Avoid vague descriptions. "A nice picture" won't workβ€”be specific! Don't forget lighting descriptions as they significantly impact image quality.

Lab 5: API Integration Instructions

Objective

Complete 4 JSON challenges that test your understanding of LLM API request/response formats. Fix syntax errors, add missing fields, and configure parameters correctly.

Challenge Overview

  1. Challenge 1 - Fix Invalid JSON: Find and correct JSON syntax errors (missing quotes, commas, brackets).
  2. Challenge 2 - Add Missing Fields: Add required API fields like model, messages array, or authentication headers.
  3. Challenge 3 - Configure Parameters: Set appropriate values for temperature, max_tokens, and other parameters.
  4. Challenge 4 - Error Handling: Structure a proper error response or retry configuration.
Pro Tips

Use the "Format" button to auto-indent your JSON and spot structural issues. All string values must use double quotes, not single quotes. Property names also require double quotes.

JSON Syntax Rules
  • All strings must be in double quotes: "value"
  • Property names need quotes: "model": "gpt-4"
  • Separate items with commas (no trailing comma)
  • Arrays use square brackets: [item1, item2]
  • Objects use curly braces: {"key": "value"}
Common Mistakes

Watch for missing commas between properties, trailing commas after the last item, and mismatched brackets. The "Hint" button can help identify specific issues.

Lab 6: Agent Orchestration Instructions

Objective

Configure a multi-agent research system with three specialized agents (Research, Analyst, Writer) and proper workflow settings. Complete all 5 configuration steps.

Step-by-Step Configuration

  1. Step 1 - Research Agent: Write a system prompt (50+ chars) containing keywords like "search", "find", "gather". Enable both required tools and set max tokens (500-2000).
  2. Step 2 - Analyst Agent: Create an analysis-focused prompt with keywords like "analyze", "evaluate", "assess". Enable required tools and configure tokens.
  3. Step 3 - Writer Agent: Define a writing prompt with keywords like "write", "compose", "draft". Set appropriate token limit for longer outputs.
  4. Step 4 - Workflow Settings: Choose error handling strategy, retry count (1-5), timeout (30-300 sec), and write a test query (20+ chars).
  5. Step 5 - Test Execution: Run the workflow test and verify all agents execute successfully.
Pro Tips

Each agent should have a distinct, specialized role. Use "Retry with backoff" for robust error handling. Higher token limits for Writer agent allow longer outputs.

Required Keywords by Agent
  • Research: search, find, gather, collect, retrieve
  • Analyst: analyze, evaluate, assess, examine, review
  • Writer: write, compose, draft, create, produce
Common Mistakes

Forgetting to check the required tool boxes, using prompts without the required keywords, or setting values outside valid ranges (e.g., tokens below 500).