Commit Graph

5 Commits

Author SHA1 Message Date
Christian Gick
ef74d7912e feat: Add cross-encoder re-ranking after hybrid search (CF-1317)
Add rerank() function calling LiteLLM /v1/rerank endpoint (Cohere-compatible).
Plugged into all 3 search functions (sessions, session-docs, archives) after
RRF merge. Disabled by default via RERANK_ENABLED env var. Graceful fallback
to RRF-only ranking on API failure.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 16:36:24 +02:00
Christian Gick
4f8996cd82 feat(CF-1315): Hybrid search with tsvector + RRF
Add PostgreSQL full-text search alongside pgvector for exact matches
on Jira keys, error messages, file paths. Merge results with
Reciprocal Rank Fusion. Default mode: hybrid, with graceful
degradation to keyword-only when embeddings unavailable.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 08:46:39 +02:00
Christian Gick
1f499bd926 feat(CF-1314): Content hashing to prevent duplicate embeddings
SHA-256 hash check before embedding API call eliminates ~60-80% of
redundant embedding requests. Consolidates dual INSERT paths to single
INSERT with nullable embedding column.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 08:28:11 +02:00
Christian Gick
6c497ec6c5 Fix CF-271: Add fallback text search to archive_search
When LiteLLM embedding service is unavailable, archive_search now gracefully falls back to PostgreSQL text search (ILIKE) instead of returning an error. Also adds dotenv support for proper credential loading.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-19 13:14:29 +02:00
Christian Gick
1231835e02 Add project_archives table and MCP tools (CF-264)
- Created migration 009: project_archives table with semantic search
- Implemented archives.ts: archiveAdd, archiveSearch, archiveList, archiveGet
- Registered archive tools in index.ts and tools/index.ts
- Archive types: session, research, audit, investigation, completed, migration
- Uses project_key (TEXT) FK to projects table
- Tested: archive_add and archive_list working correctly

Replaces filesystem archives with database-backed storage.
Eliminates context pollution from Glob/Grep operations.

Task: CF-264
Session: session_20260119111342_66de546b

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-19 11:38:48 +02:00