geronimo-pericoli
commited on
Commit
•
9d38ddd
1
Parent(s):
d4e4bf3
Update app.py
Browse files
app.py
CHANGED
@@ -366,8 +366,9 @@ def ctx_relevancy_eval():
|
|
366 |
|
367 |
def faithfulness_eval():
|
368 |
global final_response
|
|
|
369 |
evaluator = FaithfulnessEvaluator(llm=gpt4omini)
|
370 |
-
eval_result = evaluator.evaluate_response(response=final_response)
|
371 |
|
372 |
print("Groundedness: " + str(eval_result.score) + " - " + str(eval_result.passing) + "\n")
|
373 |
print("Respuesta: " + str(final_response) + "\n\n----------")
|
|
|
366 |
|
367 |
def faithfulness_eval():
|
368 |
global final_response
|
369 |
+
global query
|
370 |
evaluator = FaithfulnessEvaluator(llm=gpt4omini)
|
371 |
+
eval_result = evaluator.evaluate_response(query=query, response=final_response)
|
372 |
|
373 |
print("Groundedness: " + str(eval_result.score) + " - " + str(eval_result.passing) + "\n")
|
374 |
print("Respuesta: " + str(final_response) + "\n\n----------")
|