SemanticLink

data class SemanticLink constructor(val sourceEntityId: String, val targetEntityId: String, val connectingEntityIds: List<String>, val kind: LinkKind = LinkKind.INFERRED, val sourcePropositionIds: List<String>, val reviewStatus: ReviewStatus = ReviewStatus.CANDIDATE, val confidence: <Error class: unknown class> = 0.5, val rationale: String? = null) : Projection

A reviewable indirect link between two entities, discovered structurally from the propositions that ground it.

A SemanticLink is a Projection: it derives from one or more propositions and traces back to them via sourcePropositionIds. It models the existence of a connection and the path that produced it — it deliberately carries no surprise score, rubric, or ranking signal. Ranking and surprise scoring are a separate, later concern; confidence here is plain evidence confidence only.

Constructors

Link copied to clipboard
constructor(sourceEntityId: String, targetEntityId: String, connectingEntityIds: List<String>, kind: LinkKind = LinkKind.INFERRED, sourcePropositionIds: List<String>, reviewStatus: ReviewStatus = ReviewStatus.CANDIDATE, confidence: <Error class: unknown class> = 0.5, rationale: String? = null)

Properties

Link copied to clipboard
open override val confidence: <Error class: unknown class> = 0.5

Plain evidence confidence (0.0-1.0). NOT a surprise or ranking score — it reflects only how well the supporting propositions ground the link.

Link copied to clipboard

The intermediary entities forming the path from A to B (e.g. [X] for the two-hop path A->X, X->B). Empty for a direct/EXPLICIT link.

Link copied to clipboard
open override val decay: <Error class: unknown class> = 0.0

Decay rate for this derivation (0.0 to 1.0).

Link copied to clipboard
open override val grounding: List<String>

Grounding traces back to the source propositions by default.

Link copied to clipboard
open val importance: <Error class: unknown class>

Importance of this derivation (0.0 to 1.0).

Link copied to clipboard

How the link was established (see LinkKind).

Link copied to clipboard
val rationale: String? = null

Optional human-readable prose explaining the link, filled in later by a rationale projector. Null until generated.

Link copied to clipboard

Where this link sits in the human-review lifecycle.

Link copied to clipboard

The first endpoint of the link (A).

Link copied to clipboard
open override val sourcePropositionIds: List<String>

The ids of the propositions that evidence this link. This is the Projection grounding.

Link copied to clipboard

The second endpoint of the link (B).

Functions

Link copied to clipboard
fun withConfidence(c: <Error class: unknown class>): SemanticLink

Return a copy with the given evidence confidence.

Link copied to clipboard

Return a copy with the given human-readable rationale.

Link copied to clipboard

Return a copy with the given review status.