ranking-agent / aragorn

A Translator ARA combining asynchronous database querying, answer coalescence, and answer ranking.
MIT License
4 stars 3 forks source link

Disallow backtracking in rules #166

Closed cbizon closed 1 year ago

cbizon commented 1 year ago

We have a rule in treats that is something like chemical-activity-chemical-disease

So if there's a chemical that treats a disease, then maybe other chemicals with the same activity treat the disease.

But when converted to cypher, this ends up allowing the two chemicals to be the same. The upshot is that you end up with odd dangling activities:

image

cbizon commented 1 year ago

I have implemented a solution for this problem where we filter out results like this once they are returned from robokop/strider. I'm not sure about it, because it's just flat asserting that the same node can't be bound to more than one query graph node, and I'm not sure I like that. There may be a more careful check.

More to the point, I think the question is whether post-hoc filtering is the correct approach. Should this be something that is handled in robokop/strider? I think it could be more efficient that way, because you would be filtering results during path finding.