Repository navigation
Conversation
…rsations in a block of their own Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Task
search conversationsmisses what the owner said. "What did I advise about X" is answered by one of the owner'smessages in a busy group, and a group with tens of thousands of chunks ranks it far below the top 20.
Why
On a test store (about 220,000 conversation chunks, OpenAI
text-embedding-3-small, 768 dims) and 40 questions witha known answer, the answer was in the top 20 for 24 of them. Searching the owner's own chunks on their own
(3,900 of 220,000) found most of the rest. Tried first and dropped:
some by 26.
A block of its own changes nothing in the hits, so nothing can lose.
What
nearestConversationstakesfromOwner: only chunks that hold one of the owner's own (outgoing) messages. Itfinds their ids through those messages and scores only them, not the whole account.
search conversationsreturnsown: up to 5 of the owner's conversations nearest in meaning that the hits leftout. JSON items follow the hits with
from_owner: true; text output lists them under "your own messages".changes/feat-owner-block.md.Testing
--limit 20:the owner's messages, so the gain on everyday questions is likely smaller.
src/services/embeddings.test.ts: the block holds the owner's conversation the hits left out, and none when thehits already hold it.
pnpm ci:quick, Biome on the changed files,pnpm docs:check, vitest oversrc/cli/messenger,src/mcp,src/storevector tests andsrc/servicessearch tests.🤖 Generated with Claude Code