These 8 assignments are designed to reinforce and expand upon the concepts covered in Modules 1-4 of the Gen AI Developer Track. Each assignment includes learning objectives, detailed instructions, evaluation criteria, and expected deliverables.
- Understand differences between AI, ML, DL, and Gen AI
- Compare foundation models across different providers
- Evaluate model capabilities for various use cases
- Practice responsible AI assessment
Build a comparative analysis of at least 5 different LLMs (e.g., GPT-4, Claude, Gemini, Llama, Mistral) across multiple dimensions including capabilities, pricing, context windows, and use cases.
-
Research Phase
- Document the architecture type (transformer, mixture of experts, etc.)
- Identify whether models are foundation, fine-tuned, or multimodal
- Note training data cutoff dates and context window sizes
- Research pricing models for each API
-
Testing Phase
- Design 5 standardized test prompts covering:
- Creative writing
- Code generation
- Data analysis
- Reasoning and logic
- Multilingual capabilities
- Execute each prompt across all models
- Document response quality, speed, and accuracy
- Design 5 standardized test prompts covering:
-
Analysis Phase
- Create a comparison matrix with scores (1-10) for each dimension
- Identify strengths and weaknesses of each model
- Recommend models for specific business scenarios
- Document any bias or ethical concerns observed
- Markdown Report (2000-3000 words) with:
- Executive summary with key findings
- Detailed comparison tables
- Sample outputs from each model
- Use case recommendations
- Ethical considerations and limitations
- Comprehensiveness of research (25%)
- Quality of test prompts and methodology (25%)
- Depth of analysis and insights (30%)
- Practical recommendations (20%)
- Master advanced prompt engineering techniques
- Understand temperature, top-p, and other parameters
- Apply various prompt patterns effectively
- Practice prompt injection safety
Create a Python-based prompt engineering toolkit that demonstrates mastery of different prompting strategies and parameters.
-
Build a Prompt Pattern Library
- Implement at least 8 prompt patterns:
- Zero-shot prompting
- Few-shot prompting (3-5 examples)
- Chain-of-thought reasoning
- Role-based prompting
- Persona pattern
- Template pattern
- Meta-prompting
- Reflection pattern
- Implement at least 8 prompt patterns:
-
Parameter Exploration
- Create experiments showing the impact of:
- Temperature (0.0, 0.5, 0.7, 1.0, 1.5)
- Top-p (0.1, 0.5, 0.9, 1.0)
- Max tokens
- Frequency/presence penalties
- Document outcomes for each parameter combination
- Create experiments showing the impact of:
-
Safety Testing
- Test for prompt injection vulnerabilities
- Implement guardrails to prevent:
- Harmful content generation
- PII leakage
- Jailbreak attempts
- Create a safe prompt wrapper class
-
Python Script(s) with:
- Modular functions for each prompt pattern
- Parameter experimentation framework
- Safety validation layer
- Comprehensive docstrings
-
Jupyter Notebook demonstrating:
- Each prompt pattern with real examples
- Parameter impact visualization
- Safety testing results
-
README.md with:
- Usage instructions
- Best practices guide
- When to use each pattern
- Code quality and modularity (25%)
- Diversity and effectiveness of patterns (30%)
- Parameter analysis depth (20%)
- Safety implementations (25%)
- Master REST API concepts and authentication
- Integrate multiple LLM providers (OpenAI, Bedrock, Gemini, Ollama)
- Implement error handling and retry logic
- Create normalized response formats
Build a production-ready Python framework that provides a unified interface to interact with multiple LLM providers, with features like automatic failover, response caching, and cost tracking.
-
Core API Integration
- Implement clients for:
- OpenAI (GPT-4, GPT-3.5)
- Amazon Bedrock (Claude, Llama)
- Google Gemini
- Ollama (local models)
- Handle authentication for each provider
- Use environment variables for API keys
- Implement clients for:
-
Advanced Features
- Unified Interface: Single method to call any provider
- Response Normalization: Standardize outputs across providers
- Error Handling: Retry logic with exponential backoff
- Automatic Failover: Switch providers on failure
- Cost Tracking: Log token usage and estimated costs
- Response Caching: Avoid duplicate API calls
- Async Support: Implement async methods for batch processing
-
Validation Layer
- Use Pydantic for:
- Request validation
- Response validation
- Configuration management
- Type hints throughout
- Use Pydantic for:
-
Logging & Monitoring
- Structured logging for all API calls
- Performance metrics (latency, tokens/sec)
- Error rate tracking
-
Python Package with:
llm_client.py- Main client classproviders/- Individual provider implementationsmodels.py- Pydantic modelsutils.py- Helper functionsconfig.py- Configuration management
-
Test Suite with:
- Unit tests for each provider
- Integration tests
- Mock API responses for testing
-
Documentation with:
- API reference
- Usage examples
- Configuration guide
- Troubleshooting section
- Code architecture and design patterns (30%)
- Error handling and resilience (25%)
- Feature completeness (25%)
- Documentation quality (20%)
- Master Jinja2 templating for prompts
- Build reusable prompt components
- Implement context management strategies
- Create domain-specific prompt libraries
Develop a sophisticated prompt templating system that allows dynamic generation of prompts for various business scenarios with variable substitution, conditional logic, and template inheritance.
-
Template Architecture
- Create base templates for:
- Data analysis tasks
- Content generation
- Code review and generation
- Customer service responses
- Report summarization
- Implement template inheritance
- Add macros for reusable components
- Create base templates for:
-
Dynamic Variable System
- Support multiple variable types:
- Strings, numbers, lists, dicts
- Nested objects
- Optional parameters with defaults
- Implement validators for required variables
- Add type checking
- Support multiple variable types:
-
Context Management
- Track conversation history
- Implement sliding window context
- Calculate and manage token limits
- Optimize context for different models
-
Prompt Library
- Create 15+ production-ready templates for:
- Text summarization (different lengths)
- Sentiment analysis
- Entity extraction
- Translation with style preservation
- Question answering
- Code explanation and debugging
- Email drafting (formal, casual, persuasive)
- Meeting notes generation
- Create 15+ production-ready templates for:
-
Testing Framework
- Unit tests for each template
- Validation tests for variable substitution
- Integration tests with real LLM APIs
-
Template Library with:
templates/- Jinja2 template files organized by categorytemplate_manager.py- Template loading and renderingvalidators.py- Input validation logiccontext_manager.py- Context optimization
-
Example Applications:
- CLI tool to use templates
- Jupyter notebook with demonstrations
-
Documentation:
- Template reference guide
- Best practices for prompt design
- Variable naming conventions
- Template design and reusability (30%)
- Context management implementation (25%)
- Library comprehensiveness (25%)
- Code quality and testing (20%)
- Understand document chunking strategies
- Implement different embedding techniques
- Compare embedding models and metrics
- Build semantic search capabilities
Create an end-to-end document processing pipeline that ingests various document formats, chunks them intelligently, generates embeddings, and enables semantic search.
-
Document Ingestion
- Support multiple formats:
- PDF (with OCR for scanned docs)
- DOCX
- TXT
- Markdown
- HTML
- JSON/CSV
- Extract metadata (title, author, date, etc.)
- Handle multi-page documents
- Support multiple formats:
-
Chunking Strategies
- Implement at least 4 chunking methods:
- Fixed-size chunking (with overlap)
- Sentence-based chunking
- Paragraph-based chunking
- Semantic chunking (using embeddings)
- Create comparative analysis of each method
- Auto-select best strategy based on document type
- Implement at least 4 chunking methods:
-
Embedding Generation
- Integrate multiple embedding models:
- OpenAI text-embedding-3-small/large
- Sentence-transformers (all-MiniLM-L6-v2)
- Cohere embeddings
- Batch processing for efficiency
- Cache embeddings to avoid recomputation
- Integrate multiple embedding models:
-
Similarity Search
- Implement distance metrics:
- Cosine similarity
- Euclidean distance
- Dot product
- Compare metrics on same dataset
- Visualize embedding spaces using UMAP/t-SNE
- Implement distance metrics:
-
Quality Metrics
- Calculate chunking quality scores
- Measure retrieval accuracy
- Track processing time and costs
-
Python Package with:
document_loader.py- Multi-format ingestionchunker.py- Chunking strategiesembedder.py- Embedding generationsearch.py- Semantic search enginemetrics.py- Quality evaluation
-
Jupyter Notebook with:
- Comparative analysis of chunking methods
- Embedding model benchmarks
- Visualization of embedding spaces
-
Test Dataset:
- Sample documents (10+ across different formats)
- Ground truth for retrieval evaluation
-
Report (Markdown):
- Methodology explanation
- Benchmark results
- Recommendations for different use cases
- Implementation completeness (30%)
- Chunking strategy effectiveness (25%)
- Analysis depth and insights (25%)
- Code quality and documentation (20%)
- Build production-ready RAG pipelines
- Implement hybrid search (semantic + keyword)
- Integrate vector databases (Chroma, Pinecone)
- Optimize retrieval quality
Develop an advanced RAG system that combines semantic search with traditional keyword search, implements reranking, and provides explainable results with source citations.
-
Vector Database Setup
- Implement dual database support:
- Chroma (local development)
- Pinecone (production deployment)
- Create migration utilities between databases
- Implement collection management (create, update, delete)
- Implement dual database support:
-
Hybrid Search Engine
- Semantic Search: Vector similarity using embeddings
- Keyword Search: BM25 or TF-IDF
- Hybrid Fusion: Combine results using:
- Reciprocal Rank Fusion (RRF)
- Weighted scoring
- Learned fusion (optional)
- Implement configurable weights
-
Reranking Layer
- Implement cross-encoder reranking
- Add diversity filtering to avoid redundant results
- Implement MMR (Maximal Marginal Relevance)
-
Query Enhancement
- Query expansion using LLMs
- Hypothetical document embeddings (HyDE)
- Multi-query generation for comprehensive retrieval
-
Response Generation
- Retrieve top-k relevant chunks
- Build context-aware prompts
- Generate answers with source citations
- Implement answer validation (check if grounded in sources)
-
Evaluation Framework
- Create test queries with ground truth
- Measure:
- Retrieval precision and recall
- Answer accuracy
- Response latency
- A/B test different configurations
-
RAG Application with:
vector_store.py- Database abstraction layerretriever.py- Hybrid search implementationreranker.py- Reranking logicgenerator.py- Response generation with citationsevaluator.py- Quality metrics
-
Configuration System:
- YAML configs for different RAG strategies
- Environment-based settings
-
Demo Application:
- Streamlit UI for testing the RAG system
- Display retrieved chunks with relevance scores
- Show source citations
-
Evaluation Report (Markdown):
- Benchmark different RAG configurations
- Ablation study (impact of each component)
- Recommendations and trade-offs
- RAG architecture quality (30%)
- Retrieval accuracy and relevance (30%)
- Implementation completeness (25%)
- Evaluation rigor (15%)
- Understand AI ethics, bias, and fairness
- Detect and mitigate bias in LLM outputs
- Implement responsible AI practices
- Create governance frameworks
Build a comprehensive system to detect, measure, and mitigate various types of bias in LLM outputs, with a focus on fairness, privacy, and responsible AI deployment.
-
Bias Detection Framework
- Test for multiple bias types:
- Gender bias
- Racial/ethnic bias
- Age bias
- Geographic/cultural bias
- Socioeconomic bias
- Create standardized test prompts for each category
- Measure bias using quantitative metrics
- Test for multiple bias types:
-
Automated Testing Suite
- Generate diverse test cases programmatically
- Test LLMs with:
- Name variation tests (different ethnic names)
- Pronoun consistency tests
- Stereotype detection
- Counterfactual evaluations
- Score outputs for fairness
-
Privacy Protection
- Implement PII detection in:
- Input prompts
- LLM outputs
- Create redaction/anonymization utilities
- Test for data leakage scenarios
- Implement PII detection in:
-
Mitigation Strategies
- Pre-processing: Prompt engineering to reduce bias
- In-processing: Use system prompts for fairness
- Post-processing: Filter and adjust biased outputs
- Compare effectiveness of each approach
-
Governance Dashboard
- Track bias metrics over time
- Log all LLM interactions
- Create audit trails
- Generate compliance reports
-
Responsible AI Checklist
- Create deployment checklist covering:
- Model selection criteria
- Bias testing requirements
- Privacy safeguards
- Monitoring procedures
- Incident response plan
- Create deployment checklist covering:
-
Python Package with:
bias_detector.py- Bias testing frameworkprivacy_guard.py- PII detection and redactionmitigation.py- Bias reduction strategiesgovernance.py- Audit logging and reporting
-
Test Suite:
- 100+ test cases across bias categories
- Benchmark results for major LLMs
- Comparison report
-
Dashboard (Streamlit):
- Real-time bias monitoring
- Historical trends
- Compliance reporting
-
Documentation:
- Ethical AI guidelines
- Bias mitigation playbook
- Governance framework
- Comprehensiveness of bias testing (30%)
- Privacy protection implementation (25%)
- Mitigation strategy effectiveness (25%)
- Documentation and governance (20%)
- Integrate all Part 1 concepts into a production application
- Combine prompt engineering, API integration, and RAG
- Implement user-friendly interfaces
- Deploy with proper error handling and monitoring
Build a complete research assistant application that helps users analyze academic papers, generate summaries, answer questions, and synthesize insights from multiple sources using RAG and advanced prompting.
-
Document Management
- Upload and process research papers (PDFs)
- Extract metadata (title, authors, abstract, citations)
- Organize papers by topic/tags
- Support batch uploads
-
Intelligent Processing
- Chunk papers using optimal strategy
- Generate embeddings and store in vector DB
- Extract key entities (methods, datasets, metrics)
- Generate structured summaries
-
Query Interface
- Support multiple query types:
- Simple Q&A ("What datasets were used?")
- Comparative analysis ("Compare methods in papers A and B")
- Literature review ("Summarize recent trends in X")
- Citation network exploration
- Use appropriate prompt patterns for each query type
- Support multiple query types:
-
Advanced Features
- Multi-document synthesis: Combine insights from multiple papers
- Claim verification: Check if claims are supported by papers
- Research gap identification: Find understudied areas
- Automatic bibliography generation
- Key findings extraction: Generate bullet points of main contributions
-
User Interface
- Build Streamlit application with:
- Document upload and management
- Interactive chat interface
- Source citation display
- Export functionality (PDF reports)
- Add visualization:
- Citation graphs
- Topic clustering
- Timeline of research evolution
- Build Streamlit application with:
-
Prompt Engineering
- Create specialized prompts for:
- Academic summarization
- Critical analysis
- Methodology extraction
- Future work suggestions
- Implement chain-of-thought for complex queries
- Create specialized prompts for:
-
Quality Assurance
- Validate retrieved sources
- Check for hallucinations
- Ensure proper citations
- Implement confidence scoring
-
Performance Optimization
- Cache common queries
- Implement async processing for uploads
- Optimize vector search parameters
- Monitor API costs
-
Complete Application with:
app.py- Main Streamlit applicationdocument_processor.py- PDF processing and chunkingrag_engine.py- RAG implementationprompt_library.py- Academic prompt templatesresearch_agent.py- Query orchestrationutils.py- Helper functions
-
Configuration:
.env.example- Environment variables templateconfig.yaml- Application settingsrequirements.txt- Dependencies
-
Documentation:
README.md- Setup and usage guideARCHITECTURE.md- System design explanationAPI_GUIDE.md- API integration documentationUSER_GUIDE.md- End-user instructions
-
Demo Materials:
- Video walkthrough (5-10 minutes)
- Sample research papers for testing
- Example queries and expected outputs
-
Testing:
- Unit tests for core functions
- Integration tests
- Test dataset with ground truth
- Feature completeness and functionality (30%)
- Code quality and architecture (25%)
- User experience and interface design (20%)
- Documentation and deployment readiness (15%)
- Innovation and advanced features (10%)
- Follow PEP 8 style guidelines
- Use type hints throughout
- Write comprehensive docstrings
- Include inline comments for complex logic
- Maintain consistent naming conventions
- README with clear setup instructions
- API documentation for all major functions/classes
- Architecture diagrams where applicable
- Usage examples and tutorials
- Use Git for version control
- Write meaningful commit messages
- Create branches for major features
- Include .gitignore for sensitive files
- Minimum 70% code coverage for unit tests
- Include integration tests
- Test edge cases and error conditions
- Document test scenarios
- Submit as GitHub repository (or zip file)
- Include all code, documentation, and test files
- Add sample data/examples where applicable
- Provide environment setup instructions
Each assignment will be evaluated on:
-
Technical Implementation (40%)
- Correctness and completeness
- Code quality and organization
- Error handling and edge cases
- Performance optimization
-
Understanding of Concepts (30%)
- Proper application of learned techniques
- Depth of analysis and insights
- Innovation and creativity
-
Documentation (20%)
- Code documentation
- User guides and README
- Technical explanations
- Architecture decisions
-
Presentation (10%)
- Code readability
- Project organization
- Demo quality (where applicable)
- Professional polish
- IDEs: VSCode, PyCharm, Jupyter Lab
- Version Control: Git, GitHub/GitLab
- Testing: pytest, unittest
- Documentation: Sphinx, MkDocs
- Visualization: Matplotlib, Plotly, Seaborn
- OpenAI API Documentation
- LangChain Documentation
- Hugging Face Transformers Guide
- AWS Bedrock Documentation
- Google Gemini API Guide
- Office hours: [Schedule]
- Discussion forum: [Link]
- Mentor contact: [Email]
- Assignments 1-2: Week 1-2 (Module 1-2 coverage)
- Assignments 3-4: Week 2-3 (Module 2-3 coverage)
- Assignments 5-6: Week 3-4 (Module 4 coverage)
- Assignment 7: Week 4 (Ethics across all modules)
- Assignment 8: Week 4 (Capstone integration)
Each assignment should take 8-12 hours to complete thoroughly.
- Start Early: Don't wait until the deadline to begin
- Ask Questions: Reach out to mentors when stuck
- Iterate: Submit drafts for feedback before final submission
- Collaborate: Discuss concepts with peers (but submit individual work)
- Document: Keep notes on your learning process
- Test Thoroughly: Don't skip testing and validation
- Think Production: Write code as if it will be deployed
- Stay Curious: Experiment beyond minimum requirements
Good luck with your assignments!