This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# --- | |
# title: "Plots Demo" | |
# author: "Norah Jones" | |
# date: "5/22/2021" | |
# format: | |
# html: | |
# toc: true | |
# toc-depth: 2 | |
# code-fold: true | |
# self-contained: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
joker_bayesian.py – List-wise evolutionary prompt tuner for joke generation | |
Usage: python joker_bayesian.py prompts/seed.txt [GENERATIONS] [POPULATION] | |
* **Judge** 3x Listwise LLM-as-a-judge evaluates jokes on 8 ternary rubrics (goal, originality, | |
length, surprise, timing, relatability, clarity, memorability). | |
* **Fitness** Thompson-sampled Beta(α, β) updated with tournament rankings | |
(wins = K-1-rank, losses = rank) across multiple judge runs. |