Skip to main content

Test whether different prompt framings affect LLM output quality

Project description

Fun Hypothesis

CI PyPI version Python 3.10+ License: MIT

Test whether different prompt framings affect LLM output quality.

Hypothesis

LLM output quality varies based on how prompts are framed. This tool tests that hypothesis with rigorous double-blind methodology.

Quick Start

pip install fun-hypothesis

# Run with default "fun" framing
fun-hypothesis --prompt "Explain quantum computing"

# Try different framings
fun-hypothesis --prompt "Explain quantum computing" --framing pirate
fun-hypothesis --prompt "Explain quantum computing" --framing expert
fun-hypothesis --prompt "Explain quantum computing" --framing eli5

Built-in Framings

Framing Description
fun Make it engaging and playful
pirate Like a pirate
expert As a senior expert
eli5 Explain like I'm 5
formal Very formal and professional
socratic As questions to explore

Methodology

  1. Session A: Send raw prompt to LLM, collect response
  2. Session B: Have LLM transform prompt with framing
  3. Session C: Send framed prompt to LLM, collect response
  4. Session D: Judge panel evaluates Response A (blind)
  5. Session E: Judge panel evaluates Response C (blind)
  6. Compare scores, iterate, aggregate, analyze

All sessions are independent (no context leakage). Judging is double-blind.

Requirements

  • Python 3.10+
  • Anthropic API key (ANTHROPIC_API_KEY environment variable)

Documentation

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fun_hypothesis-0.1.1.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fun_hypothesis-0.1.1-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

Details for the file fun_hypothesis-0.1.1.tar.gz.

File metadata

  • Download URL: fun_hypothesis-0.1.1.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for fun_hypothesis-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a436bbf35df583c620511e45ecc581004a20efb624e8dbc74b55161d169b082b
MD5 0e6f41777c87c97bb179a4d3ee8c8fb3
BLAKE2b-256 ac04679ae7c167fa3bf6ee4725a53903d40a08cbc68200fcc007cd0be5e2fab0

See more details on using hashes here.

File details

Details for the file fun_hypothesis-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: fun_hypothesis-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for fun_hypothesis-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4d973007c3b6d652e278f2e8211a8f74a0c3070be7b38ed3fdcc1458c028a2a2
MD5 b60ad6cbaef76ed43c8dee1f8c216aec
BLAKE2b-256 30ab73b9070ec106ce4b62c9df35a23c78ad8361bbb4f61462798f26ee0e5fdb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page