ibm-watsonx-orchestrate-evaluation-framework 1.0.2__py3-none-any.whl → 1.0.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ibm_watsonx_orchestrate_evaluation_framework-1.0.2.dist-info → ibm_watsonx_orchestrate_evaluation_framework-1.0.3.dist-info}/METADATA +70 -7
- ibm_watsonx_orchestrate_evaluation_framework-1.0.3.dist-info/RECORD +56 -0
- wxo_agentic_evaluation/analytics/tools/analyzer.py +3 -3
- wxo_agentic_evaluation/analytics/tools/ux.py +1 -1
- wxo_agentic_evaluation/analyze_run.py +10 -10
- wxo_agentic_evaluation/arg_configs.py +8 -1
- wxo_agentic_evaluation/batch_annotate.py +3 -9
- wxo_agentic_evaluation/data_annotator.py +50 -36
- wxo_agentic_evaluation/evaluation_package.py +102 -85
- wxo_agentic_evaluation/external_agent/__init__.py +37 -0
- wxo_agentic_evaluation/external_agent/external_validate.py +74 -29
- wxo_agentic_evaluation/external_agent/performance_test.py +66 -0
- wxo_agentic_evaluation/external_agent/types.py +8 -2
- wxo_agentic_evaluation/inference_backend.py +45 -50
- wxo_agentic_evaluation/llm_matching.py +6 -6
- wxo_agentic_evaluation/llm_rag_eval.py +4 -4
- wxo_agentic_evaluation/llm_user.py +3 -3
- wxo_agentic_evaluation/main.py +63 -23
- wxo_agentic_evaluation/metrics/metrics.py +59 -0
- wxo_agentic_evaluation/prompt/args_extractor_prompt.jinja2 +23 -0
- wxo_agentic_evaluation/prompt/batch_testcase_prompt.jinja2 +2 -0
- wxo_agentic_evaluation/prompt/examples/data_simple.json +1 -2
- wxo_agentic_evaluation/prompt/starting_sentence_generation_prompt.jinja2 +195 -0
- wxo_agentic_evaluation/prompt/story_generation_prompt.jinja2 +154 -0
- wxo_agentic_evaluation/prompt/template_render.py +17 -0
- wxo_agentic_evaluation/prompt/tool_planner.jinja2 +13 -7
- wxo_agentic_evaluation/record_chat.py +59 -18
- wxo_agentic_evaluation/resource_map.py +47 -0
- wxo_agentic_evaluation/service_provider/__init__.py +35 -0
- wxo_agentic_evaluation/service_provider/model_proxy_provider.py +108 -0
- wxo_agentic_evaluation/service_provider/ollama_provider.py +40 -0
- wxo_agentic_evaluation/service_provider/provider.py +19 -0
- wxo_agentic_evaluation/{watsonx_provider.py → service_provider/watsonx_provider.py} +27 -18
- wxo_agentic_evaluation/test_prompt.py +94 -0
- wxo_agentic_evaluation/tool_planner.py +130 -17
- wxo_agentic_evaluation/type.py +0 -57
- wxo_agentic_evaluation/utils/utils.py +6 -54
- ibm_watsonx_orchestrate_evaluation_framework-1.0.2.dist-info/RECORD +0 -46
- ibm_watsonx_orchestrate_evaluation_framework-1.0.2.dist-info/licenses/LICENSE +0 -22
- {ibm_watsonx_orchestrate_evaluation_framework-1.0.2.dist-info → ibm_watsonx_orchestrate_evaluation_framework-1.0.3.dist-info}/WHEEL +0 -0
- {ibm_watsonx_orchestrate_evaluation_framework-1.0.2.dist-info → ibm_watsonx_orchestrate_evaluation_framework-1.0.3.dist-info}/top_level.txt +0 -0
|
@@ -14,6 +14,7 @@ from wxo_agentic_evaluation.type import ConversationalConfidenceThresholdScore
|
|
|
14
14
|
|
|
15
15
|
console = Console()
|
|
16
16
|
|
|
17
|
+
|
|
17
18
|
class AgentMetricsTable:
|
|
18
19
|
def __init__(self, data):
|
|
19
20
|
self.table = Table(
|
|
@@ -53,60 +54,11 @@ def create_table(data: List[dict]) -> AgentMetricsTable:
|
|
|
53
54
|
return AgentMetricsTable(data)
|
|
54
55
|
|
|
55
56
|
|
|
56
|
-
def
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
"Total Step",
|
|
62
|
-
"Agent Step",
|
|
63
|
-
# "Tool Call Accuracy",
|
|
64
|
-
# "Tool Call Relevancy",
|
|
65
|
-
# "Agent Routing Accuracy"
|
|
66
|
-
],
|
|
67
|
-
"average_over_ground_truth_calls": [
|
|
68
|
-
"Wrong Function Calls",
|
|
69
|
-
# "Bad Calls",
|
|
70
|
-
"Wrong Parameters",
|
|
71
|
-
"Wrong Routing Calls",
|
|
72
|
-
],
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
if include_response_time:
|
|
76
|
-
columns["average_over_test_cases"].append("Avg Resp Time (Secs)")
|
|
77
|
-
|
|
78
|
-
journey_success_values = [
|
|
79
|
-
1 if item["Journey Success"] else 0 for item in results_list
|
|
80
|
-
]
|
|
81
|
-
journey_success_avg = round(
|
|
82
|
-
sum(journey_success_values) / len(journey_success_values), 2
|
|
83
|
-
)
|
|
84
|
-
text_match_values = [
|
|
85
|
-
1 if item["Text Match"] == "Summary Matched" else 0 for item in results_list
|
|
86
|
-
]
|
|
87
|
-
text_match_avg = round(sum(text_match_values) / len(text_match_values), 2)
|
|
88
|
-
ground_truth_calls = sum(item["Ground Truth Calls"] for item in results_list)
|
|
89
|
-
ground_truth_calls_avg = round(ground_truth_calls / len(results_list), 2)
|
|
90
|
-
avg_row = {
|
|
91
|
-
col: round(sum(item[col] for item in results_list) / len(results_list), 2)
|
|
92
|
-
for col in columns["average_over_test_cases"]
|
|
93
|
-
}
|
|
94
|
-
avg_row.update(
|
|
95
|
-
{
|
|
96
|
-
col: round(sum(item[col] for item in results_list) / ground_truth_calls, 2)
|
|
97
|
-
for col in columns["average_over_ground_truth_calls"]
|
|
98
|
-
}
|
|
99
|
-
)
|
|
100
|
-
|
|
101
|
-
# TODO: FIX as part of PR
|
|
102
|
-
# avg_row["WXO Average Response Time (Secs)"] = round(sum(item["WXO Average Response Time (Secs)"] for item in results_list) / len(results_list), 2)
|
|
103
|
-
|
|
104
|
-
avg_row["Journey Success"] = journey_success_avg
|
|
105
|
-
avg_row["Text Match"] = text_match_avg
|
|
106
|
-
avg_row["Ground Truth Calls"] = ground_truth_calls_avg
|
|
107
|
-
avg_row["Dataset"] = "Summary (Average)"
|
|
108
|
-
return avg_row
|
|
109
|
-
|
|
57
|
+
def safe_divide(nom, denom):
|
|
58
|
+
if denom == 0:
|
|
59
|
+
return 0
|
|
60
|
+
else:
|
|
61
|
+
return nom/denom
|
|
110
62
|
|
|
111
63
|
def is_saas_url(service_url: str) -> bool:
|
|
112
64
|
hostname = urlparse(service_url).hostname
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
ibm_watsonx_orchestrate_evaluation_framework-1.0.2.dist-info/licenses/LICENSE,sha256=Shgxx7hTdCOkiVRmfGgp_1ISISrwQD7m2f0y8Hsapl4,1083
|
|
2
|
-
wxo_agentic_evaluation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
-
wxo_agentic_evaluation/analyze_run.py,sha256=qcdew4htpIg0sxCXXX3QS_XhoPOGg4_CEPYFjZiMsnA,4343
|
|
4
|
-
wxo_agentic_evaluation/annotate.py,sha256=nxYMc6gwfQ-GuNjCPFtbX_-Es5-9XDdbXpMH89yRDdc,1228
|
|
5
|
-
wxo_agentic_evaluation/arg_configs.py,sha256=_ws5GX43rG8HdIZe5JAgb3heQubzpfOGWsvzT9Zfs2A,2016
|
|
6
|
-
wxo_agentic_evaluation/batch_annotate.py,sha256=KP9AU669aGTCiu5Yk4R2AbmdwhDtoyBlYInxTe3p7CU,6485
|
|
7
|
-
wxo_agentic_evaluation/data_annotator.py,sha256=to8FfIYMx-JzJ5aRmpMb1SiFS1KTXgdZU2qwowdn6BU,7823
|
|
8
|
-
wxo_agentic_evaluation/evaluation_package.py,sha256=RFo5oC2Gydc7wQ28bDSs5nisnRj22GCnjjrFrn4O2L4,21031
|
|
9
|
-
wxo_agentic_evaluation/inference_backend.py,sha256=8nW3LZg6dLTemrHBmDBx8b2NUvBjvSC4bLLxJX9yPiY,25754
|
|
10
|
-
wxo_agentic_evaluation/llm_matching.py,sha256=ISRMvZq-oC0amVBCPNlghPpMDCPxIjVGgm9DtZWTU40,1501
|
|
11
|
-
wxo_agentic_evaluation/llm_rag_eval.py,sha256=n1e0nffYlgxqu7i4Ef_j1zmo9zXcqc2zfTfNYuMsopc,1675
|
|
12
|
-
wxo_agentic_evaluation/llm_user.py,sha256=Ppc-iKtPGaf6tPoHGYFLqXX-vy8LoQneLTQBVOXLHiA,1422
|
|
13
|
-
wxo_agentic_evaluation/main.py,sha256=H6sLZrCUBfqjh9gPoQN6BHxSby-UKrea705cuIiyknc,8042
|
|
14
|
-
wxo_agentic_evaluation/record_chat.py,sha256=Q5w9ouvVfikms_kYyQ6wgqvNN_DxV400I2HriTOdMfg,5969
|
|
15
|
-
wxo_agentic_evaluation/service_instance.py,sha256=yt7XpwheaRRG8Ri4TFIS5G2p5mnCwvNgj6T7bDF5uTU,6494
|
|
16
|
-
wxo_agentic_evaluation/tool_planner.py,sha256=nOwoq_RMBO5ISRFwrKeblgdbMz50qfmVqHkZRAXjP3s,8075
|
|
17
|
-
wxo_agentic_evaluation/type.py,sha256=QbwEedAYnot9WBVIJVSP23s1KHJc7uFQyOhL_MYEdmI,4832
|
|
18
|
-
wxo_agentic_evaluation/watsonx_provider.py,sha256=bCaBX3DZWY65vFlOiqZFvSmHdSZB_mDRr45QrLTnIdo,5620
|
|
19
|
-
wxo_agentic_evaluation/analytics/tools/analyzer.py,sha256=qvkhoyY4JgneE03cmo-KuMAaQB7iM_Lm0C1sexyPFwY,18056
|
|
20
|
-
wxo_agentic_evaluation/analytics/tools/main.py,sha256=ocwPUlEjyK7PMdXBg5OM2DVDQBcaHT4UjR4ZmEhR0C4,6567
|
|
21
|
-
wxo_agentic_evaluation/analytics/tools/types.py,sha256=IFLKI1CCQwPR2iWjif8AqL_TEq--VbLwdwnMqfJujBw,4461
|
|
22
|
-
wxo_agentic_evaluation/analytics/tools/ux.py,sha256=CcnaefAZwzPx3FW0BzlOx7OBPwNfmA5yVtYB-gYci9w,18324
|
|
23
|
-
wxo_agentic_evaluation/external_agent/external_validate.py,sha256=XdWH7Su9gCmSbbYHHpjWMk3NOTlrebm0c0H-Ra6FPJo,2411
|
|
24
|
-
wxo_agentic_evaluation/external_agent/types.py,sha256=6WmDGetJGSg92HqPW_Q9K7AEorivTraiw8HgdxaiGxs,1481
|
|
25
|
-
wxo_agentic_evaluation/metrics/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
26
|
-
wxo_agentic_evaluation/metrics/llm_as_judge.py,sha256=bybJQfVWiVh3BoFEZjdBmU9EQO9Ukheu3YWmkI9b1ks,1218
|
|
27
|
-
wxo_agentic_evaluation/metrics/metrics.py,sha256=owyUoRNEz6IoblHj6YLBT4MVlsX1hgjt8bYjGBnsjNg,4012
|
|
28
|
-
wxo_agentic_evaluation/prompt/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
29
|
-
wxo_agentic_evaluation/prompt/answer_relevancy_prompt.jinja2,sha256=vLrMWce-5HlvniCQdtifnl-YdbJfT8-oixzfwulZs98,3839
|
|
30
|
-
wxo_agentic_evaluation/prompt/batch_testcase_prompt.jinja2,sha256=PPnfczM_HjCjho8UKFTL9OYRYshpwqkBKBas8C1jMHY,1807
|
|
31
|
-
wxo_agentic_evaluation/prompt/faithfulness_prompt.jinja2,sha256=DW9OdjeZJbOWrngRqTAVD4w0va_HtA2FR4G1POIIamM,2524
|
|
32
|
-
wxo_agentic_evaluation/prompt/keyword_matching_prompt.jinja2,sha256=7mTkSrppjgPluUAIMTWaT30K7M4J4hyR_LjSjW1Ofq0,1290
|
|
33
|
-
wxo_agentic_evaluation/prompt/keywords_generation_prompt.jinja2,sha256=PiCjr1ag44Jk5xD3F24fLD_bOGYh2sF0i5miY4OrVlc,1890
|
|
34
|
-
wxo_agentic_evaluation/prompt/llama_user_prompt.jinja2,sha256=nDfCD0o9cRYmsgIjzD-RZNQxotlvuqrzdsZIY-vT794,684
|
|
35
|
-
wxo_agentic_evaluation/prompt/semantic_matching_prompt.jinja2,sha256=MltPfEXYyOwEC2xNLl7UsFTxNbr8CwHaEcPqtvKE2r8,2749
|
|
36
|
-
wxo_agentic_evaluation/prompt/template_render.py,sha256=arMtlNcbRIczRwpfZWlITrgDlDsaDCbwGaNPGaJyBko,3080
|
|
37
|
-
wxo_agentic_evaluation/prompt/tool_chain_agent.jinja2,sha256=9RcIjLYoOvtFsf-RgyMfMcj2Fe8fq1wGkE4nG1zamYY,297
|
|
38
|
-
wxo_agentic_evaluation/prompt/tool_planner.jinja2,sha256=gpI7wrcIL6ytCcllr_ZdWwjVLtC_06at3-JkAcAl2HE,1243
|
|
39
|
-
wxo_agentic_evaluation/prompt/examples/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
40
|
-
wxo_agentic_evaluation/prompt/examples/data_simple.json,sha256=O0GeKBf2s9d-7TxkDFFmCEV2sl3e3HcpT11cN0DYFjw,2354
|
|
41
|
-
wxo_agentic_evaluation/utils/__init__.py,sha256=QMxk6hx1CDvCBLFh40WpPZmqFNJtDqwXP7S7cXD6NQE,145
|
|
42
|
-
wxo_agentic_evaluation/utils/utils.py,sha256=8mD6_L_qP-2jQtRkA3Njtg2HFCSQ4FX2NgO4oZq-gow,7994
|
|
43
|
-
ibm_watsonx_orchestrate_evaluation_framework-1.0.2.dist-info/METADATA,sha256=fQ1LyDiJO71QiSOrCdbAoPmQdbH5GINJCkiaex8lUk4,16105
|
|
44
|
-
ibm_watsonx_orchestrate_evaluation_framework-1.0.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
45
|
-
ibm_watsonx_orchestrate_evaluation_framework-1.0.2.dist-info/top_level.txt,sha256=2okpqtpxyqHoLyb2msio4pzqSg7yPSzwI7ekks96wYE,23
|
|
46
|
-
ibm_watsonx_orchestrate_evaluation_framework-1.0.2.dist-info/RECORD,,
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
(The MIT License)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2024, 2025 IBM Corporation
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
-
a copy of this software and associated documentation files (the
|
|
7
|
-
'Software'), to deal in the Software without restriction, including
|
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
-
the following conditions:
|
|
12
|
-
|
|
13
|
-
The above copyright notice and this permission notice shall be
|
|
14
|
-
included in all copies or substantial portions of the Software.
|
|
15
|
-
|
|
16
|
-
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
-
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
20
|
-
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
21
|
-
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
22
|
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
File without changes
|