File size: 1,195 Bytes
a1a7070
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# 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"
```