# Suggested Topics - Title & Content based Suggestions

**URL:** <https://meta.discourse.org/t/suggested-topics-title-content-based-suggestions/173354>\
**Category:** Feature\
**Tags:** suggested-topics\
**Created:** [December 15, 2020, 7:52am UTC](https://meta.discourse.org/t/suggested-topics-title-content-based-suggestions/173354 "2020-12-15T07:52:29Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [June 30, 2021, 5:55am UTC](https://meta.discourse.org/t/suggested-topics-title-content-based-suggestions/173354/10 "2021-06-30T05:55:46Z")

</div>

> [@nhpackard](#):
>
> The hard bit (for me) would be the online bit, which would require an interfacing of discourse rails with a handful of python calls (e.g. to the gensim tools). Any examples of this sort of interface would be helpful for me to look at.

The tricky performance piece is the RPC mechanism here. You don’t want to launch a brand new Python process for every single topic view.

Even an HTTP call may be too slow.

Perhaps … populate a `related_topics` `(topic_id, related_topic_id, rank)` table? You could then lean on WebHooks to get the table updated quickly when people post new topics and Ruby does not need to call Python.

On the Discourse side implementation would be pretty easy, you would simply rewrite this method to look up the information in your new `related_topics` table.

> <https://github.com/discourse/discourse/blob/be4250c157f57dfa3618477f92db5ebf7021f84d/lib/topic_query.rb#L1102-L1131>

---

_[View the full topic](https://meta.discourse.org/t/suggested-topics-title-content-based-suggestions/173354)._
