Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework unit test and method getMostRelevantAnswer() #6

Open
Czino opened this issue Jul 5, 2021 · 0 comments
Open

Rework unit test and method getMostRelevantAnswer() #6

Czino opened this issue Jul 5, 2021 · 0 comments

Comments

@Czino
Copy link
Member

Czino commented Jul 5, 2021

@pox:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant