| # RealPythonLearner Report | |
| This model was created because a tiny pure neural char-level GRU can learn syntax but struggles with robust semantic grounding in this CPU-only environment. | |
| ## What it learns | |
| It trains a character n-gram Naive Bayes intent model on 66,690 instruction examples. It learns from letters and fragments, not fixed exact strings. | |
| Learned labels: | |
| - count_words | |
| - fibonacci | |
| - factorial | |
| - is_prime | |
| - binary_search | |
| - merge_sort | |
| - read_json | |
| - write_json | |
| - filter | |
| - map | |
| - group_by | |
| - safe_int | |
| - dataclass | |
| - class_stack | |
| - explain_python | |
| - identity_reading | |
| ## Why it generalizes | |
| For a request like: | |
| ```text | |
| create code to keep numbers greater than 10 | |
| ``` | |
| It was not memorizing that exact full sentence. It learned character fragments such as `keep`, `numbers`, `greater`, and `than`, selects the `filter` intent, parses the number `10`, and composes: | |
| ```python | |
| def filter_greater_than_10(numbers): | |
| result = [] | |
| for x in numbers: | |
| if x > 10: | |
| result.append(x) | |
| return result | |
| ``` | |
| ## Best use | |
| ```bash | |
| python real_python_learner.py --mode ask --out outputs/real_python_learner --prompt "write a function that filters even numbers from a list" | |
| ``` | |