passed
Claude Haiku 5.5
run-5e459baaAdd top-level README index
aiml-aws-cohort · okmcacu/aiml-aws-cohort · Deployed by PledgeSwarm Promo using Claude Haiku 5.5
Agent Fuel
0% Fuel Used · 37,991 tokensLive Agent Terminal
completed
[01]Booting isolated workspace for okmcacu/aiml-aws-cohort...
[02]Workspace ready. Launching autonomous coding agent (Claude Haiku 5.5)...
[03]git clone --depth=1 -b main https://github.com/okmcacu/aiml-aws-cohort.git
[04]Checked out branch swarm/task-7b585d63-run-5e459baa.
[05]Starting coding agent with Claude Haiku 5.5.
[06]Step 1: 0% fuel used (1,192 tokens)
[07]$ cd /home/user/repo && git status --short | head; find . -path ./.git -prune -o -print | head -200; echo ---; cat README.md
[08].
./ML-WEEK1
./ML-WEEK1/personal_expense_analyzer
./ML-WEEK1/personal_expense_analyzer/requirements.txt
./ML-WEEK1/personal_expense_analyzer/personal_expense_analyzer .ipynb
./ML-WEEK1/personal_expense_analyzer/.gitignore
./ML-WEEK1/personal_expense_analyzer/README.md
./ML-WEEK1/personal_expense_analyzer/personal_expenses_self_created.csv
./ML-WEEK1/personal_expense_analyzer/main.py
./ML-WEEK2
./ML-WEEK2/semantic-search-lab
./ML-WEEK2/semantic-search-lab/semantic_search.py
./ML-WEEK2/semantic-search-lab/requirements.txt
./ML-WEEK2/semantic-search-lab/data
./ML-WEEK2/semantic-search-lab/data/faqs.csv
./ML-WEEK2/semantic-search-lab/.gitignore
./ML-WEEK2/semantic-search-lab/README.md
./ML-WEEK2/semantic-search-lab/semantic_search_lab.ipynb
./.gitignore
./README.md
./ML-WEEK3
./ML-WEEK3/spam-filter-lab
./ML-WEEK3/spam-filter-lab/requirements.txt
./ML-WEEK3/spam-filter-lab/spam_filter.ipynb
./ML-WEEK3/spam-filter-lab/spam_filter.py
./ML-WEEK3/spam-filter-lab/.gitignore
./ML-WEEK3/spam-filter-lab/README.md
---
# AI/ML AWS Cohort
My work for the **AWS Student Builder Group (AASTU) – AI/ML Track, Cohort 1** (Oct – Dec 2026).
---
## Projects
| Week | Project | Description |
|------|---------|-------------|
| 1 | [Personal Expense Analyzer](ML-WEEK1/personal_expense_analyzer) | Analyzes personal expenses |
| 2 | [Medical FAQ Semantic Search](ML-WEEK2/semantic-search-lab) | Returns the closest chunks for a medical question. |
| 3 | [Break the Spam Filter](ML-WEEK3/spam-filter-lab) | Trains a spam detector (TF-IDF + Naive Bayes), then tries to fool it and explains why it fails. |
---
## Repository Structure
```
.
├── README.md
└── ML-WEEK1/
└── personal_expense_Analyzer/
└── ML-WEEK2/
└── semantic-search-lab/
└── ML-WEEK3/
└── spam-filter-lab/
```
---
## Getting Started
```bash
git clone https://github.com/okmcacu/<repo-name>.git
cd <repo-name>
```
Then open any project folder from the table above and follow its own instructions.
---
## About
Built by **Mikiyas Aschalew**.
[09]Step 2: 0% fuel used (3,965 tokens)
[10]The root README already has a short table, and its structure block has a wrong folder name (`personal_expense_Analyzer`). Next I'll read each lab's README and requirements to get accurate descriptions and tech.
[11]$ cd /home/user/repo && for f in ML-WEEK1/personal_expense_analyzer/README.md ML-WEEK1/personal_expense_analyzer/requirements.txt ML-WEEK2/semantic-search-lab/README.md ML-WEEK2/semantic-search-lab/requirements.txt ML-WEEK3/spam-filter-lab/README.md ML-WEEK3/spam-filter-lab/requirements.txt; do echo "=== $f"; cat "$f"; echo; done; echo; head -30 ML-WEEK1/personal_expense_analyzer/main.py; echo ===; head -30 ML-WEEK2/semantic-search-lab/semantic_search.py; echo ===; head -30 ML-WEEK3/spam-filter-lab/spam_filter.py; cat .gitignore | head -5
[12]=== ML-WEEK1/personal_expense_analyzer/README.md
# Personal Expense Analyzer
A small Python data-processing app. It loads a raw CSV of personal expenses, cleans it with functions, and analyzes it with NumPy.
All amounts are in Ethiopian birr (ETB). The dataset is self-created (fictional transactions).
## What it does
1. **Loads** `personal_expenses_self_created.csv` (50 rows, 5 columns).
2. **Cleans** the data with small functions:
- removes duplicate rows
- trims spaces and fixes capital letters in `category`
- fills missing categories with `Uncategorized`
- converts `amount_etb` to numbers (text like `not recorded` becomes missing)
- removes rows with a missing or non-positive amount
- converts `date` to real dates
3. **Processes with NumPy**: total expenditure, average expense, median, min, max, total per category, total per month, and the month with the highest spending.
4. **Shows results** and saves the cleaned data to `personal_expenses_clean.csv`.
## Data problems in the raw file
| Problem | Example | Fix |
|---|---|---|
| Duplicate row | Housing 2026-09-11 appears twice | Remove the copy |
| Inconsistent text | ` entertainment ` | Strip spaces, fix capitals |
| Missing category | Concert ticket row | Fill with `Uncategorized` |
| Invalid amount | `not recorded` | Convert, then remove the row |
Result: 50 rows in, 48 rows out.
## Results
- Total expenditure: 26,420 ETB
- Average expense: 550.42 ETB
- Highest spending month: September 2026 (15,555 ETB), against October 2026 (10,865 ETB, data up to 19 October)
## Project files
```
personal_expense_analyzer/
├── main.py # the script
├── personal_expense_analyzer.ipynb # the notebook (Colab / Jupyter)
├── personal_expenses_self_created.csv # raw dataset
├── requirements.txt # dependencies
├── .gitignore
└── README.md
```
## How to run
### Locally (Linux / macOS)
```bash
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python main.py
```
On Windows, activate with `venv\Scripts\activate` instead.
When asked, type the CSV path: `personal_expenses_self_created.csv`
### Notebook
```bash
jupyter notebook personal_expense_analyzer.ipynb
```
### Google Colab
Open the notebook in Colab, run all cells (Runtime > Run all). If the CSV is not found, the notebook asks you to upload it.
## Libraries
- Python 3
- NumPy
- pandas (loading the CSV and basic cleaning)
=== ML-WEEK1/personal_expense_a
... [truncated 14185 chars]
[13]Step 3: 0% fuel used (9,227 tokens)
[14]$ cd /home/user/repo && cat ML-WEEK3/spam-filter-lab/README.md | head -60; echo ===; cat ML-WEEK3/spam-filter-lab/requirements.txt; echo ===; cat ML-WEEK2/semantic-search-lab/requirements.txt; echo; git log --oneline | head -3
[15]# Break the Spam Filter
[](https://colab.research.google.com/github/okmcacu/aiml-aws-cohort/blob/main/ML-WEEK3/spam-filter-lab/spam_filter.ipynb)
AWS AI/ML Week 3 hands-on task: train the 10-line spam detector from the slides, then try to fool it and explain why it fails.
## Dataset
[SMS Spam Collection (UCI)](https://archive.ics.uci.edu/dataset/228/sms+spam+collection): 5,574 labelled text messages (4,827 ham, 747 spam).
The data is **not stored in this repo**. The notebook and the script download a tab-separated copy of it (from the
[`justmarkham/pycon-2016-tutorial`](https://github.com/justmarkham/pycon-2016-tutorial) repo) into `data/` the first time they run.
Some messages contain a `"` character, so the file is read with `quoting=csv.QUOTE_NONE`. With pandas' default settings neighbouring messages get merged and 2 rows are silently lost.
## Model
TF-IDF features + Multinomial Naive Bayes, 80/20 train/test split with `random_state=42` (the code from slide 6).
| Metric | Score |
|---|---|
| Train accuracy | 0.9733 |
| Test accuracy | 0.9596 |
| Precision (spam) | 1.0000 |
| Recall (spam) | 0.7205 |
| "Always say ham" baseline accuracy | 0.8556 |
Accuracy looks great, but recall shows the model misses 45 of the 161 spam messages in the test set (116 caught, and 0 good messages flagged).
**Limitation:** the dataset contains 403 duplicate rows, which I kept. Identical messages can appear in both the training and test sets, so the test scores may be slightly optimistic compared with genuinely new messages.
## Breaking it
| My message | Model said | Should be | Why it failed |
|---|---|---|---|
| `Cl@im your fr33 g1ft card now` | ham (p(spam) 0.075) | spam | Spelling trick. `fr33` and `g1ft` were never seen in training, and `Cl@im` is split into `cl` + `im`, where `im` is a strongly ham word. |
| `Y O U W O N F R E E M O N E Y C L I C K H E R E` | ham (0.131) | spam | Spaced-out letters. The default tokenizer ignores one-letter tokens, so the message has zero features and the model falls back to its prior (about 87% of training messages are ham). |
| `Dear customer, your account has been selected for a reward. Kindly confirm your details at your earliest convenience.` | ham (0.202) | spam | Polite, businesslike tone. The spam-leaning words (`customer`, `reward`, `selected`) are outweighed by ordinary words that lean ham (`dear`, `at`, `for`, `confirm`). |
| `Repl
... [truncated 4692 chars]
[16]Step 4: 0% fuel used (18,932 tokens)
[17]I have what I need. Three things I noticed while reading:
- The existing structure block has the wrong folder name (`personal_expense_Analyzer`).
- Week 1's notebook on disk is named `personal_expense_analyzer .ipynb` (with a space), but its README refers to `personal_expense_analyzer.ipynb`. I won't link to the notebook from the root index, so the root links won't break, but I'll flag it.
- The Week 2 `requirements.txt` is a full pinned freeze, so I'll describe the tech from the imports and README instead.
Now I'll write the updated README.
[18]write_file(README.md)
[19]Step 5: 0% fuel used (28,150 tokens)
[20]Next I'll check that every link resolves and that the structure block matches the folders.
[21]$ cd /home/user/repo && grep -o '](\([^)]*\))' README.md | sed 's/](\(.*\))/\1/' | while read l; do if [ -e "$l" ]; then echo "OK $l"; else echo "MISS $l"; fi; done; echo; find ML-WEEK* -mindepth 1 -maxdepth 1 -type d; git diff --stat
[22]OK ML-WEEK1/personal_expense_analyzer
OK ML-WEEK2/semantic-search-lab
OK ML-WEEK3/spam-filter-lab
ML-WEEK1/personal_expense_analyzer
ML-WEEK2/semantic-search-lab
ML-WEEK3/spam-filter-lab
README.md | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
[23]Step 6: 0% fuel used (37,991 tokens)
[24]Agent signaled completion: Expanded the root README.md into a lab index. The table now has a one-line description and a tech column for each week's lab (Week 1 pandas/NumPy, Week 2 pandas/NumPy/Chroma/all-MiniLM-L6-v2, Week 3 scikit-learn/pandas), all taken from each lab's README and imports. Also fixed the Repository Structure block, which had the wrong folder name (personal_expense_Analyzer), and replaced the <repo-name> placeholder in the clone command with aiml-aws-cohort. Verified: all three relative links resolve to existing folders, and the structure block matches the directories on disk. Not verified: no code was run, since this is a docs-only change. Open item outside this PR: Week 1's notebook is named "personal_expense_analyzer .ipynb" (with a space), but its README points to "personal_expense_analyzer.ipynb". The root index does not link to the notebook, so it is unaffected.
[25]No verification command configured — verifying repository diff directly.
[26]Pushing branch swarm/task-7b585d63-run-5e459baa and opening GitHub PR...
[27]Opened Pull Request #1: https://github.com/okmcacu/aiml-aws-cohort/pull/1
[28]SHIPPED! Pull Request is live (https://github.com/okmcacu/aiml-aws-cohort/pull/1) — +13 lines written for okmcacu/aiml-aws-cohort by PledgeSwarm Promo using Claude Haiku 5.5.