Skip to main content

A modular framework for evaluating and verifying agentic LLM outputs.

Project description

Asymptotic Agent Evaluation Framework

The Asymptotic Agent Evaluation Framework is a Python-based system designed to evaluate AI agents across a global multi-dimensional input space using a linear pipeline architecture. It strategically explores the boundaries of agent reliability to map the "Safe Polytope" of operation.

๐Ÿš€ Overview

The framework evaluates how AI agents perform as they move through different "dimensions" of complexity (e.g., urgency, ambiguity, complexity). By sampling these dimensions and generating synthetic test cases, the system maps the Safe Polytope โ€” the operational volume where an agent's performance is mathematically reliable ($P_{sat} \ge 0.95$).

Key Features

  • Adaptive Navigation: Uses Sobol sequences for uniform expansion from stable regions and binary search to pinpoint failure boundaries.
  • Chain-of-Thought (CoT) Evaluation: A reasoning-first judge LLM analyzes compliance before scoring, ensuring high-fidelity boundary detection.
  • Geometric Analysis: Calculates the hyper-volume of the agent's safe operational space using N-dimensional Convex Hulls.
  • Persistence: Automatically saves the evaluation state to JSON after each iteration for crash-resilience.
  • Linear Pipeline: Strictly typed state progression from raw coordinates to final performance metrics.
  • Local Execution: Evaluates code directly through AST parsing and local binding execution without WebSocket overhead.
  • Provider Agnostic: Uses LiteLLM to dynamically connect to any LLM provider (OpenAI, Gemini, vLLM, etc.) via simple API keys.

๐Ÿ”„ The Linear Pipeline & Iterative Mutation

The evaluation framework operates as a streaming loop that systematically explores the boundary of an agent's failure.

[!NOTE] Algorithm Update: The framework has transitioned from Zero-Shot Synthesis to the Iterative Mutation Pipeline to prevent semantic drift, reduce API overhead, and achieve perfect variable isolation.

graph LR
    A[InputSpace] -->|Origin Prompt| B[Sequential Mutation Engine]
    B -->|Mutated Prompt| C[AgentRunner]
    C -->|Executed Vector| D[AgentOutputEvaluator]
    D -->|Evaluated Vector| E[InputSpace History]
    E -->|Evaluated Vector| F[Adaptive Navigator]
    F -->|Next Coord| B

State Transitions (Core Vector Hierarchy)

The framework uses a strictly typed progression to ensure data integrity:

  1. ScenarioVector (Stage 1): Raw N-dimensional mutation coordinates (Urgency, Flooding, Bijection).
  2. SynthesizedVector (Stage 2): Origin prompt mutated by the coordinates.
  3. ExecutedVector (Stage 3): Mutated prompt run through the target agent (N runs).
  4. EvaluatedVector (Stage 4): Performance score ($P_{sat}$) evaluated against the target rubric rule.

๐Ÿ›  Technology Stack

  • Language: Python 3.11+
  • Data Modeling: pydantic
  • Math/Geometry: numpy, scipy (Sobol sequences, ConvexHull analysis)
  • Orchestration: asyncio for parallel scenario generation and execution.
  • LLM Integration: litellm for universal API connectivity.

๐Ÿ“‚ Project Structure

โ”œโ”€โ”€ engine/                      # Core Evaluation Logic
โ”‚   โ”œโ”€โ”€ domain/                  # Vector state hierarchy and Prompt features
โ”‚   โ”œโ”€โ”€ stages/                  # Pipeline stages (input_space, generator, evaluator, navigator, etc.)
โ”‚   โ”œโ”€โ”€ pipeline.py              # Central evaluation pipeline orchestrator
โ”‚   โ””โ”€โ”€ prompt_loader.py         # Utility for loading external LLM prompts
โ”œโ”€โ”€ adapters/                    # External Interfaces
โ”‚   โ”œโ”€โ”€ llms/                    # Universal LLM Client (LiteLLM Wrapper)
โ”‚   โ”œโ”€โ”€ runners/                 # Target agent execution abstractions
โ”‚   โ””โ”€โ”€ local_bindings/          # AST scanning and local function execution
โ”œโ”€โ”€ cli/                         # Interactive CLI Interface
โ”‚   โ””โ”€โ”€ app.py                   # CLI Application and real-time dashboard logic
โ”œโ”€โ”€ prompts/                     # Externalized LLM prompt templates (.txt)
โ”œโ”€โ”€ reporting/                   # Results Analysis
โ”‚   โ””โ”€โ”€ analyser.py              # Report compiler & vulnerability analyser
โ”œโ”€โ”€ results/                     # Evaluated state & reports
โ””โ”€โ”€ README.md                    # Project documentation

๐Ÿšฆ Getting Started

Prerequisites

  • Python 3.11+
  • Access to an LLM inference server or API Key (e.g., OpenAI, Gemini, or a local vLLM instance)

Setup & Installation

  1. Environment Setup:

    python3 -m venv .venv
    source .venv/bin/activate
    pip install -r requirements.txt
    
  2. Configuration: The framework has an interactive configuration step built-in. Launch the CLI to pick a target python file, select/enter rules, configure scenarios, and supply your chosen LLM model/API Key.

Running the Evaluation

Execute the interactive CLI:

PYTHONPATH=. python3 cli/app.py

The system will:

  1. Prompt you for setup configurations in a CLI Wizard.
  2. Initialize the search space and extract safety dimensions.
  3. Spawn workers to systematically stress-test the agent rules locally.
  4. Render a real-time CLI dashboard with a progress bar and events log.
  5. Save evolving states to results/ and automatically launch the final HTML results dashboard in your browser.

[!NOTE] The results/ directory is tracked by Git, but its contents (JSON states, HTML reports, logs) are ignored to keep the repository clean.

๐Ÿ“ˆ Analysis Results

The framework outputs a hyper-volume metric (Reliability Coverage) which represents the percentage of the input space where the agent meets the reliability threshold. This allows for direct mathematical comparison between different model versions or system prompts.

๐Ÿ“„ 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.4.tar.gz (64.7 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.4-py3-none-any.whl (73.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for hyperplane_eval-0.1.4.tar.gz
Algorithm Hash digest
SHA256 98d31cfca518349fa08b294b6970ef8743472adfbc531b084d1a1d09fbe9bb0e
MD5 5ac57e609ea9620e99929b3bd914e574
BLAKE2b-256 1d8afb2b6c1a08cd01e521135c11bc8155d7fefaacf38ad5645947f14abc4f97

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for hyperplane_eval-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0a29b0f3d706c205490ff9e6cc21c206a57ad435c98f7787b715e1d1f9054ba0
MD5 5b2a82fbe8463ad9b4fdf59152306198
BLAKE2b-256 149a9d345d0c92507af3b42b95477c188b730bfb2d4ef5b4784bfc9141299b85

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