Package-level declarations
Types
Picks the best canonical display name from a set of candidates for a single entity. The complement of NormalizedNameCandidateSearcher.normalizeName — which normalizes names for matching — this is for normalizing what we write to the graph.
Delivers each event to several listeners in turn. Every delivery is made exception-safe (see SafeDiceEventListener), so one listener throwing doesn't stop the others from hearing about the event.
Strategy for computing a content hash from text. Used for content-based deduplication across the DICE pipeline.
The original contradiction signal, which carried no information about what was contradicted.
Event published after a conversation exchange to trigger async proposition extraction. Used by any application integrating the DICE memory pipeline.
Implement this to react to DiceEvents as they happen. Keep in mind handlers run inline on the emitting thread, so do anything slow off to the side.
Well-known metadata keys used by DICE for values cached on a proposition's metadata map.
Result of entity extraction and resolution. Provides access to entities that need to be persisted.
Statistics about entity extraction outcomes.
Resolves entities based on existing data
The minimum evidence a proposition must carry before a relation may be asserted at full strength.
An existing entity was found that matches the suggested entity. The recommended entity merges labels from both entities, preferring the more specific type (e.g., Detective over Person).
A batch of text finished extraction, carrying the stats on what came out of it.
An extraction run ended, and this is the call that ended it.
Classification of the epistemological nature of knowledge. Describes what kind of fact or relationship is being expressed.
A known entity with additional context for this extraction. Delegates to the wrapped NamedEntity.
Logs every event it receives at debug level and nothing more. A cheap way to see the event stream while developing or debugging; it never throws.
No entity existed. We simply create a new entity.
A new proposition directly contradicts one we already held. Both are handed to listeners so they can decide how to reconcile them.
A proposition's relation was demoted to a weaker one because it didn't have enough supporting evidence — kept and downgraded rather than thrown away.
A brand-new proposition was discovered — nothing like it existed before.
A higher-level proposition was formed that generalizes over a group of more specific ones.
An incoming proposition was folded into one we already had, producing a combined version.
A proposition was saved. This is the signal to rely on when you care that something actually made it to durable storage, not just that it was proposed — it fires once the write is done and carries the saved state.
A proposition was pinned, so decay sweeps will leave it alone.
A proposition was kept out of projection — it may still be saved, but it won't be pushed out to the downstream representations (graph, Prolog, memory, and so on).
A similar proposition came in and reinforced one we already trusted, strengthening it.
A proposition was turned away after extraction — it should be discarded rather than saved. Like every other event here, it carries the whole proposition (text included) to whichever listeners you've wired up.
A proposition was set aside for a human (or a later pass) to look at, rather than being saved straight away.
A proposition moved to a different lifecycle PropositionStatus — for example going stale during a decay sweep, or coming back to life when it's seen again.
A proposition was unpinned, so it's back in scope for decay sweeps.
A known entity that should be referenced but not updated. Used for entities managed by external services (e.g., the current user) that should not be modified during proposition extraction.
Defines a relationship type that can exist between entities. Used to provide the LLM with vocabulary for expressing relationships in propositions.
Resolution
Wraps another listener and stops it from taking down the caller: if the wrapped listener throws, the error is logged and swallowed instead of bubbling up.
Configuration for how strictly extraction should adhere to the schema.
Registry for named schemas (DataDictionary instances). Allows API clients to specify which schema to use for proposition extraction.
Base context for analyzing sources. Individual analyzers may extend this to require additional fields as needed.
Base event for requesting proposition extraction from any incremental source. The user is typed as NamedEntity so that any application's user type (e.g., UrbotUser, Customer) can be used directly.
Entities suggested by the LLM based on a single input. These entities may duplicate existing entities in the knowledge graph
Entity suggested following analysis of text.
We do not want to progress with this suggested entity.