node alignment console · 04 // deployed systems v0.2.0

LANA

Logical Attribute Node Aligner

A Python library that compares two records head-to-head — or ranks a whole lineup into a leaderboard — weighing every attribute by what you decide matters.

// transmission · changelog

What's new in 0.2.0

lana grew up: it no longer compares only two things at a time.

  • lana.rank() new — rank any number of records into a leaderboard, scored by your priorities. Try it live below.
  • lana.compare() is unchanged and fully backward compatible — nothing you built on 0.1.0 breaks.
  • Every exporter (show, to_json, to_csv, to_markdown, to_df, save) now works on rankings too.
  • Upgrade with pip install -U ablevlabs.

// what it is

Point it at things. Get a verdict.

Give lana records that share the same attributes — candidates, laptops, model runs, cars, fighters — and it weighs them field by field. Compare two for a head-to-head verdict, or rank many into a leaderboard.

It's a matchup engine, not a diff tool — it relates different things and scores them, which is a question diffs never answer. And because it only sees “records with fields,” it works in any domain.

hiring & candidates product specs ML model runs vehicles tier lists

// head-to-head — compare() · drag the sliders, watch the beam tip

// node a
VS
node b //
50.0%50.0%
// what matters1–5 each
// scorecard

// rank a lineup — rank() · NEW · drag sliders, watch the board reshuffle

// what matters
// leaderboardlive

Same engine, scaled to any number of items. On each field the best item earns the full priority, the worst earns zero, evenly spaced — so consistency pays off, not just spikes.

// how it works

Three inputs, one clean answer.

01

Same fields

Give lana records that share attribute names, so there's something to line up.

02

Rate what matters

Score the fields you care about 1 to 5. A 5 counts five times as much as a 1.

03

Flag the inverses

List fields where a smaller number wins — price, latency, weight.

You get a clean dict back. compare() returns a head-to-head verdict; rank() returns an ordered leaderboard. For exactly two items, they agree.

// cheat sheet

Everything you need to use it.

install / upgrade & import

# install or upgrade to the latest
$ pip install -U ablevlabs

from ablevlabs import lana

compare two — head-to-head

zoro  = {"name": "Zoro",  "power": 92, "speed": 80}
sanji = {"name": "Sanji", "power": 88, "speed": 95}

result = lana.compare(zoro, sanji, priority={"power": 5, "speed": 3})
lana.show(result)

rank many — leaderboard (new)

roster = [
    {"name": "Goku",   "power": 9100,  "attack": 88},
    {"name": "Vegeta", "power": 9000,  "attack": 90},
    {"name": "Frieza", "power": 10500, "attack": 86},
]

board = lana.rank(roster, priority={"power": 5, "attack": 4})
lana.show(board)

rank() — options

ArgumentWhat it does
itemsA list of records, or a {name: record} dict. Required (2+).
priority{field: 1–5} — how much each field matters. Omit it and every numeric field counts equally.
lower_betterList of fields where a smaller number wins.
aliases{variant: canonical} to reconcile differing field names.

works on both compare() and rank() results

lana.show(r)Scorecard or leaderboard, in the terminal.
lana.to_json(r)JSON string.
lana.to_csv(r)CSV — Excel / Sheets.
lana.to_markdown(r)Markdown table for docs / GitHub.
lana.to_df(r)pandas DataFrame.
lana.save(r, "x.csv")To disk — format from the extension.