Proposition

data class Proposition(val id: String = UUID.randomUUID().toString(), val contextId: <Error class: unknown class>, val text: String, val mentions: List<EntityMention>, val confidence: <Error class: unknown class>, val decay: <Error class: unknown class> = 0.0, val importance: <Error class: unknown class> = 0.5, val reasoning: String? = null, val grounding: List<String> = emptyList(), val created: Instant = Instant.now(), val contentRevised: Instant = Instant.now(), val metadataRevised: Instant = Instant.now(), val pinned: Boolean = false, val lastAccessed: Instant = contentRevised, val status: PropositionStatus = PropositionStatus.ACTIVE, val level: Int = 0, val sourceIds: List<String> = emptyList(), val reinforceCount: Int = 0, val metadata: Map<String, Any> = emptyMap(), val uri: String? = null, val temporal: TemporalMetadata? = null, val provenanceEntries: List<ProvenanceEntry> = emptyList()) : Derivation, ReferencesEntities

A proposition is a natural language statement with typed entity mentions. Propositions are the system of record - all other representations (Neo4j relationships, Prolog facts, vector embeddings) derive from them.

Design: One Proposition = One Relationship

Each proposition should express a single fact with at most two entity mentions (SUBJECT and OBJECT). This maps cleanly to graph relationships during promotion. Complex sentences with multiple relationships should be extracted as multiple propositions during the extraction stage.

Constructors

Link copied to clipboard
constructor(id: String = UUID.randomUUID().toString(), contextId: <Error class: unknown class>, text: String, mentions: List<EntityMention>, confidence: <Error class: unknown class>, decay: <Error class: unknown class> = 0.0, importance: <Error class: unknown class> = 0.5, reasoning: String? = null, grounding: List<String> = emptyList(), created: Instant = Instant.now(), contentRevised: Instant = Instant.now(), metadataRevised: Instant = Instant.now(), pinned: Boolean = false, lastAccessed: Instant = contentRevised, status: PropositionStatus = PropositionStatus.ACTIVE, level: Int = 0, sourceIds: List<String> = emptyList(), reinforceCount: Int = 0, metadata: Map<String, Any> = emptyMap(), uri: String? = null, temporal: TemporalMetadata? = null, provenanceEntries: List<ProvenanceEntry> = emptyList())

Types

Link copied to clipboard
object Companion

Properties

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

LLM-generated certainty (0.0-1.0)

Link copied to clipboard

When the proposition's content last changed (text, mentions, confidence). This is the decay anchor: effectiveConfidence measures age from here.

Link copied to clipboard
val contextId: <Error class: unknown class>

The context in which this proposition is relevant

Link copied to clipboard

Java-friendly accessor for contextId value.

Link copied to clipboard

When the proposition was first created

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

Staleness rate (0.0-1.0). High decay = information becomes stale quickly

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

Chunk IDs that support this proposition

Link copied to clipboard
open val id: String

Unique identifier for this proposition

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

How much this fact matters (0.0-1.0). Orthogonal to confidence.

Link copied to clipboard
Link copied to clipboard

The most recent update of any kind — the later of contentRevised and metadataRevised. Use for "last touched / recently updated" ordering, where an administrative touch (status change, pin, re-grounding) should still count as activity. Distinct from contentRevised, the decay anchor, which deliberately ignores administrative touches. Body-level getter: excluded from copy()/equals/hashCode.

Link copied to clipboard
val level: Int = 0

Abstraction level: 0 = raw observation, 1+ = derived abstraction

Link copied to clipboard
open override val mentions: List<EntityMention>

Entity references within the text (typically 1-2, with SUBJECT/OBJECT roles)

Link copied to clipboard
open val metadata: Map<String, Any>
Link copied to clipboard

When the proposition's administrative metadata last changed (status, grounding, temporal, pinned). Does NOT reset the decay clock.

Link copied to clipboard
val pinned: Boolean = false

When true, the proposition is exempt from decay-driven sweeps (a sweep-protected tier). Defaults to false.

Link copied to clipboard

Rich grounding entries linking this proposition to source material via com.embabel.dice.provenance.SourceLocator. Complements the legacy chunk-id-only grounding list.

Link copied to clipboard
val reasoning: String? = null

LLM explanation for why this was extracted

Link copied to clipboard

How many times this proposition has been merged or reinforced. Provides a frequency/importance signal complementary to confidence and decay.

Link copied to clipboard

Legacy alias for the last-updated timestamp. Retained for backward compatibility (existing readers and JSON serialization) as a read-only computed property equal to contentRevised. Because it is a body-level getter, it is excluded from copy()/equals/hashCode.

Link copied to clipboard

IDs of propositions this was abstracted from (empty for level 0)

Link copied to clipboard

Current lifecycle status

Link copied to clipboard

Optional bitemporal metadata (observed/valid time, supersession, contradiction). Null when temporal correctness is not tracked for this proposition.

Link copied to clipboard

The statement in natural language (e.g., "Jim is an expert in GOAP")

Link copied to clipboard
open val uri: String? = null

Functions

Link copied to clipboard

Fold another proposition's evidence onto this one: grounding, provenance entries, and source ids, all appended and deduplicated. Bumps reinforceCount by one — treating the absorbed proposition as a single fresh confirmation, not + other.reinforceCount (which would double-count whatever it had already been reinforced by).

Link copied to clipboard

Calculate the effective confidence after applying time-based decay. Uses exponential decay formula from GUM paper: γ = exp(-decay * k * age_days)

Link copied to clipboard

Calculate the effective confidence as of a specific point in time. Useful for historical analysis where you want to know what the confidence was at a past date, not relative to now.

Link copied to clipboard
Link copied to clipboard
open fun infoString(verbose: Boolean?, indent: Int): String
Link copied to clipboard

Whether all entity mentions have been resolved to known entities.

Link copied to clipboard
open fun objectId(): String?

Get the resolved object entity ID (if resolved).

Link copied to clipboard

Find the object mention (if any).

Link copied to clipboard

Get all resolved entity IDs from mentions.

Link copied to clipboard
open fun subjectId(): String?

Get the resolved subject entity ID (if resolved).

Link copied to clipboard

Find the subject mention (if any).

Link copied to clipboard
fun withConfidence(newConfidence: Double): Proposition

Create a copy with adjusted confidence.

Link copied to clipboard

Create a copy with decay applied to confidence. Useful for retrieval ranking where older propositions should be weighted less.

Link copied to clipboard

Create a copy with additional grounding.

Link copied to clipboard

Create a copy with an additional (or replaced) metadata entry.

Link copied to clipboard
fun withoutFoldedEvidence(groundingToRemove: List<String>, provenanceRefsToRemove: List<String>, sourceIdsToRemove: List<String>): Proposition

Create a copy with exactly groundingToRemove, provenanceRefsToRemove and sourceIdsToRemove taken out of this proposition's evidence — the inverse of absorbEvidence for one loser's contribution. Provenance refs use the shared evidence-key contract so current refs identify one full entry while legacy locator refs match only revisionless evidence.

Link copied to clipboard

Create a copy with the pin flag set. Administrative change: touches only metadataRevised and preserves the decay clock (contentRevised).

Link copied to clipboard

Create a copy whose provenance is exactly entries, replacing any existing entries.

Link copied to clipboard

Create a copy with additional rich grounding entries (appended, deduplicated).

Link copied to clipboard

Create a copy with updated mentions.

Link copied to clipboard

Create a copy with updated status. Administrative change: touches only metadataRevised and preserves the decay clock (contentRevised).

Link copied to clipboard

Create a copy with the given temporal metadata.

Link copied to clipboard
fun withText(newText: String): Proposition

Create a copy with updated text. Resets the decay clock (content anchor).