Skip to main content

Importable SDK for evaluating knowledge-graph builders for intent and behavior drift.

Project description

Aether KG Eval

Importable Python SDK for evaluating knowledge-graph builders against benchmark KG datasets.

The core customer flow is:

kg dataset -> kg builder -> built KG / build trace -> kg eval result

Install

python -m pip install aether-observer

For local development from this repository:

python -m pip install -e ".[dev]"

Python API

from aether_kg_eval import dataset_from_triples, evaluate_kg_builder

dataset = dataset_from_triples(
    [
        ("entity:1", "relation:works_at", "entity:2"),
        ("entity:3", "relation:reports_to", "entity:1"),
    ],
    name="customer-kg-smoke",
)

def builder(dataset):
    return dataset.triples

result = evaluate_kg_builder(dataset, builder)

print(result.overall_score)
print(result.intent_drift.status)
print(result.behavior_drift.status)
print(result.kg_quality.to_dict())

The v1 result reports:

  • intent_drift: whether the builder preserved the intended KG construction task.
  • behavior_drift: whether builder behavior or KG shape moved away from baseline.
  • orchestration_drift: reserved as not_applicable for single-builder pipelines.
  • kg_quality: triple, entity, relation, duplicate, invalid, and contradiction metrics.

Builder Contract

evaluate_kg_builder(dataset, builder) accepts builders that return one of:

  • BuiltKG
  • dict with triples and optional trace
  • list[KGTriple]
  • list[tuple[subject, relation, object]]

Trace entries can be supplied as existing EpisodeRecord objects or dicts matching the legacy JSONL episode shape. When trace is absent, KG quality is still scored and behavior drift falls back to KG quality.

Legacy Episode Format

Each JSONL record is an episode:

{"id":"e1","timestamp":"2026-05-15T00:00:00Z","content":"Alice joined Acme.","content_type":"text","source":"seed","agent_id":"agent-a","task_id":"build-kg","entity_types":["Person","Org"],"relation_types":["JOINS"],"tool_calls":["extract"],"expected_intent":"add employment fact","outcome":"success"}

Important optional fields:

  • entity_types, relation_types, graph_nodes, graph_edges, embedding, contradictions, invalidations
  • tool_calls, handoff, coordination_failure, boundary_violation, human_intervention
  • expected_intent, observed_intent, reasoning_trace, outcome

The legacy kg_drift_builder modules remain available internally for rolling-window scoring and Graphiti/Kuzu experiments, but the sellable SDK surface is aether_kg_eval.

Optional Graphiti/Kuzu

The old Graphiti/Kuzu ingestion adapter is still present as an optional integration layer. It is not required to evaluate normal Python KG outputs.

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

aether_observer-0.1.4.tar.gz (20.6 kB view details)

Uploaded Source

Built Distribution

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

aether_observer-0.1.4-py3-none-any.whl (21.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for aether_observer-0.1.4.tar.gz
Algorithm Hash digest
SHA256 c253d6a85b5e746323b8e3ce8aa82ee4c71ab1bfa086e8131d70c41e22c7c67a
MD5 dd88d9965dfcd21caab55a504e810bcd
BLAKE2b-256 7588d986f9bdc8b90b3765173a028445a9e51787a2b8a98e60dcf7389b3b94e8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aether_observer-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 21.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aether_observer-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c0c49b72886882c761e3cc5f3eab1554ed84fcc3914afaa610188ae44e36ed1c
MD5 2087d16af56ae2c936894a0e53685bf9
BLAKE2b-256 bd3337c65c7d1a0190aa8c444dfc89eeb5e6164ec5b13425dcce47f332843e8c

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