Skip to content

Commit 94fc3d2

Browse files
committed
removed warning
1 parent 92428a6 commit 94fc3d2

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

nbs/metric/discrete.ipynb

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,16 @@
9191
"output_type": "stream",
9292
"text": [
9393
"med\n",
94-
"The response 'this is my response' is somewhat helpful because it acknowledges receipt or presence of a response but lacks specific information or relevance that would make it more beneficial or informative.\n"
94+
"The given input \"this is my response\" is too vague to provide a comprehensive evaluation.\n",
95+
"\n",
96+
"Positives:\n",
97+
"1. Clear Statement: It's a straightforward indication that a response has been provided.\n",
98+
"\n",
99+
"Negatives:\n",
100+
"1. Lack of Context: Without context or additional information, it's impossible to assess the relevance or accuracy of the response.\n",
101+
"2. No Specificity: The response doesn't convey any specific information or insight related to a topic or question.\n",
102+
"\n",
103+
"If this response was intended to be part of a conversation or instruction, more detail would be required to make it highly effective. At present, it serves as a neutral statement without actionable or informative content.\n"
95104
]
96105
}
97106
],
@@ -134,16 +143,8 @@
134143
"name": "stdout",
135144
"output_type": "stream",
136145
"text": [
137-
"None\n",
138-
"Error executing metric new_metric: MetricResult.__init__() got an unexpected keyword argument 'traces'\n"
139-
]
140-
},
141-
{
142-
"name": "stderr",
143-
"output_type": "stream",
144-
"text": [
145-
"/var/folders/ww/sk5dkfhn673234cmy5w7008r0000gn/T/ipykernel_31199/2702091914.py:15: PydanticDeprecatedSince20: The `dict` method is deprecated; use `model_dump` instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.10/migration/\n",
146-
" traces['output'] = response.dict()\n"
146+
"low\n",
147+
"The prompt 'my response' does not provide sufficient information or context for me to evaluate its helpfulness. An answer needs to be specific and provide insight or information relative to a clear question or context.\n"
147148
]
148149
}
149150
],
@@ -162,7 +163,7 @@
162163
" traces = {}\n",
163164
" traces['input'] = kwargs\n",
164165
" response = llm.generate(prompt.format(**kwargs),response_model=response_model)\n",
165-
" traces['output'] = response.dict()\n",
166+
" traces['output'] = response.model_dump()\n",
166167
" total = sum(response.output)\n",
167168
" if total < 1:\n",
168169
" score = 'low'\n",

0 commit comments

Comments
 (0)