Ask Your Question
2

Algorithm used to show related questions

asked 2012-07-06 23:27:21 -0500

kintali gravatar image kintali flag of United States
111 5 1 9
http://www.cs.princeton.e...

What algorithms are being used in askbot to show the "related questions" (1) in the right panel and (2) below the title when you are adding a new question ? Are they simply based on common tags and common strings in the body of the questions ? For (2) Does it keep track of which questions are being "clicked" by users ?

delete close flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2012-07-08 20:34:01 -0500

Evgeny gravatar image Evgeny flag of Chile
11074 50 84 182
http://askbot.org/

It's in askbot.models.question.Thread.get_similar_threads.

First up to 100 questions with matching tags are selected, then similarity is calculated as number of overlapping tags, then 10 most similar threads are shown.

Not a rigorous algorithm at all, maybe you could suggest something better?

The algorithm should be either fast enough to generate the list in real time or we'd need to denormalize the list and recalculate periodically. Now it is not too slow and the result is stored in the cache so we won't need to do that computation every time.

link publish delete flag offensive edit

Comments

I can help you implement a better algorithm once you pick a search backend.

Joseph ( 2012-07-13 15:01:08 -0500 )edit

I can see that Xapian readily provides functionality for finding a set of documents similar to a given one; I guess Lucene would have something equivalent. See: [http://trac.xapian.org/wiki/FAQ/FindSimilar], [http://trac.xapian.org/wiki/FAQ/EliteSet]. We would just need to fiddle with the factors specific to a QA forum, (namely the relative weights for title/tag/question/answer terms) to try to optimize the relevance.

Basel Shishani ( 2012-08-24 03:53:15 -0500 )edit

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Reliable Askbot Hosting

Create your Q&A site at askbot.com. Managed Askbot hosting at just $15/mo. Dedicated hosting, support contracts, consulting services.

create your Q&A site
30 days free trial

Question tools

Follow

subscribe to rss feed

Stats

Asked: 2012-07-06 23:27:21 -0500

Seen: 56 times

Last updated: Jul 08 '12