Feature Request: Support for Negative Embeddings in Similarity Searches #19239
Replies: 2 comments 1 reply
-
Would this be more appropriate to apply via reranking? How common is it for vectorstores to support this type of functionality |
Beta Was this translation helpful? Give feedback.
-
If the application demands high precision from the initial set of results and aims to minimize irrelevant or undesired data from the start, directly incorporating negative embeddings could offer significant benefits. The support for direct manipulation of search results using negative embeddings within vector stores is not universally standard. Traditional vector search technologies focus on retrieving the closest matches based on positive similarity or relevance scores. However, as the field of search and retrieval evolves, there's an increasing interest in more nuanced search functionalities, including the ability to proactively exclude certain dimensions or characteristics represented by negative embeddings. Reranking is a reactive process that adjusts the relevance of search results after they have been retrieved based on positive similarity scores. It can incorporate negative signals by downgrading or filtering out undesired results during this post-processing phase. Reranking offers flexibility and can be less computationally intensive, making it a suitable option for applications where adjusting the order of an already retrieved set of results is sufficient. |
Beta Was this translation helpful? Give feedback.
-
Checked
Feature request
I propose adding support for negative embeddings in similarity searches within LangChain's search functionalities. This feature would allow users to specify not only what they are searching for (via positive embeddings) but also what they want to exclude from the search results (via negative embeddings). This could significantly improve the precision of search results in applications requiring nuanced context understanding, such as content recommendation systems or semantic search engines.
Motivation
Current similarity search capabilities in LangChain are powerful for finding close matches based on vector embeddings. However, they lack the direct ability to exclude certain concepts or themes, which could be equally important for refining search results. For example, when searching for content related to "Animals," a user might want to exclude "Cats" from the results. Incorporating negative embeddings would allow for this level of search refinement.
Proposal (If applicable)
Something like the following:
Beta Was this translation helpful? Give feedback.
All reactions