Skip to content

Commit

Permalink
pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-dhuang committed Dec 9, 2024
1 parent 9514bce commit 4b49b7b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"source": [
"from trulens.feedback.v2.feedback import ContextRelevance\n",
"\n",
"old_criteria = \"\"\"\n",
"current_criteria = \"\"\"\n",
"- CONTEXT that is IRRELEVANT to the QUESTION should score 0.\n",
"- CONTEXT that is RELEVANT to some of the QUESTION should get an intermediate score.\n",
"- CONTEXT that is RELEVANT to most of the QUESTION should get a score closer to 3.\n",
Expand Down Expand Up @@ -298,7 +298,7 @@
"\n",
"\n",
"# criteria without explicit rubrics\n",
"old_criteria = \"\"\"\n",
"current_criteria = \"\"\"\n",
"- CONTEXT that is IRRELEVANT to the QUESTION should score 0.\n",
"- CONTEXT that is RELEVANT to some of the QUESTION should get an intermediate score.\n",
"- CONTEXT that is RELEVANT to most of the QUESTION should get a score closer to 3.\n",
Expand All @@ -320,7 +320,7 @@
" provider, query: str, context: str, gt_score: float\n",
") -> str:\n",
" trulens_context_relevance_res = provider.context_relevance_with_cot_reasons(\n",
" question=query, context=context, criteria=old_criteria\n",
" question=query, context=context, criteria=current_criteria\n",
" )\n",
" return f\"{trulens_context_relevance_res[0]};{gt_score};{trulens_context_relevance_res[1]}\""
]
Expand Down

0 comments on commit 4b49b7b

Please sign in to comment.