Skip to main content

Behavioral testing framework for LLMs — test properties, not benchmarks.

Project description

🔬 probe

Behavioral testing framework for LLMs — test properties, not benchmarks.


Benchmarks tell you a model scores 85% on MMLU. probe tells you whether the model actually behaves consistently on your tasks.

pip install -e ".[openai]"

Quick Start

Python

from probe import quick_test, print_summary

results = quick_test(
    model="openai:gpt-4o-mini",
    inputs=[
        "What is the capital of France?",
        "Is 17 a prime number?",
        "Explain photosynthesis in 2 sentences.",
    ],
    properties=["consistency", "robustness"],
)

print_summary(results)

CLI

probe run --model openai:gpt-4o-mini --input "What is the capital of France?" -p consistency
probe run --model openai:gpt-4o-mini --inputs test_cases.txt -p consistency,invariance,robustness
probe compare --model-a openai:gpt-4o --model-b ollama:llama3 --inputs test_cases.txt
probe list-properties

Behavioral Properties

Property What It Tests
consistency Rephrase question N ways → same answer?
invariance Change irrelevant details → answer holds?
negation Negate the question → answer flips?
robustness Add typos → model still works?

Providers

openai:gpt-4o-mini        # OpenAI
anthropic:claude-sonnet-4-20250514  # Anthropic
ollama:llama3              # Local via Ollama

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

probe_llm-0.1.0.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

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

probe_llm-0.1.0-py3-none-any.whl (18.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: probe_llm-0.1.0.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for probe_llm-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3d7330a02e9827d116a4730971cc011a3658d00816da1af4a069be575f9e4a2e
MD5 5529cf8d216ea352b8fa4a3177599127
BLAKE2b-256 cc32b30871a24709f24287bcc4d8518f20a3f74cee9bd85f262b36994b5f4601

See more details on using hashes here.

File details

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

File metadata

  • Download URL: probe_llm-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for probe_llm-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3d6599b6d14af8b704312f32e29ef4f28317fed042d23efee622bb646fba627b
MD5 ec04a56505bcc6941ac41b4cd1d00376
BLAKE2b-256 fb71feae4a835e4af7830222c3b84c4aedbcb8579c082550b7ddc3abfaa264e5

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