Extract structured metadata (topics, decisions, blockers, tools_used, projects, issue_keys) from session summaries using Haiku at session end. Metadata stored in JSONB column with GIN index for filtered retrieval. session_semantic_search now accepts optional metadata filters. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
8 lines
441 B
SQL
8 lines
441 B
SQL
-- CF-1316: Add LLM-extracted metadata JSONB column for filtered retrieval
|
|
-- Schema: { topics: string[], decisions: string[], blockers: string[], tools_used: string[], projects: string[], issue_keys: string[] }
|
|
|
|
ALTER TABLE sessions ADD COLUMN IF NOT EXISTS extracted_metadata JSONB;
|
|
|
|
-- GIN index for fast JSONB containment queries (@>)
|
|
CREATE INDEX IF NOT EXISTS idx_sessions_extracted_metadata ON sessions USING GIN(extracted_metadata);
|