LLM Context Benchmark Types (elizaos_context_bench/types.py)

eliza · packages/benchmarks/suites/context-bench/elizaos_context_bench/types.py · python · MIT
ai, testing, lang:python

Defines data structures for evaluating LLM retrieval and reasoning performance. Use this to standardize metrics for needle-in-a-haystack and long-context testing.

# Source: https://github.com/elizaOS/eliza | License: MIT | Copyright 2026 Shaw Walters and elizaOS Contributors
# Provided via justclaw.it.com; keep this notice with the code.
"""Core types for Context Benchmark.

Defines data structures for evaluating LLM context retrieval and reasoning
capabilities, including Needle-in-a-Haystack (NIAH) and multi-hop benchmarks.
"""

from dataclasses import dataclass, field
from enum import Enum


class ContextBenchType(str, Enum):
    """Types of context benchmarks."""

    NIAH_BASIC = "niah_basic"  # Basic needle retrieval
    NIAH_SEQUENTIAL = "niah_sequential"  # Sequential info extraction
    NIAH_SEMANTIC = "niah_semantic"  # No lexical overlap
    MULTI_HOP = "multi_hop"  # Multi-hop reasoning
    LONG_DOC_QA = "long_doc_qa"  # Long document Q&A

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key