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.0.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.0-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fun_hypothesis-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 3e8812980c0f0656ec1d9e757a9a00d0f18c27c4877382a9068667b6c1e56fbd
MD5 a921c4420ab9ccb47121037d7143e9a5
BLAKE2b-256 a5bdce11a58071cac82dcc8e292483d5eb51f9e9f85d78f888c0a8f608cdd03b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fun_hypothesis-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 36a3c673584a20421cb877e674171a2ce3c1131493c280c5a58e007fe11a4719
MD5 8a54122e5dd89224abb9ae4302ced1f3
BLAKE2b-256 851f591958f8072f95cc0b3463a9191525387fde8a19a85dafcf5746530960fb

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