Skip to main content

Local tool to evaluate AI agents and find their weak points.

Project description

Hyperplane Eval

Hyperplane Eval helps teams discover behavioral failures before deployment.

It works as a CLI and programmatic tool for evaluating AI agents against business, security, and ethical requirements using intelligent test generation rather than manually written test cases.

Why Hyperplane?

Most AI teams evaluate agents with a few dozen manually written prompts.

The problem is that manually written tests only cover a tiny fraction of the agent's behavioral space.

Hyperplane automatically explores that space, generating thousands of semantically diverse inputs to uncover failures before users do.

Features

  • Generate thousands of semantically diverse test cases
  • Evaluate business, security, and ethical requirements of your agent
  • Automatically find edge cases and breaking points
  • Local-first CLI workflow
  • Framework-agnostic agent integration
  • Detailed evaluation reports. See example here

CLI Integration

Hyperplane operates entirely locally through a terminal-based orchestration wizard.

Setup & Installation

Install the framework via pip:

pip install hyperplane-eval

Running the CLI

Run the interactive CLI directly in your terminal from inside your project directory:

hyperplane

The CLI wizard will guide you through:

  1. Target Binding: Automatically finding your agent's code.
  2. Constraint Definition: Setting natural language rules for your agent.
  3. Configuration: Setting the scale and depth of the evaluation.
  4. Execution: Running the evaluation with a live dashboard.

Hyperplane outputs a structured dataset and an HTML report identifying the specific types and characteristics of inputs that cause the agent to fail, helping you quickly isolate prompt engineering or logic regressions.

Hyperplane Evaluation Dashboard

Programmatic Integration

You can also integrate Hyperplane Eval directly into your Python codebase or CI/CD testing suites using the Evaluator API:

from hyperplane import Evaluator
from litellm import Router

# 1. Initialize your litellm Router
router = Router(
    model_list=[{
        "model_name": "gpt-4o", 
        "litellm_params": {"model": "gpt-4o"}
    }]
)

# 2. Define your target agent
def my_agent(prompt: str) -> str:
    return "I am a safe agent."

# 3. Initialize the Evaluator
evaluator = Evaluator(
    agent_desc="A helpful AI assistant",
    param_desc={"prompt": "The user input prompt"},
    target_callable=my_agent,
    llm_client=router,
    model_name="gpt-4o"
)

# 4. Add constraints and run
evaluator.run(rules=["Never execute tool calls with unsafe parameters.", "Always respond in English."])

Architecture & Methodology

Evaluating agentic systems presents a curse-of-dimensionality problem due to the infinite input space. Hyperplane mitigates this via a dimensional reduction and bounded sampling approach:

  1. Orthogonal Dimension Extraction: The target heuristic or constraint (e.g., a business logic rule) is passed to an LLM, which extracts a set of orthogonal, continuous axes representing the variance in potential inputs (e.g., user_frustration [0,1], budget_constraint [0,1]).
  2. Quasi-Random Initialization: The framework maps a bounded multi-dimensional continuous input space $S \in [0, 1]^D$. It utilizes Sobol sequences to generate a low-discrepancy initialization grid to ensure uniform volumetric coverage without clustering.
  3. Synthetic Input Generation: Bounded coordinate vectors are mapped back into natural language. A Generator LLM synthesizes adversarial or conversational inputs as structured payloads that strictly adhere to the defined vector coordinates.
  4. Response Classification The target agent executes the synthesized inputs. An Evaluator LLM utilizes Chain-of-Thought (CoT) reasoning to classify the agent's response as a pass (1) or fail (0) against the constraint.
  5. Surrogate Modeling & Active Search: The framework fits a Random Forest surrogate classifier over the evaluated points to approximate the failure boundary. It utilizes an active search algorithm to sample points near the decision boundary until volumetric saturation is reached, stopping early via dimension-scaled mismatch rate thresholds.

The resulting artifact is a detailed report allowing engineers to identify the specific input themes and characteristics that reliably induce constraint violations.

Privacy & Security (BYOK)

Hyperplane Eval is designed for enterprise privacy using a Bring Your Own Key (BYOK) architecture:

  • 100% Local Execution: The orchestrator and test synthesis engine run entirely on your local machine or CI/CD runner.
  • No Telemetry or Data Logging: We do not collect product telemetry, execution logs, or source code.
  • Direct Vendor Routing: Your API keys are routed strictly to the LLM provider you configure (via litellm) and are never intercepted or proxied.
  • Budget Safe: Built-in safeguards and configurable depth/breadth parameters ensure the evaluation pipeline generates high coverage without blowing up your token bill.
  • Open Source Auditing: The entire orchestration pipeline is open-source, allowing your security team to fully audit the codebase.

🛠 Technology Stack

  • Language: Python 3.10+
  • Data Modeling: pydantic
  • Math/Geometry: numpy, scipy (Sobol sequences, ConvexHull analysis)
  • LLM Integration: litellm for universal API connectivity (OpenAI, Gemini, Anthropic, or any local vLLM).

📄 License

This project is licensed under the Apache License, Version 2.0. See the LICENSE file for more information.

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

hyperplane_eval-0.1.13.tar.gz (70.6 kB view details)

Uploaded Source

Built Distribution

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

hyperplane_eval-0.1.13-py3-none-any.whl (83.7 kB view details)

Uploaded Python 3

File details

Details for the file hyperplane_eval-0.1.13.tar.gz.

File metadata

  • Download URL: hyperplane_eval-0.1.13.tar.gz
  • Upload date:
  • Size: 70.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for hyperplane_eval-0.1.13.tar.gz
Algorithm Hash digest
SHA256 893fce78fd6ed3fa270053e7f249687cf9d51939d7f5c384a5d8c1744b7c6295
MD5 40e958c5a1ab04aca90e9a7f6a996257
BLAKE2b-256 59e5533f50fd296efcd6778ae4773bf741fc63d9bdf5db2af5b2f01e3f3e88a1

See more details on using hashes here.

Provenance

The following attestation bundles were made for hyperplane_eval-0.1.13.tar.gz:

Publisher: publish.yml on Aquithm/hyperplane

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hyperplane_eval-0.1.13-py3-none-any.whl.

File metadata

File hashes

Hashes for hyperplane_eval-0.1.13-py3-none-any.whl
Algorithm Hash digest
SHA256 ac1e42d1ac860afcbcdace48db50e171dff45af00f128273cc1a645047a32947
MD5 b3a1d994fc02a1063df62e528f4e0217
BLAKE2b-256 f8dbcffb362e65c377efff264c10dcdc170c8efabd2a45108777f2a647cf312e

See more details on using hashes here.

Provenance

The following attestation bundles were made for hyperplane_eval-0.1.13-py3-none-any.whl:

Publisher: publish.yml on Aquithm/hyperplane

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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