Skip to content

Commit

Permalink
Merge pull request #51 from athina-ai/bugfix/context-similarity-eval
Browse files Browse the repository at this point in the history
Bugfix/context similarity eval
  • Loading branch information
akshat-g authored Apr 19, 2024
2 parents f2328ba + c22a518 commit 2079b6c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion athina/evals/grounded/grounded_evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
class GroundedEvaluator(BaseEvaluator):

_comparator: Comparator
_failure_threshold = None

"""
This evaluator runs the requested grounded evaluator on the given data.
Expand Down Expand Up @@ -50,7 +51,10 @@ def __init__(
self._failure_threshold = failure_threshold

def _process_kwargs(self, required_args, **kwargs):
required_args_map = {key: kwargs[key] for key in required_args}
required_args_map = {
key: "\n".join(kwargs[key]) if key == "context" and isinstance(kwargs[key], list) else kwargs[key]
for key in required_args
}
if len(required_args_map) == 2:
values = list(required_args_map.values())
if all(isinstance(value, str) for value in values):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "athina"
version = "1.2.13"
version = "1.2.14"
description = "Python SDK to configure and run evaluations for your LLM-based application"
authors = ["Shiv Sakhuja <[email protected]>", "Akshat Gupta <[email protected]>", "Vivek Aditya <[email protected]>", "Akhil Bisht <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit 2079b6c

Please sign in to comment.