Earlier quoted context omitted.
A lot of times search is intentionally broken on websites to get you looking at more things.
That doesn't explain why Atlassian can't build a working search function for Confluence. I get the feeling the biggest problem with site-local search engines is a tacit requirement that the search index always must be up to date. That severely hamstrings any search engine, since there's a wealth of supplemental information to be gathered by considering the corpus as a whole that is simply not available if you support…
Building a semantic search engine in Rust
11–20 of 29 posts
Re: Building a semantic search engine in Rust
#12Thank you for posting this! I'll update http://searchthebook.com/ to use this method instead of interfacing with python like it is now. Your method might enable me to run it on a small server with reasonable response times.
Re: Building a semantic search engine in Rust
#13I remember when "semantic search" was the Next Big Thing (back when all we had were simple keyword searches). I don't know enough about the internals of Google's search engine to know if it could be called a "semantic search engine", but not, it gets close enough to fool me. But I feel like I'm still stuck on keyword searches for a lot of other things, like email (outlook and mutt), grepping IRC logs, searching for p…
I think you mean when semantic web was the next Big Thing. Better search would have been a nice side effect of a semantic web. I was a big enthusiast of all the potential a semantic web could have brought. In my opinion due to the rise of social networks, content got heavily centralized, and it wasn't in the centralized platform's interest to annotate it, or allow others to consume it. For a short period of my time o…
Re: Building a semantic search engine in Rust
#14Re: Building a semantic search engine in Rust
#15I remember when "semantic search" was the Next Big Thing (back when all we had were simple keyword searches). I don't know enough about the internals of Google's search engine to know if it could be called a "semantic search engine", but not, it gets close enough to fool me. But I feel like I'm still stuck on keyword searches for a lot of other things, like email (outlook and mutt), grepping IRC logs, searching for p…
Several technical challenges.
First, keyword searches have a lot of history that has led to a huge amount of tuning that users have gotten used to (mostly for the better in terms of results but mostly for the worse in terms of difficulty of configuration). For example, keyword systems have evolved over decades to have synonyms (unidirectional and bidirectional), a huge number of stemming algorithms for various languages (and some that cross languages), dictionaries for decompounding, various ngram/shingling methods, phrase matching and term overlap analysis, and the ability to combine all of these together with tunable weights, etc. These have generally resulted in a lot of keyword systems continuing to be "as good as it gets" for a long time. People generally like fiddling with these knobs/dials because it gives them a sense of control...until they realize the combinatory mess they get themselves into where they're essentially human hyperparameter tuning systems. Recently, some additional steps have come to take the "human" out of that with automated systems, but even then, most systems aren't set up to "learn" what synonyms to potentially introduce, whether/when/how to take word order into place, and in particular when/how these can/should combine together and when they shouldn't.
Semantic large language models "solve" some of these problems (automatic synonyms, built in linguistic understanding of root words, etc) if you build them right, but they have a lot of hidden technical depth. Most people try to throw something like BERT into their search and find the hardware costs and complexity go through the roof in ways they weren't ready to handle. And there's history weighing on the expectations for the operators ("where's my synonym configuration," etc) and the answers are very different ("go through a fine tuning step for your model") or sometimes nonexistent on most commercial platforms (how do you ensure only relevant results are returned)? And because the semantic/large language models don't know everything in the world, OOTB models still do underperform relative to keyword on certain query types (those heavy on obscure people names, etc) -- until they're retrained.
There's good research and companies/products coming out though that are changing a lot of this. See https://docs.google.com/spreadsheets/d/1L8aACyPaXrL8iEelJLGq... for example where the BM25 rows are traditional keyword and rows 8+ are zero-shot language models, and you can start to see that in some of the recent developments, semantic/neural/large language models are starting to outperform keyword on the things keyword used to be better at. My sense (though I'm biased) is these solutions are going to rapidly evolve to eliminate many of these technical challenges.
Disclosure/source: I led product management for Elasticsearch for several years and am currently leading product management for Vectara (a neural search SaaS platform)
Re: Building a semantic search engine in Rust
#16One of the core problems in semantic search is doing efficient approximate nearest neighbor search. In this post the author uses KD trees. There are other alternatives for efficient ANN like scann from Google and faiss from Facebook.
Re: Building a semantic search engine in Rust
#17Years ago I helped build a semantic search engine for patents, we evaluated it on gov2, we knew it worked, and when we launched it it was so much better than the competitors that the USPTO contacted us to buy a license right away.
Re: Building a semantic search engine in Rust
#18But isn’t that PyTorch with a few extra steps?
Re: Building a semantic search engine in Rust
#19I remember when "semantic search" was the Next Big Thing (back when all we had were simple keyword searches). I don't know enough about the internals of Google's search engine to know if it could be called a "semantic search engine", but not, it gets close enough to fool me. But I feel like I'm still stuck on keyword searches for a lot of other things, like email (outlook and mutt), grepping IRC logs, searching for p…
Semantic similarity more concretely means to use neural nets to embed the text, then use cosine similarity or dot product to compute the score between two entities. embed1 = neural_net(txt1) embed2 = neural_net(txt2) sim_score = np.dot(embed1, embed2) If you're making a search engine you precompute the embeds for all the items in your database. When a user performs a search you just need to embed the query and do the…
Re: Building a semantic search engine in Rust
#20I remember when "semantic search" was the Next Big Thing (back when all we had were simple keyword searches). I don't know enough about the internals of Google's search engine to know if it could be called a "semantic search engine", but not, it gets close enough to fool me. But I feel like I'm still stuck on keyword searches for a lot of other things, like email (outlook and mutt), grepping IRC logs, searching for p…
Semantic similarity more concretely means to use neural nets to embed the text, then use cosine similarity or dot product to compute the score between two entities. embed1 = neural_net(txt1) embed2 = neural_net(txt2) sim_score = np.dot(embed1, embed2) If you're making a search engine you precompute the embeds for all the items in your database. When a user performs a search you just need to embed the query and do the…