helxplatform/dug

Tranql Auto-complete

Closed this issue · 3 comments

For tranql when users type in name of an entity (such as asthma) we are currently using a translator service to resolve this to actual identifiers (eg MONDO:0004979).

This has some issues as sometimes the result curies might or might not exist in the graph. In addition the curies need to be normalized before sending to tranql for answers.

Maybe a better version would be actually using Redis search indexes via tranql to resolve to node ids that we know exist. In this article (http://www.odbms.org/2020/04/introducing-redisgraph-2-0/) they describe a problem that seems to fit this use case, where Graph nodes are looked up using indexes. This could enable us to get much better and accurate results.

It would be nice if we investigate this and implement a more reliable solution.

@frostyfan109 for discussions.

A couple additional thoughts:

  • The current implementation using translator SRI services takes some English substring (e.g. "asth") and tries to return concepts containing said substring (e.g. "asthma", "asthenopia", "myasthenia", etc.). Replacing this form of search with a tranql-based implementation would allow us to leverage the context of the tranql redisgraph to return related and relevant terms beyond that of a basic textual search.
  • Cut out the middleman services (which aren't designed for high-traffic autocompletion requests in the first place). This should also improve autocompletion times by a few seconds, which is important since a user traditionally expects an autocomplete interface to be fast.