Regarding suggestion 1, it's pretty "easy":
1) Wikipedia disambiguation pages are usually already curated to either appear as main hit for a term if most meanings are equally valid:
https://en.wikipedia.org/wiki/DBT
https://en.wikipedia.org/wiki/Joker
2) or to directly show one meaning if that is the overwhelming meaning and offer an explicit disambiguation page:
https://en.wikipedia.org/wiki/Rice vs
https://en.wikipedia.org/wiki/Rice_(disambiguation)
3) In extreme cases, for few variants, you might have one main variant
https://en.wikipedia.org/wiki/Anita_Hill where there's a direct link in the top to link to 1-2 other articles
In all of these cases, Kagi currently seems to focus on showing exactly one Wikipedia article. I imagine behaviour could stay that way for variant 2. For variant 3 I imagine, Kagi could fetch all 2-3 articles and display 2-3 sentences from each, maybe extending the widget with an option to repeat the search with the search term for the variant, as these are often small variations in name, like an additional middle name or something, so that knowledge from Wikipedia could directly feed back into a more refined search.
For variant 1, probably the best option would be to show the (truncated) wikipedia disambiguation page instead of one of the articles.
Regarding suggestion 2:
I suppose it's not necessary to present all 18. A lot of these are less common than those two.
To stay in the current example, my search result page currently has 32 links for the search "dbt", 11 about the therapy, 14 about the database tool, 7 about all other stuff. This will likely be similar to other such cases.
So if you actually have an algorithm which can properly group this (guess that's the hard part), you'd make two main groups, present them as suggested in my first post, or as tabs maybe, and then simply put all those miscellaneous hits below that.
If the algorithm cannot make up its mind on what to group with what or if there are too many groups, like e.g. 5, simply show no grouping at all like currently.