kroma

API

Overview

KROMA matches concepts across two ontologies. These pages are the Python API: what you call, and what it returns.

A run loads an alignment, retrieves local context for each concept, asks a language model whether the pair matches, and refines the joined graph. The command line is the usual entry. The same steps are available as functions.

The pieces

One run

  1. kroma run parses flags and calls MatchingRun.execute.
  2. prepare reads the method JSONL and the dataset JSON, then builds vector stores.
  3. score_pairs retrieves context, calls infer, and records the prediction.
  4. finish runs offline_refine and writes a metrics JSON file.

Install

git clone https://github.com/lamng3/kroma.git
cd kroma
./setup.sh
source .venv/bin/activate
uv pip install ".[models]"

Copy .env.example to .env and set TOGETHERAI_API_KEY or OPENAI_API_KEY. The paper is ISWC 2025.