fix(captain): use exact search for FAQ grouping

This commit is contained in:
aakashb95
2026-07-14 23:40:13 +05:30
parent cf1fdff04b
commit 3a36f096d2
@@ -97,7 +97,7 @@ class Captain::Llm::ConversationFaqService < Llm::BaseAiService
return [] unless relation.exists?
ApplicationRecord.transaction do
ApplicationRecord.connection.execute("SET LOCAL ivfflat.iterative_scan = 'relaxed_order'")
ApplicationRecord.connection.execute('SET LOCAL enable_indexscan = off')
relation
.nearest_neighbors(:embedding, embedding, distance: 'cosine')
.limit(MATCH_LIMIT)