feat: dynamic embedding column selection for search#1106
Closed
garrytan-agents wants to merge 1 commit into
Closed
feat: dynamic embedding column selection for search#1106garrytan-agents wants to merge 1 commit into
garrytan-agents wants to merge 1 commit into
Conversation
Tier 2 issue spec for Claude Code implementation. Adds search_embedding_column config key and column registry to route queries through any declared embedding provider (OpenAI, Voyage, ZeroEntropy, etc.) instead of hardcoding OpenAI. File: docs/issues/dynamic-embedding-column.md
Owner
|
Closing — this spec doc was the seed for the implementation now happening on Implementation absorbed the spec verbatim plus 10 codex findings (D7-D16 in the plan) my own review missed:
Plan file: Ship branch: |
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Dynamic embedding column selection — specification for Claude Code implementation.
The Issue
Search hardcodes OpenAI
embeddingcolumn. Users with multiple providers (Voyage, ZeroEntropy) have fully backfilled alternative columns with valid HNSW indexes, but cannot route search through them.Key Evidence
Three embedding columns exist with near-full coverage (374K ZE, 247K Voyage, 371K OpenAI) and valid HNSW indexes.
postgres-engine.ts:searchVector()resolves the column as a binary text/image switch, ignoring all other columns.Proposed Approach
embedding_columnsconfig registry mapping column → provider + dimensions + pgvector typesearch_embedding_columnconfig key to select default search columnSearchOpts.embeddingColumntype from union to stringembedQuery()through the matching provider (not just the global config)How to Implement
Pick up with Claude Code:
docs/issues/dynamic-embedding-column.mdfor full spec + test guidancetypes.ts,postgres-engine.ts,embedding.ts,gateway.ts,hybrid.ts,mode.ts,query-cache.tsFile:
docs/issues/dynamic-embedding-column.md