ubyssey / ubyssey.ca

The code that powers www.ubyssey.ca
GNU General Public License v2.0
36 stars 41 forks source link

Use OpenAI's Embeddings for archive search #1329

Open SamuelmdLow opened 11 months ago

SamuelmdLow commented 11 months ago

For queries that could be an ngram of another word "cat" is in catch and applications, the search feature is pretty much unusable.

https://ubyssey.ca/archive/?q=cat

To fix this we should stop ordering by publish date on searches

SamuelmdLow commented 11 months ago

actually our search function seems to just be a filter. If the article contains the query string, then include it. Thats really bad and we should use a different method

SamuelmdLow commented 5 months ago

I believe using OpenAI's Embeddings would greatly improve search

https://platform.openai.com/docs/guides/embeddings

It gives sentences a number. The more similar the sentence, the closer their numbers should be to each other.