symfonic.core.learning.models¶
models ¶
LearnedInsight -- a business fact extracted from conversation.
LearnedInsight
dataclass
¶
LearnedInsight(
fact: str,
confidence: float,
category: str,
tags: tuple[str, ...] = (),
tenant_id: str = "",
timestamp: datetime = (lambda: datetime.now(UTC))(),
metadata: dict[str, Any] = dict(),
scope: TenantScope | None = None,
)
A business fact extracted from conversation by the InsightExtractor.
Immutable by design — once extracted, an insight is a fixed record that can be safely passed across async boundaries without copying.
Attributes:
| Name | Type | Description |
|---|---|---|
fact |
str
|
The specific business observation (1-2 sentences). |
confidence |
float
|
Certainty score between 0.0 and 1.0. |
category |
str
|
Domain bucket (e.g. "customer_behavior", "inventory"). |
tags |
tuple[str, ...]
|
Optional keyword tuple for filtering and retrieval. |
tenant_id |
str
|
Owning tenant; empty string means unscoped. |
timestamp |
datetime
|
UTC creation time; auto-set on construction. |
metadata |
dict[str, Any]
|
Arbitrary extra data from the extraction process. |
scope |
TenantScope | None
|
T-7.21.7 -- optional full |