Skip to content
Llamar.ai
Menu
All articles

Identity comes before embeddings

Why a semantic system first needs a deterministic answer to “which page is this?”

Similarity is not identity

Embeddings are excellent at finding material that appears semantically close. They are not a stable primary key. Two URLs can contain the same article, and one URL can serve materially different content over time.

Llamar therefore derives a page identifier from a versioned canonical URL and a separate content hash from a bounded capture. The server recomputes both. A mismatch is a contract failure, not something to smooth over with a nearest-neighbour guess.

The practical payoff

Deterministic identity makes idempotent ingest possible. A lost response can be retried without buying a second summary, aliases can be recorded without rewriting history, and private deletion can target the correct contribution.

Equivalence still matters, but it belongs in a reversible evidence layer above identity. Body hashes, shingles, and embeddings can suggest that two independently identified pages are duplicates without collapsing them irreversibly.

A contract both sides must prove

The browser and backend implement the algorithm independently and run the same byte-level fixtures. That is deliberate duplication across a trust boundary: shared examples detect drift while preventing either runtime from silently becoming authoritative through an imported implementation.