You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The point of a unit test of getMostRelevantAnswer should be to validate the correctness of the algorithm against a known test fixture. If the algorithm essentially grades answers by relevance, then a unit test should assert the correctness of the grading. No randomness involved.
Then to choose with some randomness you can use some package like random-weighted-choice
The text was updated successfully, but these errors were encountered:
@pox:
The text was updated successfully, but these errors were encountered: