Skip to content

Commit

Permalink
improved template
Browse files Browse the repository at this point in the history
  • Loading branch information
penguine-ip committed Dec 23, 2023
1 parent 7e5a64e commit 422635b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion deepeval/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def generate_reason(
Given the original expected output, a list of supportive reasons, and a list of unsupportive reasons (which is deduced directly from the 'expected output'), and a contextual recall score (closer to 1 the better), summarize a CONCISE reason for the score.
A supportive reason is the reason why a certain sentence in the original expected output can be attributed to the node in the retrieval context.
An unsupportive reason is the reason why a certain sentence in the original expected output cannot be attributed to anything in the retrieval context.
In your reason, you should include SOME, not all, information on the sentence number in expected output and node number in retrieval context to support your reason, especially for unsupportive reasons.
In your reason, you should related suportive/unsupportive reasons to the sentence number in expected output, and info regarding the node number in retrieval context to support your final reason. The first mention of "node(s)" should specify "node(s) in retrieval context)".
Contextual Recall Score:
{score}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_contextual_recall.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"""


@pytest.mark.skip(reason="openai is expensive")
# @pytest.mark.skip(reason="openai is expensive")
def test_contextual_recall():
test_case = LLMTestCase(
input="What is the primary difference between a comet and an asteroid?",
Expand Down

0 comments on commit 422635b

Please sign in to comment.