Hour 1 – AI Research & Coding (Python Libraries)
🔹 Expanded into 7 Subtasks Each (with AI Prompts)
1. Setup environment
- Install Python (Anaconda/Miniconda).
- Create virtual environment.
- Configure Jupyter Notebook / VS Code.
- Setup Git for version control.
- Verify GPU/CPU availability.
- Prompt: “Write a bash script to automatically create a Python virtual environment with common ML libraries.”
- Prompt: “How do I check CUDA compatibility with PyTorch in my system?”
2. Install core libraries
- Install numpy, pandas, matplotlib, scikit-learn.
- Install PyTorch or TensorFlow.
- Install OpenCV for image tasks.
- Install HuggingFace Transformers.
- Test imports with sample code.
- Prompt: “Suggest lightweight Python libraries for ML suitable for low-resource laptops.”
- Prompt: “Generate a
requirements.txt
file with the best versions for stability in ML projects.”
3. Data preprocessing pipeline
- Load dataset into pandas.
- Handle missing values (mean, median, drop).
- Encode categorical variables.
- Scale/normalize numerical features.
- Save cleaned dataset.
- Prompt: “Write sklearn pipeline code that includes imputation, encoding, and scaling.”
- Prompt: “Which preprocessing steps improve performance for tree-based models like XGBoost?”
4. Exploratory Data Analysis (EDA)
- Generate descriptive statistics.
- Plot histograms & boxplots.
- Create correlation heatmap.
- Identify outliers.
- Write a summary report.
- Prompt: “Generate Python code to auto-generate an EDA report using pandas-profiling.”
- Prompt: “How can I detect hidden patterns or seasonality in time-series data?”
5. Train baseline ML model
- Split dataset into train/test.
- Train Logistic Regression model.
- Evaluate accuracy/precision/recall.
- Compare with dummy classifier.
- Save baseline metrics.
- Prompt: “Generate baseline ML models for both classification and regression datasets.”
- Prompt: “How do I decide if my baseline accuracy is meaningful compared to random chance?”
6. Image classification demo
- Load CIFAR-10 or MNIST dataset.
- Build CNN with Keras/PyTorch.
- Train for 5 epochs.
- Plot accuracy/loss curves.
- Test on sample images.
- Prompt: “Write PyTorch code for transfer learning on ResNet50 for CIFAR-10.”
- Prompt: “Suggest ways to improve CNN accuracy without making it too heavy.”
7. NLP basics
- Tokenize sample text.
- Remove stopwords/punctuation.
- Perform lemmatization/stemming.
- Create word frequency visualization.
- Save preprocessed dataset.
- Prompt: “Write Python code for a TF-IDF vectorizer with n-grams.”
- Prompt: “Explain the difference between stemming and lemmatization with examples.”
8. Sentiment analysis model
- Collect IMDB/Twitter dataset.
- Preprocess text (cleaning/tokenizing).
- Train Naive Bayes / LSTM.
- Evaluate with F1 score.
- Test on custom sentences.
- Prompt: “Generate PyTorch LSTM code for sentiment classification.”
- Prompt: “How can I handle sarcasm in sentiment analysis datasets?”
9. HuggingFace Transformers
- Install
transformers
library. - Load pre-trained BERT model.
- Tokenize dataset with tokenizer.
- Fine-tune for classification.
- Save model + tokenizer.
- Prompt: “Write HuggingFace pipeline code for zero-shot text classification.”
- Prompt: “Explain how to reduce GPU memory usage when training BERT.”
10. Fine-tune text classification
- Select dataset (AG News / Yelp).
- Preprocess text & labels.
- Fine-tune DistilBERT.
- Evaluate accuracy on test set.
- Save & deploy model.
- Prompt: “Write HuggingFace Trainer code for fine-tuning DistilBERT.”
- Prompt: “Which hyperparameters affect Transformer fine-tuning the most?”
11. Recommendation engine basics
- Load user-item dataset.
- Create user-item interaction matrix.
- Implement popularity-based recommender.
- Implement collaborative filtering.
- Evaluate with precision@k.
- Prompt: “Generate Python code for a content-based recommender using cosine similarity.”
- Prompt: “What are the differences between collaborative filtering and hybrid recommenders?”
12. Collaborative filtering demo
- Load MovieLens dataset.
- Create user similarity matrix.
- Implement KNN-based recommender.
- Test recommendations for 1 user.
- Save results.
- Prompt: “Write matrix factorization code using SVD for recommendations.”
- Prompt: “How can I deal with the cold-start problem in recommenders?”
13. OpenCV image processing
- Load sample image.
- Convert to grayscale.
- Apply edge detection (Canny).
- Perform image transformations (resize, rotate).
- Display results in grid.
- Prompt: “Generate Python code for face detection using OpenCV Haar cascades.”
- Prompt: “What are modern alternatives to OpenCV for image processing tasks?”
14. Object detection (YOLOv8)
- Install Ultralytics YOLO.
- Load pre-trained YOLO model.
- Run inference on sample image.
- Fine-tune with custom dataset.
- Save trained model.
- Prompt: “Generate YOLOv8 training config for a custom dataset of 3 classes.”
- Prompt: “What are best practices for annotating datasets for object detection?”
15. Speech recognition demo
- Install SpeechRecognition library.
- Load audio file.
- Convert speech → text.
- Evaluate accuracy.
- Test with live microphone input.
- Prompt: “Write Python code for speech recognition using Google Speech API.”
- Prompt: “How can I improve accuracy of speech recognition in noisy environments?”
16. Chatbot with Rasa
- Install Rasa framework.
- Create intents & entities.
- Train dialogue model.
- Test in shell mode.
- Deploy simple bot locally.
- Prompt: “Generate sample
nlu.yml
andstories.yml
files for a customer service bot.” - Prompt: “How to connect a Rasa bot with WhatsApp or Telegram?”
17. TensorFlow Lite model
- Train small TF model.
- Convert model to TFLite format.
- Optimize with quantization.
- Test inference on mobile emulator.
- Compare size vs accuracy.
- Prompt: “Write Python code to quantize a CNN to INT8 for TFLite.”
- Prompt: “What are limitations of TensorFlow Lite compared to full TensorFlow?”
18. Flask API deployment
- Setup Flask project.
- Create
/predict
route. - Load trained ML model.
- Send JSON input & return prediction.
- Test with Postman.
- Prompt: “Generate Flask REST API for a scikit-learn regression model.”
- Prompt: “What security best practices should I follow for Flask APIs?”
19. FastAPI deployment
- Setup FastAPI project.
- Create
/predict
endpoint. - Load trained model.
- Add Swagger UI documentation.
- Deploy with Uvicorn.
- Prompt: “Generate FastAPI code for async inference with a PyTorch model.”
- Prompt: “How does FastAPI compare with Flask for ML model deployment?”
20. Dockerize ML model
- Write Dockerfile.
- Install dependencies inside container.
- Copy model into container.
- Expose API port.
- Run container locally.
- Prompt: “Generate a Dockerfile for FastAPI with GPU-enabled PyTorch model.”
- Prompt: “What’s the difference between Docker and Kubernetes for ML deployment?”
21. Edge AI deployment
- Select lightweight model (MobileNet).
- Optimize model for edge.
- Convert to ONNX/TFLite.
- Deploy on Raspberry Pi/Jetson.
- Test inference speed.
- Prompt: “Generate Python code to run ONNX models on Jetson Nano.”
- Prompt: “What are the hardware limitations of deploying AI on Raspberry Pi?”
22. Monitoring ML models
- Setup logging for predictions.
- Track model accuracy drift.
- Monitor API latency.
- Setup alert system.
- Generate monthly reports.
- Prompt: “Write Python code for monitoring ML drift using EvidentlyAI.”
- Prompt: “What are the best open-source tools for ML observability?”
23. AutoML (PyCaret)
- Install PyCaret.
- Load dataset into PyCaret.
- Run
setup()
for classification. - Compare multiple models.
- Deploy best model.
- Prompt: “Generate PyCaret code for regression AutoML.”
- Prompt: “What are the limitations of AutoML vs manually tuned ML models?”
24. AI ethics & bias check
- Load dataset & check fairness.
- Calculate demographic parity.
- Run bias detection tools.
- Suggest bias mitigation strategies.
- Document ethical risks.
- Prompt: “Generate Python code to check bias using AIF360 toolkit.”
- Prompt: “What are real-world cases where biased AI models failed businesses?”
25. AI + Business integration demo
- Select business case (e-commerce, health, finance).
- Map AI task to ROI benefit.
- Create workflow diagram.
- Build small prototype.
- Present demo report.
- Prompt: “Suggest AI use cases for e-commerce marketplaces to increase revenue.”
- Prompt: “How can AI adoption improve customer trust and reduce fraud?”