Contributing to CrackingMachineLearningInterview
Thank you for helping make this repository better! Contributions of all kinds are welcome: new questions, improved answers, new guides, code examples, and bug fixes.
Table of Contents
- Ways to Contribute
- Getting Started
- Repository Structure
- Content Guidelines
- Formatting Standards
- Review Process
- Code of Conduct
Ways to Contribute
| Type | Description | Examples |
|---|---|---|
| New Q&A | Add interview questions and answers | Classic ML Q&A in README.md |
| Improve answers | Expand or clarify existing answers | Add code examples, fix inaccuracies |
| New guide | Create a new topic guide | New framework or algorithm coverage |
| Code examples | Add working Python code to guides | Scikit-learn, PyTorch, HuggingFace examples |
| Bug fixes | Fix typos, broken links, incorrect info | Spelling errors, outdated info |
| Translations | Translate content to other languages | Spanish, Chinese, etc. |
Getting Started
1. Fork and Clone
# Fork the repo on GitHub, then:
git clone https://github.com/YOUR_USERNAME/CrackingMachineLearningInterview.git
cd CrackingMachineLearningInterview
# Add the upstream remote
git remote add upstream https://github.com/shafaypro/CrackingMachineLearningInterview.git
2. Create a Branch
# Always create a feature branch: never commit directly to main
git checkout -b add-transformer-architecture-guide
# or
git checkout -b fix-regex-typo-readme
Branch naming conventions:
add-<topic>: for new contentfix-<description>: for bug fixesimprove-<topic>: for expanding existing contentupdate-<topic>: for updating outdated content
3. Make Your Changes
Follow the content and formatting guidelines below. Then check that all links work:
python3 tools/check_links.py # whole repo, plus the index.html nav entries
python3 tools/check_links.py path/to/new.md # just your file
python3 tools/check_style.py # no em or en dashes; use colons, commas, parentheses or hyphens
python3 tools/build_question_bank.py # refresh data/questions.json for the practice drill
pip install markdown-it-py==4.0.0 # once, for the next command
python3 tools/build_site.py # refresh guides/*.html and sitemap.xml (the search-engine pages)
The same checks run in CI on every pull request, including --check runs that fail if
data/questions.json, guides/ or sitemap.xml are out of date. Never edit guides/ by hand: it is generated
from the Markdown. If you add a new guide, also add it to the track list in
README.md, the track's own README.md, and the files list of the right track in index.html.
4. Commit Your Changes
git add your-changed-files.md
git commit -m "Add transformer architecture guide with attention mechanism Q&A"
Write clear commit messages:
- Use present tense: "Add X" not "Added X"
- Be specific: "Add BERT fine-tuning examples to NLP guide" not "Update NLP"
- Reference issues: "Fix broken link in RAG guide (closes #42)"
5. Open a Pull Request
git push origin your-branch-name
Then open a Pull Request on GitHub. Use the PR template:
- What: Describe what you added or changed
- Why: Explain the motivation
- Preview: Link to the specific section if adding Q&A
Repository Structure
CrackingMachineLearningInterview/
├── README.md ← Classic ML Q&A (169+ questions)
├── CONTRIBUTING.md ← This file
├── docs/
│ ├── 2026-interview-roadmap.md ← Modern interview topics overview
│ ├── 2026-additional-questions.md ← Modern Q&A (25+ questions)
│ ├── study-pattern.md ← Study guide with difficulty levels
│ └── resources-and-references.md ← Books and external resources
├── ai_genai/ ← AI/GenAI/LLM topics
│ ├── intro_rag.md
│ ├── intro_vector_databases.md
│ └── ...
├── classical_ml/ ← Classical ML algorithms
│ ├── intro_clustering.md
│ ├── intro_time_series.md
│ └── ...
├── mlops/ ← MLOps and production ML
│ ├── intro_mlflow.md
│ ├── intro_model_serving.md
│ └── ...
├── cloud_ml/ ← Cloud ML platforms and AWS/GCP/Azure services
│ ├── intro_cloud_ml_platforms.md
│ ├── aws_for_ml_engineers.md
│ └── ...
├── data_engineering/ ← Data engineering tools
│ ├── intro_apache_spark.md
│ └── ...
└── devops/ ← DevOps and infrastructure
├── intro_docker.md
└── ...
Where to Add New Content
| Content Type | Location |
|---|---|
| Classic ML interview questions | README.md under relevant section |
| Modern AI/LLM questions | docs/2026-additional-questions.md |
| New AI/GenAI guide | ai_genai/intro_<topic>.md |
| New classical ML guide | classical_ml/intro_<topic>.md |
| New MLOps guide | mlops/intro_<topic>.md |
| New data engineering guide | data_engineering/intro_<topic>.md |
| New DevOps guide | devops/intro_<topic>.md |
| New cloud platform guide | cloud_ml/intro_<topic>.md |
Content Guidelines
What Makes a Good Interview Question/Answer?
Good questions:
- Appear frequently in real ML interviews
- Test both conceptual understanding and practical application
- Have clear, unambiguous answers
- Are at the right difficulty level (Beginner/Intermediate/Advanced)
Good answers:
- Start with a clear 1-2 sentence definition
- Include a concrete example or analogy
- Address the "why" (motivation) and the "when" (use cases)
- Include code where it adds clarity
- Mention tradeoffs and limitations
- Are 3-10 sentences for simple questions; more for complex ones
Bad answers to avoid:
- Single-sentence answers without explanation
- Copy-pasted Wikipedia text
- Answers that are technically correct but miss practical nuance
- Answers without examples
Example of a Good Q&A
#### What is the difference between precision and recall?
Precision measures what fraction of your positive predictions were correct:
Precision = TP / (TP + FP). It answers: "Of everything I labeled positive, how many were actually positive?"
Recall measures what fraction of actual positives you found:
Recall = TP / (TP + FN). It answers: "Of all actual positives, how many did I find?"
There is always a tradeoff: increasing the classification threshold raises precision but reduces recall. Business context dictates the priority:
- Fraud detection: prioritize recall (catch most fraudulent transactions, even with false alarms)
- Email spam filter: prioritize precision (don't mark legitimate emails as spam)
- Medical diagnosis (cancer): prioritize recall (better to investigate false positives than miss true positives)
The F1 score is the harmonic mean: F1 = 2 * (precision * recall) / (precision + recall), providing a single balanced metric.
Guide Structure Requirements
New topic guides must include:
- Title and introduction: what the technology is and why it matters
- Table of Contents: linked to anchors
- Core concepts: definitions and diagrams/tables
- Code examples: working Python code with comments
- Comparison tables: when relevant (vs alternatives)
- Interview Q&A section: minimum 8 questions with detailed answers
- Common Pitfalls section: table format with problem + fix
- Related Topics section: links to related guides in the repo
Formatting Standards
Markdown Conventions
# Top-level title (one per file)
## Major section
### Subsection
**Bold** for key terms and emphasis
`code` for inline code, file names, variable names
*italics* for book/paper titles
Code Blocks
Always specify the language:
# Python code with descriptive comments
from sklearn.ensemble import RandomForestClassifier
model = RandomForestClassifier(n_estimators=100)
model.fit(X_train, y_train)
# Shell commands
pip install scikit-learn
-- SQL examples
SELECT user_id, COUNT(*) as purchase_count
FROM orders
GROUP BY user_id
Tables
Use tables for comparisons and summaries:
| Method | Pros | Cons | Use When |
|--------|------|------|---------|
| L1 (Lasso) | Feature selection | Unstable with correlated features | Many irrelevant features |
| L2 (Ridge) | Stable, all features used | No feature selection | Features all potentially relevant |
Difficulty Tags
Tag Q&A with difficulty level:
- 🟢 Beginner: conceptual, expected from all candidates
- 🟡 Intermediate: applied, 2-5 YOE
- 🔴 Advanced: deep technical, senior roles
Review Process
- Automated checks: All PRs must have valid Markdown (no broken syntax)
- Content review: A maintainer reviews for accuracy and completeness
- Formatting review: Check adherence to style guide
- Merge: Squash-merge to keep clean history
Timeline: We aim to review PRs within 5-7 business days. If you haven't heard back in 10 days, feel free to ping in the PR comments.
Review Checklist (for reviewers)
- [ ] Content is technically accurate
- [ ] Code examples work as written
- [ ] Links are valid and point to correct locations
- [ ] Follows formatting standards
- [ ] Q&A answers are sufficiently detailed (not just 1-2 sentences)
- [ ] No duplicate content with existing guides
- [ ] New guide is linked from README.md
Code of Conduct
This project follows the Contributor Covenant Code of Conduct. By participating, you agree to uphold its standards.
Key points:
- Be respectful and constructive in all interactions
- Welcome contributions from all skill levels
- Provide feedback that helps contributors improve
- Credit others' work appropriately
Questions?
- Open a GitHub Issue for questions or suggestions
- For major structural changes, open an issue first to discuss before implementing
Thank you for contributing! Every improvement helps someone prepare for their next ML interview.