From 33dd85efbd03cf03f52bf3a725eecaa14a28a374 Mon Sep 17 00:00:00 2001 From: rota3015 Date: Tue, 7 May 2024 05:23:14 +0000 Subject: [PATCH] Return top 5 results --- chatbot/routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chatbot/routes.py b/chatbot/routes.py index 0fe8774..5b018eb 100644 --- a/chatbot/routes.py +++ b/chatbot/routes.py @@ -80,7 +80,7 @@ def find_closest_match(user_input): results.append((max_similarity_curr, return_value, ruleId)) # print(results) results.sort(reverse=True, key=lambda x: x[0]) - return results[:3] + return results[:5] def similarity_score(set1, set2): # Calculate the intersection of the two sets