...rs: int = 2500, head_ratio: float = 0.6) -> str:
    if len(text) <= max_chars:
        return text
    head = int(max_chars * head_ratio)
    tail = max_chars - head - 50
    return text[:head] + "\n...\n[TRUNCATED]\n...\n" + text[-tail:]
```

### 5.2 Output begrenzen (`num_predict`)
Bei Ollama per Options hart setzen. Sonst kann er “Roman” generieren.

```python
options = {
  "temperature": 0.2,
  ...