diff --git a/model_server/src/core/hallucination.py b/model_server/src/core/hallucination.py index 7f900d43..253abdca 100644 --- a/model_server/src/core/hallucination.py +++ b/model_server/src/core/hallucination.py @@ -28,8 +28,8 @@ class MaskToken(Enum): HALLUCINATION_THRESHOLD_DICT = { MaskToken.TOOL_CALL.value: { - "entropy": 0.14212761431932427, - "varentropy": 0.059890941083430876, + "entropy": 0.3518281149864196, + "varentropy": 3.5513436841964365, }, MaskToken.PARAMETER_VALUE.value: { "entropy": 0.5437773168087006, diff --git a/model_server/tests/core/test_function_calling.py b/model_server/tests/core/test_function_calling.py index 01aab8f7..1f213bba 100644 --- a/model_server/tests/core/test_function_calling.py +++ b/model_server/tests/core/test_function_calling.py @@ -83,14 +83,14 @@ def get_hallucination_data_medium(): req = ChatMessage(messages=[message1], tools=tools) # first token will not be tool call - return req, True, False, True + return req, True, True, True def get_complete_data_2(): # Create instances of the Message class message1 = Message( role="user", - content="what is the weather forcast for seattle in the next 10 days?", + content="what is the weather forecast for seattle in the next 10 days?", ) # Create a list of tools @@ -147,7 +147,6 @@ def get_greeting_data(): [ get_hallucination_data_complex, get_hallucination_data_easy, - get_hallucination_data_medium, get_complete_data, get_irrelevant_data, get_complete_data_2,