docs(prompts): add RNG-uniform coding prompt and ornith35b usage
Add coding_05_rng_uniform.md (cryptographically strong uniform float in [0.0, 1.0), 53-bit mantissa, bias-free, with distribution tests) and document running the coding prompts against the ornith35b profile, which ships coding-tuned sampling plus config-backed stream + read_timeout. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
6076e3bcb8
commit
489af21fd2
2 changed files with 28 additions and 5 deletions
|
|
@ -13,7 +13,7 @@ Referenzmodell (zunächst): das Default-Modell aus `llama.cpp.config`
|
|||
|---|---|
|
||||
| `system_prompt_prosa.md` | `prosa_01_werkstatt.md`, `prosa_02_dystopie.md`, `prosa_03_essay.md`, `prosa_04_dialog.md` |
|
||||
| `system_prompt_reden.md` | `reden_01_abifeier.md`, `reden_02_windkraft.md`, `reden_03_umstrukturierung.md`, `reden_04_gedenken.md` |
|
||||
| `system_prompt_coding.md` | `coding_01_jsonl_validator.md`, `coding_02_refactor.md`, `coding_03_ts_retry.md`, `coding_04_performance.md` |
|
||||
| `system_prompt_coding.md` | `coding_01_jsonl_validator.md`, `coding_02_refactor.md`, `coding_03_ts_retry.md`, `coding_04_performance.md`, `coding_05_rng_uniform.md` |
|
||||
|
||||
Jeder User-Prompt fordert gezielt Eigenschaften heraus, die der jeweilige
|
||||
System-Prompt verspricht (z. B. „show, don't tell" und Schlussbild bei Prosa;
|
||||
|
|
@ -37,7 +37,20 @@ Hinweise:
|
|||
(`--max-tokens`) muss **Denk- plus Ausgabe-Tokens** abdecken — für Prosa/Reden
|
||||
großzügig wählen (z. B. 6000–10000), sonst bricht die sichtbare Antwort ab
|
||||
oder bleibt leer.
|
||||
- **`--stream` benutzen.** Ohne Streaming wartet das Tool die komplette Antwort
|
||||
in einem einzigen Read ab und läuft beim langen Reasoning-Output in den
|
||||
Default-`--read-timeout` (30 s). Beim Streaming setzt jeder Token den Timeout
|
||||
zurück. Für lange nicht-gestreamte Läufe zusätzlich `--read-timeout 600`.
|
||||
- **`--stream` benutzen.** Beim Streaming setzt jeder Token den Read-Timeout
|
||||
zurück; ohne Streaming muss `read_timeout` die gesamte Generierung abdecken.
|
||||
Chat-`read_timeout`/`stream` sind pro Profil in der Config setzbar (Default
|
||||
`read_timeout = 600`), `--read-timeout`/`--stream` auf der CLI überschreiben.
|
||||
|
||||
## Coding-Prompts mit dem `ornith35b`-Profil
|
||||
|
||||
Die `coding_*`-Prompts lassen sich direkt gegen das Coding-Profil testen. Es
|
||||
bringt deterministischeres Sampling mit und aktiviert `stream` + hohen
|
||||
`read_timeout` bereits in der Config, es sind also keine Extra-Flags nötig:
|
||||
|
||||
```bash
|
||||
llamacppctl --change --profile ornith35b # Coding-Modell laden
|
||||
llamacppctl --chat --profile ornith35b \
|
||||
--system-prompt-profile coding \
|
||||
--prompt-file example_user_prompts/coding_05_rng_uniform.md
|
||||
```
|
||||
|
|
|
|||
10
example_user_prompts/coding_05_rng_uniform.md
Normal file
10
example_user_prompts/coding_05_rng_uniform.md
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
Implementiere in Python eine Funktion `random_unit_float() -> float`, die eine möglichst „perfekte" gleichverteilte Zufallszahl im halboffenen Intervall [0.0, 1.0) liefert.
|
||||
|
||||
Anforderungen:
|
||||
- Verwende eine kryptografisch starke Entropiequelle aus der Standardbibliothek (kein `random.random()`), z. B. `secrets`/`os.urandom`.
|
||||
- Nutze die volle 53-Bit-Mantisse eines `float64` und erzeuge die Zahl bias-frei (kein Modulo-Bias, keine ungleichmäßige Rundung); begründe die Wahl von genau 53 Bit.
|
||||
- Halte das Intervall sauber halboffen: 0.0 ist möglich, 1.0 darf niemals herauskommen.
|
||||
- Type Hints, ein knapper Docstring und keine unnötigen Abhängigkeiten.
|
||||
- pytest-Tests, die abdecken: Wertebereich [0.0, 1.0) über viele Ziehungen, dass 1.0 nie auftritt, und ein einfacher Verteilungs-Check (z. B. Bucket-/Mittelwert-Test) mit begründeter Toleranz.
|
||||
|
||||
Erkläre im Anschluss kurz die wichtigsten Designentscheidungen (warum 53 Bit, warum die gewählte Quelle, wie 1.0 ausgeschlossen wird).
|
||||
Loading…
Add table
Add a link
Reference in a new issue