Week 1 • Day 7100% FREE

Day 7:Mini-Project (Local Runbook Search & Analyzer CLI) + Week 1 Final Interview Grill

Battle-tested daily lesson note • 100% runnable code, interview Q&A, test suite & interactive quiz

Week 1 — Day 7: Mini-Project (Local Runbook Search & Analyzer CLI) + Week 1 Final Interview Grill

Mentor's Note (10+ YOE Staff AI Engineer POV): Congratulations on reaching Day 7 of Week 1!

Today we bring together every single skill from Days 1–6:

  • Day 1: OS & root .env inspection (load_root_dotenv, mask_secret)
  • Day 2: String normalization, PII redaction & token cost math (text_sanitizer)
  • Day 3: O(1) Hash Sets & Dictionaries for fast keyword matching & citation verification (log_deduplicator)
  • Day 4: Control flow, loops & safe default parameters (incident_router)
  • Day 5: pathlib.Path file traversal, UTF-8 Markdown header splitting & JSON serialization (runbook_parser)
  • Day 6: Object-Oriented @dataclass models (RunbookDocument, RunbookSection, SearchResult)

Together, they form our Week 1 Mini-Project (runbook_search_cli.py)—a fast, deterministic, pure-Python Local Runbook Search & Grounding Engine that indexes .md files in runbooks/, answers incident queries with exact [file.md#Header] citations, and accurately flags unanswerable questions ("covered_by_doc": false) without hallucinating!

(And notice: in Week 4 & Month 3, this exact architecture upgrades into our Async LLM Copilot and Hybrid Vector + BM25 RAG Engine!)


Part 1: Architecture of the Week 1 Mini-Project

text
[runbooks/*.md Files on Disk] │ ▼ (Day 5: pathlib.Path + UTF-8 Header Splitter) [RunbookDocument & RunbookSection Objects] (Day 6: OOP @dataclass + O(1) Keyword Sets) │ ▼ (Day 2 & 3: Query Sanitization + Set Intersection Scoring) [Top Matching Section Ranked] │ ├── Score >= Threshold (0.25) ──> Return Grounded Answer + Citation + Token/Cost Audit │ └── Score < Threshold (0.25) ──> Abstain Safely! ("covered_by_doc": false — Zero Hallucination!)

Part 2: Running the Week 1 Mini-Project & Test Suite

powershell
# 1. Run the complete Week 1 Mini-Project CLI: python week01_computer_terminal_git_python_basics/day07_week1_mini_project_and_interview/src/runbook_search_cli.py # 2. Run the Day 7 End-to-End Integration Tests: python -m unittest discover -s week01_computer_terminal_git_python_basics/day07_week1_mini_project_and_interview/tests -v

Part 3: The Complete Week 1 Mock Interview Gauntlet

After running the project, open Tab 3: Interview Questions where we have compiled the Top 10 Must-Know Week 1 Interview Questions with full Senior AI Engineer answers!