Most related articles
If you're only trying to find related articles based on elements (ie tags, categories, entries, etc), you can use my Similar plugin.

Here's a basic example, more info in the repo:

{% set similarEntriesByTags = craft.similar.find({ element: entry, context: entry.tags }) %}

&lt;ul&gt;
    {% for similarEntry in similarEntriesByTags %}
        &lt;li&gt;{{ similarEntry.title }} ({{ similarEntry.count }} tags in common)&lt;/li&gt;
    {% endfor %}
&lt;/ul&gt;