feat(rag): phase35 ivfflat 向量索引 — 5814 chunks 已建立
Some checks failed
CD Pipeline / build-and-deploy (push) Has been cancelled
Some checks failed
CD Pipeline / build-and-deploy (push) Has been cancelled
已在 prod 執行: idx_rag_chunks_embedding (lists=100, cosine) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
14
apps/api/migrations/phase35_rag_ivfflat_index.sql
Normal file
14
apps/api/migrations/phase35_rag_ivfflat_index.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
-- Phase 35: RAG ivfflat 向量索引
|
||||
-- 前提: rag_chunks 已有 2582+ chunks
|
||||
-- 執行: psql awoooi_prod
|
||||
-- 2026-04-10 Claude Sonnet 4.6 Asia/Taipei
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_rag_chunks_embedding
|
||||
ON rag_chunks
|
||||
USING ivfflat (embedding vector_cosine_ops)
|
||||
WITH (lists = 100);
|
||||
|
||||
-- 驗證
|
||||
SELECT indexname, indexdef
|
||||
FROM pg_indexes
|
||||
WHERE tablename = 'rag_chunks' AND indexname = 'idx_rag_chunks_embedding';
|
||||
Reference in New Issue
Block a user