ranking-agent / aragorn-ranker

Exposes TRAPI functions to add literature co-occurrence edges, convert publications to edge weights, and provide scores for answers.
MIT License
0 stars 1 forks source link

Added rnode merging to fix node high-scoring sets problem #71

Closed adamviola closed 6 months ago

adamviola commented 2 years ago

This commit changes how the ranker graph is created in the case of qnodes bound to multiple knodes. This change fixes the problem where results with sets score significantly higher than results without sets. (It turns out that increasing the number of nodes in a set always increases result score)

Currently, the ranker graph is a weighted version of the question graph (plus support edges), except when qnodes were bound to a set of knodes. With this change, we aggregate nodes bound to the same qnode, making ranker graph a weighted question graph even in the case of sets. To compute the weights of each qedge, we aggregate multiple weights. There are several one-to-many relationships between the given weights and the qedges.

  1. A single qedge can be bound to multiple kedges.
  2. A single kedge can have weights from multiple sources.
  3. Weights of a single source can come from multiple attributes.

We repeatedly merge the weights from the attribute level up to the qedge level using merge_weights to assign each qedge a single weight.