You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add an insights table that stores synthesized knowledge discovered when multiple references are brought together — distinct from both raw summaries and explicit user preferences/decisions.
Key characteristics
No session_id — insights are corpus-wide, not scoped to a conversation
Derived, not captured — an insight is produced by reasoning across multiple sources (documents, summaries, older turn patterns), not by directly summarizing one turn
Different from decisions/preferences — a decision is "always do Y"; an insight is "these three things relate in an unexpected way" or "this pattern appears across multiple sessions"
Primary sources: document lookups (manuals, references), cross-session pattern recognition, recurring themes in work
Proposed schema
CREATETABLEinsights (
insight_id INTEGERPRIMARY KEY,
textTEXTNOT NULL,
embedding BLOB,
tags TEXTNOT NULL DEFAULT '',
source_refs TEXT, -- JSON array of (table, id) pairs that produced it
model_id INTEGER, -- model that synthesized ittimestampTEXTNOT NULL
);
source_refs links back to the documents/summaries that were combined — provenance for later review or re-synthesis.
Generation triggers (TBD)
Explicit agent call (agent notices a connection and stores it)
Post-document-import pass (new doc may relate to existing summaries)
Periodic synthesis pass over recent turn summaries across sessions
Recipe integration
insights becomes a recipe layer kind, surfaced in general_search results and as its own optional layer. Since insights have no session scope, they're always candidates for the session-agnostic sweep.
general_search queries summaries + documents. Once this table exists, it should also query insights. The distinction: summaries are compressed history; insights are synthesized understanding.
Activity