Make Vector Search Method Configurable?
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3458584. --> Reported by: [yautja_cetanu](https://www.drupal.org/user/626050) >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>Search API AI had Cosine similarity as the only method of doing vector searches. Does this need to be pluggable?</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>There are alternatives such as dot product. I have heard:</p> <p>- That you use use the same method for search as you did for creating the vectors.<br> - That you should use the same method for search the AI provider did when they created the model (I've also heard this isn't true).</p> <p>Either way we may want to explore ways to make this configurable is there is any good reason to and make sure we do it properly (Such as we know which is best with which embedding model, or its tied to the configuration when first indexed).</p> <p><a href="https://medium.com/">https://medium.com/</a>@serkan_ozal/vector-similarity-search-53ed42b951d9#:~:text=Cosine%20Similarity%20is%20a%20widely,in%20a%20multi%2Ddimensional%20space.</p>
issue