News for hackers. Stuff that matters.
Re:T-Wand: beating Lucene in less than 600 lines of code by huahaiy on Wednesday November 17, 2021 @05:10PM (#29259529)
There's no guarantee in pure vector space model that it is the case. Your understanding is way off. This is a caveat that Lucene prominently put on their Web page.

https://lucene.apache.org/core/3_5_0/scoring.html

"Lucene scoring is the heart of why we all love Lucene. It is blazingly fast and it hides almost all of the complexity from the user. In a nutshell, it works. At least, that is, until it doesn't work, or doesn't work as one would expect it to work. Then we are left digging into Lucene internals or asking for help on [email protected] to figure out why a document with five of our query terms scores lower than a different document with only one of the query terms."

See? Lucene people know about it but they just do not think it is a problem.

But I do.

T-Wand, though also uses vector space model, makes sure it is the case.

Re:T-Wand: beating Lucene in less than 600 lines of code by softwaredoug on Wednesday November 17, 2021 @05:47PM (#29259846)
No there’s no guarantee. A very strong bias, but no absolute guarantee. Most people use AND queries by default or set a high enough min should match.

Those settings aside, arguably there are cases where fewer term matches could be more relevant.

For the search “Luke skywalker”

A tweet for example mentioning the term “Skywalker” once has much higher “Star Wars” aboutness than a move that uses skywalker one page and Luke pages apart.

That is the information density of Star Wars type content is far higher in the tweet, whereas eventually a book ends up using most English somewhere.

Re:T-Wand: beating Lucene in less than 600 lines of code by huahaiy on Wednesday November 17, 2021 @05:55PM (#29259939)
You either has or has no guarantee, that's what the word "guarantee" means. Don't mince words.

You had a wrong understanding. Now you are corrected. Let's move on.

Nobody said anything about "fewer term matches could not be more relevant". You are just making up straw men here. That's not the discussion we are having.

What I said is this, from a user point of view, it's not good to have a document containing fewer query terms to rank higher. This is a fact that even Lucene acknowledge (at least when they were version 3.5.0.). You have nothing to counter this fact.

Re:T-Wand: beating Lucene in less than 600 lines of code by softwaredoug on Wednesday November 17, 2021 @06:08PM (#29260057)
But you’re arguing that such a guarantee ALWAYS is most relevant. When that’s not always the case.

There’s been extensive research justification behind the vector-space model. BM25 is the 25th iteration of a model and well tuned BM25 holds the highest non nueral performance on many tasks including question answering[1]. Research has long found including factors other than total term matches matters. Such as IDF[2] and field length[3].

Have you benchmarked your relevance assumptions similarly? If so I’d love to see them and learn more!

1 - https://www.elastic.co/blog/improving-search-relevance-with-...

2- https://www.researchgate.net/publication/238123710_Understan...

3 - http://sifaka.cs.uiuc.edu/course/410s12/mir.pdf

Re:T-Wand: beating Lucene in less than 600 lines of code by huahaiy on Wednesday November 17, 2021 @06:31PM (#29260277)
You are making up straw man again. Did I make that claim?

I was simply motivate my work, pointing out it's a problem that the current generation of search engine does not address.

What is "relevance", it is of course a context sensitive question.

You talk as if BM25 is the gold standard when it is not.

The research on this is all over the place. I just read an article that says that BM25 is way worse than alternative language models. You don't have to look far, for example this one that talks about Wand:

https://dl.acm.org/doi/10.1145/2537734.2537744

You know why I quit academia? It is useless arguments and virtual signalings like these.

I'd rather go out and build a damn thing that people like to use.

I merely pointed out that there's a problem, and I have a solution. I did not claim that my problem and my solution solve all problems. Isn't this obvious?

In my problem, my solution beats Lucene. It's as simple as that.

So if Lucene wants to be this infinitely configurable search library, it would be advisable to offer my solution as an option, or offer an better one that does something similar.

So far I have not seen any takers, only excuses.

Re:T-Wand: beating Lucene in less than 600 lines of code by softwaredoug on Wednesday November 17, 2021 @09:11PM (#29261308)
The title of the section quoted is

"Better Relevance"

and I am simply saying, arguably, you can't make that claim without evidence.

(That said, I do find much to like about the article and the WAND / T-WAND explanation. I'm only pointing out you can't claim 'better relevance' without a benchmark to go with it.)

[dead]
Re:T-Wand: beating Lucene in less than 600 lines of code by aleben on Thursday November 18, 2021 @05:52AM (#29264102)
Pardon my intrusion, but I think there's the necessity of toning down the discussion a bit. To be fair it is irrelevant where user A or user B works and I don't see any hostility in this discussion except the one from the blog's author. If the aim is doing Science, let's do this peacefully! I think the main problem that generated this discussion is the form of some sentences of the blog "As someone who has a Ph.D. in Human-computer Interaction ;-), I feel like I am entitled to define a condition of "good" in relevance here. I hereby declare that:

A good top-K algorithm should rank a document containing more user query terms higher than a document containing less number of user query terms. This makes perfect sense. Right?" This should have been changed in: "For the sake of this blog post I am interested in a simplified relevance concept: more query terms matched -> more relevance" In this way the blog would have not caused the outburst of (correct) indignation of the Information Retrieval community, that has been working for years on the topic, and knows very well how much complex is relevance.

Re:T-Wand: beating Lucene in less than 600 lines of code by huahaiy on Thursday November 18, 2021 @10:57AM (#29266881)
That's the problem right there. The so called "Information Retrieval Community" does not seem to care about what users want, and they treat their users in a condescending way, ignoring an obvious problem for years, as clearly demonstrated here and elsewhere.

Why should I care about what they think? In the end of the day, they are serving the users. They are either going to be left behind, or they have to change.

For example, the newer search engines, such us, https://github.com/meilisearch/MeiliSearch, also do what T-Wand does. Users are going to vote by their feet. The "information retrieval community" be damned. It's as simple as that. Got it?

And change they will. What "information retrieval community" are you talking about? Just a bunch of fresh graduates who just got their PH.D, and some college students. That's about it. I don't see any IR professors coming out defending them.

Re:T-Wand: beating Lucene in less than 600 lines of code by huahaiy on Friday November 19, 2021 @12:36PM (#29279872)
The "hostility" I referred to was the one towards the users. Basically, he's demanding users to show evidence that whatever they want is better than BM25.

That's just wrong. Period. This is the reason I mention his job, because his job requires him to listen to the users, instead of taking something he learned in school and use that to talk condescendingly to his users. That's not gonna fly.

Given this context, I think whatever I said it is entirely appropriate.

Re:T-Wand: beating Lucene in less than 600 lines of code by softwaredoug on Thursday November 18, 2021 @06:53AM (#29264443)
Yes for sure! I agree. I mean no disrespect myself, the algorithm seems useful and I wish the author all the best. I know, from personal experience, having your work commented on can be stressful.

I'm just trying to understand what the author meant and their intention for anyone that might revisit this thread later. I think what you're saying sounds plausible as an interpretation.