clear-eval 1.0.8__tar.gz → 2.0.2__tar.gz
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.
- clear_eval-2.0.2/PKG-INFO +248 -0
- clear_eval-2.0.2/README.md +207 -0
- {clear_eval-1.0.8 → clear_eval-2.0.2}/pyproject.toml +22 -4
- clear_eval-2.0.2/src/clear_eval/agentic/dashboard/agentic_workflow_dashboard.py +4664 -0
- clear_eval-2.0.2/src/clear_eval/agentic/dashboard/generate_static_dashboard.py +614 -0
- clear_eval-2.0.2/src/clear_eval/agentic/dashboard/launch_dashboard.py +99 -0
- clear_eval-2.0.2/src/clear_eval/agentic/dashboard/path_analysis.py +170 -0
- clear_eval-2.0.2/src/clear_eval/agentic/pipeline/argument_definitions.py +160 -0
- clear_eval-2.0.2/src/clear_eval/agentic/pipeline/build_json_results.py +657 -0
- clear_eval-2.0.2/src/clear_eval/agentic/pipeline/create_ui_input.py +343 -0
- clear_eval-2.0.2/src/clear_eval/agentic/pipeline/full_traces_evaluation/clear_analysis/base_clear_runner.py +277 -0
- clear_eval-2.0.2/src/clear_eval/agentic/pipeline/full_traces_evaluation/clear_analysis/issues_clear_runner.py +89 -0
- clear_eval-2.0.2/src/clear_eval/agentic/pipeline/full_traces_evaluation/clear_analysis/root_cause_clear_runner.py +109 -0
- clear_eval-2.0.2/src/clear_eval/agentic/pipeline/full_traces_evaluation/clear_analysis/run_clear_analysis.py +146 -0
- clear_eval-2.0.2/src/clear_eval/agentic/pipeline/full_traces_evaluation/run_trajectory_evaluation_pipeline.py +758 -0
- clear_eval-2.0.2/src/clear_eval/agentic/pipeline/full_traces_evaluation/trace_evaluation/base_evaluator.py +653 -0
- clear_eval-2.0.2/src/clear_eval/agentic/pipeline/full_traces_evaluation/trace_evaluation/full_trajectory_evaluator.py +466 -0
- clear_eval-2.0.2/src/clear_eval/agentic/pipeline/full_traces_evaluation/trace_evaluation/rubric_evaluator.py +412 -0
- clear_eval-2.0.2/src/clear_eval/agentic/pipeline/full_traces_evaluation/trace_evaluation/rubric_generator.py +311 -0
- clear_eval-2.0.2/src/clear_eval/agentic/pipeline/full_traces_evaluation/trace_evaluation/task_success_evaluator.py +298 -0
- clear_eval-2.0.2/src/clear_eval/agentic/pipeline/preprocess_traces/compact_trace_formatter.py +806 -0
- clear_eval-2.0.2/src/clear_eval/agentic/pipeline/preprocess_traces/preprocess_traces.py +298 -0
- clear_eval-2.0.2/src/clear_eval/agentic/pipeline/preprocess_traces/process_langfuse_traces.py +296 -0
- clear_eval-2.0.2/src/clear_eval/agentic/pipeline/preprocess_traces/process_mlflow_traces.py +535 -0
- clear_eval-2.0.2/src/clear_eval/agentic/pipeline/preprocess_traces/trace_utils.py +682 -0
- clear_eval-2.0.2/src/clear_eval/agentic/pipeline/run_clear_agentic_eval.py +452 -0
- clear_eval-2.0.2/src/clear_eval/agentic/pipeline/run_clear_step_analysis.py +699 -0
- clear_eval-2.0.2/src/clear_eval/agentic/pipeline/setup/config_example.json +19 -0
- clear_eval-2.0.2/src/clear_eval/agentic/pipeline/setup/config_example.yaml +54 -0
- clear_eval-2.0.2/src/clear_eval/agentic/pipeline/setup/default_agentic_config.yaml +108 -0
- clear_eval-2.0.2/src/clear_eval/agentic/pipeline/setup/rh_config_example.yaml +29 -0
- clear_eval-2.0.2/src/clear_eval/agentic/pipeline/setup/test_tools_config_example.yaml +30 -0
- clear_eval-2.0.2/src/clear_eval/agentic/pipeline/utils.py +130 -0
- {clear_eval-1.0.8 → clear_eval-2.0.2}/src/clear_eval/analysis_runner.py +10 -1
- clear_eval-2.0.2/src/clear_eval/args.py +162 -0
- {clear_eval-1.0.8 → clear_eval-2.0.2}/src/clear_eval/cli.py +15 -0
- {clear_eval-1.0.8 → clear_eval-2.0.2}/src/clear_eval/dashboard/show_analysis_dashboard.py +134 -26
- {clear_eval-1.0.8 → clear_eval-2.0.2}/src/clear_eval/logging_config.py +1 -1
- {clear_eval-1.0.8 → clear_eval-2.0.2}/src/clear_eval/pipeline/caching_utils.py +5 -1
- clear_eval-2.0.2/src/clear_eval/pipeline/config_loader.py +105 -0
- {clear_eval-1.0.8 → clear_eval-2.0.2}/src/clear_eval/pipeline/constants.py +3 -1
- {clear_eval-1.0.8 → clear_eval-2.0.2}/src/clear_eval/pipeline/eval_utils.py +257 -230
- {clear_eval-1.0.8 → clear_eval-2.0.2}/src/clear_eval/pipeline/evaluation_criteria.py +10 -2
- clear_eval-2.0.2/src/clear_eval/pipeline/external_judge.py +221 -0
- clear_eval-2.0.2/src/clear_eval/pipeline/full_pipeline.py +326 -0
- clear_eval-2.0.2/src/clear_eval/pipeline/inference_utils/endpoint_backends.py +398 -0
- clear_eval-1.0.8/src/clear_eval/pipeline/llm_chat_utils.py → clear_eval-2.0.2/src/clear_eval/pipeline/inference_utils/langchain_chat_models.py +25 -31
- clear_eval-2.0.2/src/clear_eval/pipeline/inference_utils/llm_client.py +552 -0
- clear_eval-2.0.2/src/clear_eval/pipeline/propmts.py +614 -0
- clear_eval-2.0.2/src/clear_eval/pipeline/setup/default_config.yaml +86 -0
- clear_eval-2.0.2/src/clear_eval/pipeline/use_cases/__init__.py +0 -0
- clear_eval-1.0.8/src/clear_eval/pipeline/EvalUseCase.py → clear_eval-2.0.2/src/clear_eval/pipeline/use_cases/eval_use_case.py +59 -14
- clear_eval-2.0.2/src/clear_eval/pipeline/use_cases/external_judge_use_case.py +88 -0
- clear_eval-2.0.2/src/clear_eval/pipeline/use_cases/tool_call_use_case.py +482 -0
- clear_eval-2.0.2/src/clear_eval/pipeline/use_cases/use_case_utils.py +19 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/__init__.py +0 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_results/mlflow/my_experiment/pipeline_summary.json +18 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_results/mlflow/my_experiment/traces_data/tr-006eee07eed4484592661b1bdba32a75.csv +20 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_results/mlflow/my_experiment/traces_data/tr-0e0148ed21eeebc046f03f63e4418723.csv +58 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_results/mlflow/my_experiment/traces_data/tr-0e1ef041647642c958a8aaa1892fdb88.csv +25 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_results/mlflow/my_experiment/traces_data/tr-4ae9a4305b7a0319ec516ef4eef4ae17.csv +41 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_results/mlflow/my_experiment/traces_data/tr-4eead8c00e900cc84f217a9a10724ecf.csv +30 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_results/mlflow/my_experiment/traces_data/tr-50adf266e9c1522dae57a6290a61596f.csv +61 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_results/mlflow/my_experiment/traces_data/tr-554015d661e4f69cfc629b6d46898421.csv +26 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_results/mlflow/my_experiment/traces_data/tr-55a6003784e34390f47c5c929d8f4db0.csv +59 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_results/mlflow/my_experiment/traces_data/tr-5818239708258c81fff3a4bb0b144802.csv +34 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_results/mlflow/my_experiment/traces_data/tr-5e63ae3886b225ae89a07b7fa4aafe0d.csv +11 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_results/mlflow/my_experiment/traces_data/tr-640f5750b635929a88547548f0cbb4da.csv +32 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_results/mlflow/my_experiment/traces_data/tr-6b2d02f30d4f0d3f4ca7d8f1469913ae.csv +25 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_results/mlflow/my_experiment/traces_data/tr-6c852575331f2e0a02a331d1ddaae59f.csv +52 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_results/mlflow/my_experiment/traces_data/tr-8e68becd37326e6fec6a7d3d3b47dbbb.csv +16 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_results/mlflow/my_experiment/traces_data/tr-b35ed52266fd023dd808950c6848f062.csv +206 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_results/mlflow/my_experiment/traces_data/tr-bccc245d6d47cdf730fd5db3028b52a3.csv +14 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_results/mlflow/my_experiment/traces_data/tr-d6010cdc5e36a50046fc10f33f0bc427.csv +16 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_results/mlflow/my_experiment/traces_data/tr-edadad8b3a67a24a43d145ae07c0c12a.csv +24 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_results/mlflow/my_experiment/traces_data/tr-f082801e1021022e0756e7d089f1558c.csv +18 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_results/mlflow/my_experiment/traces_data/tr-f34a9851b31fafffe527c5b2d6262de8.csv +30 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_results/mlflow/my_experiment/unified_ui_results.zip +0 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_traces/langfuse/434f3f96ac470e805428c4be45b4f2a3.json +31293 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_traces/langfuse/4c354cfb5b17f61af073df6796f2b236.json +6671 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_traces/langfuse/4deb34a4521fcedf92083d0a93fe11d4.json +6070 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_traces/langfuse/c685b7eb7826a87149bd2c42a50e47c5.json +8919 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_traces/langfuse/ebf1d6897941adb63bcc62aa7c50e8f8.json +10763 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_traces/mlflow/tr-006eee07eed4484592661b1bdba32a75.json +594 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_traces/mlflow/tr-0e0148ed21eeebc046f03f63e4418723.json +2206 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_traces/mlflow/tr-0e1ef041647642c958a8aaa1892fdb88.json +725 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_traces/mlflow/tr-4ae9a4305b7a0319ec516ef4eef4ae17.json +638 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_traces/mlflow/tr-4eead8c00e900cc84f217a9a10724ecf.json +703 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_traces/mlflow/tr-50adf266e9c1522dae57a6290a61596f.json +849 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_traces/mlflow/tr-554015d661e4f69cfc629b6d46898421.json +747 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_traces/mlflow/tr-55a6003784e34390f47c5c929d8f4db0.json +1116 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_traces/mlflow/tr-5818239708258c81fff3a4bb0b144802.json +747 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_traces/mlflow/tr-5e63ae3886b225ae89a07b7fa4aafe0d.json +696 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_traces/mlflow/tr-640f5750b635929a88547548f0cbb4da.json +973 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_traces/mlflow/tr-6b2d02f30d4f0d3f4ca7d8f1469913ae.json +674 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_traces/mlflow/tr-6c852575331f2e0a02a331d1ddaae59f.json +924 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_traces/mlflow/tr-8e68becd37326e6fec6a7d3d3b47dbbb.json +894 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_traces/mlflow/tr-b35ed52266fd023dd808950c6848f062.json +1651 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_traces/mlflow/tr-bccc245d6d47cdf730fd5db3028b52a3.json +601 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_traces/mlflow/tr-d6010cdc5e36a50046fc10f33f0bc427.json +572 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_traces/mlflow/tr-edadad8b3a67a24a43d145ae07c0c12a.json +667 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_traces/mlflow/tr-f082801e1021022e0756e7d089f1558c.json +543 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/agentic/research_agent_traces/mlflow/tr-f34a9851b31fafffe527c5b2d6262de8.json +601 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/gsm8k/__init__.py +0 -0
- clear_eval-2.0.2/src/clear_eval/sample_data/tool_calls/tool_calls_sample_data.csv +9 -0
- clear_eval-2.0.2/src/clear_eval.egg-info/PKG-INFO +248 -0
- clear_eval-2.0.2/src/clear_eval.egg-info/SOURCES.txt +121 -0
- {clear_eval-1.0.8 → clear_eval-2.0.2}/src/clear_eval.egg-info/entry_points.txt +3 -0
- clear_eval-2.0.2/src/clear_eval.egg-info/requires.txt +29 -0
- clear_eval-1.0.8/PKG-INFO +0 -236
- clear_eval-1.0.8/README.md +0 -206
- clear_eval-1.0.8/src/clear_eval/args.py +0 -51
- clear_eval-1.0.8/src/clear_eval/pipeline/config_loader.py +0 -54
- clear_eval-1.0.8/src/clear_eval/pipeline/full_pipeline.py +0 -251
- clear_eval-1.0.8/src/clear_eval/pipeline/propmts.py +0 -289
- clear_eval-1.0.8/src/clear_eval/pipeline/setup/default_config.yaml +0 -63
- clear_eval-1.0.8/src/clear_eval.egg-info/PKG-INFO +0 -236
- clear_eval-1.0.8/src/clear_eval.egg-info/SOURCES.txt +0 -34
- clear_eval-1.0.8/src/clear_eval.egg-info/requires.txt +0 -17
- {clear_eval-1.0.8 → clear_eval-2.0.2}/LICENSE +0 -0
- {clear_eval-1.0.8 → clear_eval-2.0.2}/setup.cfg +0 -0
- {clear_eval-1.0.8 → clear_eval-2.0.2}/src/clear_eval/__init__.py +0 -0
- {clear_eval-1.0.8/src/clear_eval/dashboard → clear_eval-2.0.2/src/clear_eval/agentic/pipeline/setup}/__init__.py +0 -0
- {clear_eval-1.0.8/src/clear_eval/pipeline → clear_eval-2.0.2/src/clear_eval/dashboard}/__init__.py +0 -0
- {clear_eval-1.0.8 → clear_eval-2.0.2}/src/clear_eval/load_ui.py +0 -0
- {clear_eval-1.0.8/src/clear_eval/pipeline/setup → clear_eval-2.0.2/src/clear_eval/pipeline}/__init__.py +0 -0
- {clear_eval-1.0.8/src/clear_eval/sample_data → clear_eval-2.0.2/src/clear_eval/pipeline/inference_utils}/__init__.py +0 -0
- {clear_eval-1.0.8/src/clear_eval/sample_data/gsm8k → clear_eval-2.0.2/src/clear_eval/pipeline/setup}/__init__.py +0 -0
- {clear_eval-1.0.8 → clear_eval-2.0.2}/src/clear_eval/pipeline/threading_utils.py +0 -0
- {clear_eval-1.0.8 → clear_eval-2.0.2}/src/clear_eval/sample_data/gsm8k/analysis_results_gsm8k_default.zip +0 -0
- {clear_eval-1.0.8 → clear_eval-2.0.2}/src/clear_eval/sample_data/gsm8k/gsm8k_default_predictions.csv +0 -0
- {clear_eval-1.0.8 → clear_eval-2.0.2}/src/clear_eval.egg-info/dependency_links.txt +0 -0
- {clear_eval-1.0.8 → clear_eval-2.0.2}/src/clear_eval.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: clear_eval
|
|
3
|
+
Version: 2.0.2
|
|
4
|
+
Summary: A python API sdk facilitating Error Analysis via LLM-as-a-Judge
|
|
5
|
+
Author-email: Lilach Eden <lilache@il.ibm.com>, Asaf Yehudai <asaf.yehudai@ibm.com>
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Classifier: Programming Language :: Python :: 3
|
|
8
|
+
Classifier: Operating System :: OS Independent
|
|
9
|
+
Requires-Python: >=3.10
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Requires-Dist: python-dotenv
|
|
13
|
+
Requires-Dist: langchain
|
|
14
|
+
Requires-Dist: langgraph
|
|
15
|
+
Requires-Dist: langchain_openai
|
|
16
|
+
Requires-Dist: langchain_ibm
|
|
17
|
+
Requires-Dist: ibm_watsonx_ai>=1.3.42
|
|
18
|
+
Requires-Dist: openai
|
|
19
|
+
Requires-Dist: pyyaml
|
|
20
|
+
Requires-Dist: pandas
|
|
21
|
+
Requires-Dist: tqdm
|
|
22
|
+
Requires-Dist: pyyaml
|
|
23
|
+
Requires-Dist: streamlit
|
|
24
|
+
Requires-Dist: matplotlib
|
|
25
|
+
Requires-Dist: seaborn
|
|
26
|
+
Requires-Dist: langchain_community
|
|
27
|
+
Requires-Dist: numpy
|
|
28
|
+
Requires-Dist: pyarrow>=22.0.0
|
|
29
|
+
Requires-Dist: nest-asyncio
|
|
30
|
+
Requires-Dist: nicegui>=3.7.1
|
|
31
|
+
Requires-Dist: plotly
|
|
32
|
+
Requires-Dist: networkx
|
|
33
|
+
Requires-Dist: litellm>=1.83.0
|
|
34
|
+
Requires-Dist: nest-asyncio
|
|
35
|
+
Requires-Dist: scipy
|
|
36
|
+
Requires-Dist: scikit-learn
|
|
37
|
+
Requires-Dist: botocore
|
|
38
|
+
Provides-Extra: tool-calls
|
|
39
|
+
Requires-Dist: agent-lifecycle-toolkit; extra == "tool-calls"
|
|
40
|
+
Dynamic: license-file
|
|
41
|
+
|
|
42
|
+
# CLEAR: Comprehensive LLM Error Analysis and Reporting
|
|
43
|
+
|
|
44
|
+
**CLEAR** is an open-source toolkit for **LLM error analysis** using an LLM-as-a-Judge approach.
|
|
45
|
+
|
|
46
|
+
[](https://www.python.org/downloads/)
|
|
47
|
+
[](LICENSE)
|
|
48
|
+
[](https://pypi.org/project/clear-eval/)
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## What is CLEAR?
|
|
53
|
+
|
|
54
|
+
CLEAR provides systematic error analysis for LLM-based systems. It combines automated LLM-as-a-judge evaluation with interactive dashboards to help you:
|
|
55
|
+
- Identify recurring error patterns across your dataset
|
|
56
|
+
- Quantify issue frequencies and severity
|
|
57
|
+
- Drill down into specific failure cases
|
|
58
|
+
- Prioritize improvements based on data-driven insights
|
|
59
|
+
|
|
60
|
+
CLEAR operates in two phases:
|
|
61
|
+
|
|
62
|
+
1. **Analysis** — Generates per-instance textual feedback, identifies system-level error categories, and quantifies their frequencies.
|
|
63
|
+
2. **Interactive Dashboard** — Explore aggregate visualizations, apply dynamic filters, and drill down into individual failure examples.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Two Analysis Modes
|
|
68
|
+
|
|
69
|
+
### LLM Analysis
|
|
70
|
+
|
|
71
|
+
Evaluate standard LLM outputs — generation quality, correctness, and recurring error patterns. Provide a CSV with prompts and responses, and CLEAR will score each instance, generate textual critiques, and surface system-level issues.
|
|
72
|
+
|
|
73
|
+
- **Input:** CSV with model inputs and responses
|
|
74
|
+
- **Output:** Per-record scores, evaluation text, aggregated issue categories
|
|
75
|
+
- **Dashboard:** Streamlit-based interactive explorer
|
|
76
|
+
|
|
77
|
+
> **[LLM Analysis Guide →](docs/llm-analysis.md)**
|
|
78
|
+
|
|
79
|
+
### Agentic Analysis
|
|
80
|
+
|
|
81
|
+
Evaluate multi-agent system trajectories — step-by-step agent interactions and full trajectory analysis.
|
|
82
|
+
Supports traces from LangGraph, CrewAI, and other frameworks via MLflow or Langfuse.
|
|
83
|
+
|
|
84
|
+
- **Input:** Raw JSON traces or preprocessed trajectory CSVs (each trace captures one complete agent task execution)
|
|
85
|
+
- **Output:** Per-step CLEAR analysis, trajectory-level scores, rubric evaluations
|
|
86
|
+
- **Dashboard:** NiceGUI-based workflow visualization with path and temporal analysis
|
|
87
|
+
|
|
88
|
+
> **[Agentic Workflows Guide →](src/clear_eval/agentic/README.md)**
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Installation
|
|
93
|
+
|
|
94
|
+
**Requires Python 3.10+**
|
|
95
|
+
|
|
96
|
+
#### Option 1: pip
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
pip install clear-eval
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
#### Option 2: From source (for development)
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
git clone https://github.com/IBM/CLEAR.git
|
|
106
|
+
cd CLEAR
|
|
107
|
+
python3 -m venv .venv
|
|
108
|
+
source .venv/bin/activate # On Windows: .venv\Scripts\activate
|
|
109
|
+
pip install -e .
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Verify the installation:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
run-clear-eval-analysis --help
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## Quick Start
|
|
121
|
+
|
|
122
|
+
### 1. Set your provider credentials
|
|
123
|
+
|
|
124
|
+
CLEAR requires a supported LLM provider. Set the appropriate environment variables for your provider (e.g., `OPENAI_API_KEY` for OpenAI). Adjust `--provider` and `--eval-model-name` in the commands below to match your setup. See [Provider Configuration](#provider-configuration) for details.
|
|
125
|
+
|
|
126
|
+
### 2. LLM Analysis
|
|
127
|
+
|
|
128
|
+
This evaluates GSM8K math problem responses and surfaces recurring quality issues:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
run-clear-eval-analysis --provider openai --eval-model-name gpt-4o
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Results are saved to `results/gsm8k/sample_output/`. View them:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
run-clear-eval-dashboard
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
> **[Full LLM Analysis Guide →](docs/llm-analysis.md)** — input formats, CLI arguments, configuration, Python API, and external judges.
|
|
141
|
+
|
|
142
|
+
### 3. Agentic Analysis
|
|
143
|
+
|
|
144
|
+
These two modes are independent — this section does not require step 2.
|
|
145
|
+
|
|
146
|
+
Run CLEAR on sample agent traces (3 traces, each capturing one complete agent task execution, ~2 minutes):
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
run-clear-agentic-eval \
|
|
150
|
+
--data-dir src/clear_eval/sample_data/agentic/research_agent_traces/mlflow \
|
|
151
|
+
--results-dir my_smoke_test_results \
|
|
152
|
+
--from-raw-traces true \
|
|
153
|
+
--agent-framework langgraph \
|
|
154
|
+
--observability-framework mlflow \
|
|
155
|
+
--run-name smoke_test \
|
|
156
|
+
--max-files 3 \
|
|
157
|
+
--eval-model-name gpt-4o \
|
|
158
|
+
--provider openai
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
View pre-computed results (all 20 traces) without re-running:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
run-clear-agentic-dashboard
|
|
165
|
+
# Upload: src/clear_eval/sample_data/agentic/research_agent_results/mlflow/my_experiment/unified_ui_results.zip
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
> **[Full Agentic Guide →](src/clear_eval/agentic/README.md)** — trace generation, configuration, output structure, and dashboard features.
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## Provider Configuration
|
|
173
|
+
|
|
174
|
+
CLEAR uses [LiteLLM](https://docs.litellm.ai/docs/providers) as its inference backend, supporting 100+ LLM providers (OpenAI, Anthropic, WatsonX, AWS Bedrock, Google Vertex AI, and more).
|
|
175
|
+
|
|
176
|
+
**Parameters:**
|
|
177
|
+
|
|
178
|
+
| Parameter | CLI Flag | Description |
|
|
179
|
+
|-----------|----------|-------------|
|
|
180
|
+
| `provider` | `--provider` | LiteLLM provider name (e.g., `openai`, `anthropic`, `bedrock`, `vertex_ai`) |
|
|
181
|
+
| `eval_model_name` | `--eval-model-name` | Model identifier (e.g., `gpt-4o`, `claude-3-5-sonnet-20241022`) |
|
|
182
|
+
| `eval_model_params` | `--eval-model-params` | Additional model parameters as JSON (e.g., `{"temperature": 0}`) |
|
|
183
|
+
| `endpoint_url` | `--endpoint-url` | Custom endpoint URL for local/self-hosted models |
|
|
184
|
+
|
|
185
|
+
**Cloud provider example:**
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
export OPENAI_API_KEY="..."
|
|
189
|
+
run-clear-eval-analysis --provider openai --eval-model-name gpt-4o
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
**Local model example (vLLM, llama.cpp, Ollama, etc.):**
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
run-clear-eval-analysis \
|
|
196
|
+
--provider openai \
|
|
197
|
+
--eval-model-name my-local-model \
|
|
198
|
+
--endpoint-url http://localhost:8000/v1
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
No credentials are needed when using `--endpoint-url` with a local server.
|
|
202
|
+
|
|
203
|
+
Set the required environment variables for your provider according to [LiteLLM's documentation](https://docs.litellm.ai/docs/providers).
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## Documentation
|
|
208
|
+
|
|
209
|
+
| Guide | Description |
|
|
210
|
+
|-------|-------------|
|
|
211
|
+
| [**Agentic Workflows Guide**](src/clear_eval/agentic/README.md) | Multi-agent evaluation — trace preprocessing, step-by-step and trajectory analysis, configuration reference |
|
|
212
|
+
| [**Agentic Dashboard Guide**](docs/agentic/dashboard.md) | Dashboard features — workflow view, node analysis, trajectory explorer, path and temporal analysis |
|
|
213
|
+
| [**LLM Analysis Guide**](docs/llm-analysis.md) | Full pipeline reference — input formats, CLI arguments, configuration, and external judges |
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## Citation
|
|
218
|
+
|
|
219
|
+
If you use CLEAR in your research, please cite the relevant paper(s):
|
|
220
|
+
|
|
221
|
+
**LLM Analysis** ([AAAI 2026](https://ojs.aaai.org/index.php/AAAI/article/view/42398)):
|
|
222
|
+
```bibtex
|
|
223
|
+
@inproceedings{yehudai2026clear,
|
|
224
|
+
title={CLEAR: Error analysis via llm-as-a-judge made easy},
|
|
225
|
+
author={Yehudai, Asaf and Eden, Lilach and Perlitz, Yotam and Bar-Haim, Roy and Shmueli-Scheuer, Michal},
|
|
226
|
+
booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
|
|
227
|
+
volume={40},
|
|
228
|
+
number={48},
|
|
229
|
+
pages={41736--41738},
|
|
230
|
+
year={2026}
|
|
231
|
+
}
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
**Agentic Analysis** (ACL 2026, to appear — [preprint](https://arxiv.org/abs/2605.22608)):
|
|
235
|
+
```bibtex
|
|
236
|
+
@article{yehudai2026agentic,
|
|
237
|
+
title={Agentic CLEAR: Automating Multi-Level Evaluation of LLM Agents},
|
|
238
|
+
author={Yehudai, Asaf and Eden, Lilach and Shmueli-Scheuer, Michal},
|
|
239
|
+
journal={arXiv preprint arXiv:2605.22608},
|
|
240
|
+
year={2026}
|
|
241
|
+
}
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
## License
|
|
247
|
+
|
|
248
|
+
Apache 2.0 — see [LICENSE](LICENSE) for details.
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
# CLEAR: Comprehensive LLM Error Analysis and Reporting
|
|
2
|
+
|
|
3
|
+
**CLEAR** is an open-source toolkit for **LLM error analysis** using an LLM-as-a-Judge approach.
|
|
4
|
+
|
|
5
|
+
[](https://www.python.org/downloads/)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
[](https://pypi.org/project/clear-eval/)
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## What is CLEAR?
|
|
12
|
+
|
|
13
|
+
CLEAR provides systematic error analysis for LLM-based systems. It combines automated LLM-as-a-judge evaluation with interactive dashboards to help you:
|
|
14
|
+
- Identify recurring error patterns across your dataset
|
|
15
|
+
- Quantify issue frequencies and severity
|
|
16
|
+
- Drill down into specific failure cases
|
|
17
|
+
- Prioritize improvements based on data-driven insights
|
|
18
|
+
|
|
19
|
+
CLEAR operates in two phases:
|
|
20
|
+
|
|
21
|
+
1. **Analysis** — Generates per-instance textual feedback, identifies system-level error categories, and quantifies their frequencies.
|
|
22
|
+
2. **Interactive Dashboard** — Explore aggregate visualizations, apply dynamic filters, and drill down into individual failure examples.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Two Analysis Modes
|
|
27
|
+
|
|
28
|
+
### LLM Analysis
|
|
29
|
+
|
|
30
|
+
Evaluate standard LLM outputs — generation quality, correctness, and recurring error patterns. Provide a CSV with prompts and responses, and CLEAR will score each instance, generate textual critiques, and surface system-level issues.
|
|
31
|
+
|
|
32
|
+
- **Input:** CSV with model inputs and responses
|
|
33
|
+
- **Output:** Per-record scores, evaluation text, aggregated issue categories
|
|
34
|
+
- **Dashboard:** Streamlit-based interactive explorer
|
|
35
|
+
|
|
36
|
+
> **[LLM Analysis Guide →](docs/llm-analysis.md)**
|
|
37
|
+
|
|
38
|
+
### Agentic Analysis
|
|
39
|
+
|
|
40
|
+
Evaluate multi-agent system trajectories — step-by-step agent interactions and full trajectory analysis.
|
|
41
|
+
Supports traces from LangGraph, CrewAI, and other frameworks via MLflow or Langfuse.
|
|
42
|
+
|
|
43
|
+
- **Input:** Raw JSON traces or preprocessed trajectory CSVs (each trace captures one complete agent task execution)
|
|
44
|
+
- **Output:** Per-step CLEAR analysis, trajectory-level scores, rubric evaluations
|
|
45
|
+
- **Dashboard:** NiceGUI-based workflow visualization with path and temporal analysis
|
|
46
|
+
|
|
47
|
+
> **[Agentic Workflows Guide →](src/clear_eval/agentic/README.md)**
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Installation
|
|
52
|
+
|
|
53
|
+
**Requires Python 3.10+**
|
|
54
|
+
|
|
55
|
+
#### Option 1: pip
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
pip install clear-eval
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
#### Option 2: From source (for development)
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
git clone https://github.com/IBM/CLEAR.git
|
|
65
|
+
cd CLEAR
|
|
66
|
+
python3 -m venv .venv
|
|
67
|
+
source .venv/bin/activate # On Windows: .venv\Scripts\activate
|
|
68
|
+
pip install -e .
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Verify the installation:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
run-clear-eval-analysis --help
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Quick Start
|
|
80
|
+
|
|
81
|
+
### 1. Set your provider credentials
|
|
82
|
+
|
|
83
|
+
CLEAR requires a supported LLM provider. Set the appropriate environment variables for your provider (e.g., `OPENAI_API_KEY` for OpenAI). Adjust `--provider` and `--eval-model-name` in the commands below to match your setup. See [Provider Configuration](#provider-configuration) for details.
|
|
84
|
+
|
|
85
|
+
### 2. LLM Analysis
|
|
86
|
+
|
|
87
|
+
This evaluates GSM8K math problem responses and surfaces recurring quality issues:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
run-clear-eval-analysis --provider openai --eval-model-name gpt-4o
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Results are saved to `results/gsm8k/sample_output/`. View them:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
run-clear-eval-dashboard
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
> **[Full LLM Analysis Guide →](docs/llm-analysis.md)** — input formats, CLI arguments, configuration, Python API, and external judges.
|
|
100
|
+
|
|
101
|
+
### 3. Agentic Analysis
|
|
102
|
+
|
|
103
|
+
These two modes are independent — this section does not require step 2.
|
|
104
|
+
|
|
105
|
+
Run CLEAR on sample agent traces (3 traces, each capturing one complete agent task execution, ~2 minutes):
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
run-clear-agentic-eval \
|
|
109
|
+
--data-dir src/clear_eval/sample_data/agentic/research_agent_traces/mlflow \
|
|
110
|
+
--results-dir my_smoke_test_results \
|
|
111
|
+
--from-raw-traces true \
|
|
112
|
+
--agent-framework langgraph \
|
|
113
|
+
--observability-framework mlflow \
|
|
114
|
+
--run-name smoke_test \
|
|
115
|
+
--max-files 3 \
|
|
116
|
+
--eval-model-name gpt-4o \
|
|
117
|
+
--provider openai
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
View pre-computed results (all 20 traces) without re-running:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
run-clear-agentic-dashboard
|
|
124
|
+
# Upload: src/clear_eval/sample_data/agentic/research_agent_results/mlflow/my_experiment/unified_ui_results.zip
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
> **[Full Agentic Guide →](src/clear_eval/agentic/README.md)** — trace generation, configuration, output structure, and dashboard features.
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## Provider Configuration
|
|
132
|
+
|
|
133
|
+
CLEAR uses [LiteLLM](https://docs.litellm.ai/docs/providers) as its inference backend, supporting 100+ LLM providers (OpenAI, Anthropic, WatsonX, AWS Bedrock, Google Vertex AI, and more).
|
|
134
|
+
|
|
135
|
+
**Parameters:**
|
|
136
|
+
|
|
137
|
+
| Parameter | CLI Flag | Description |
|
|
138
|
+
|-----------|----------|-------------|
|
|
139
|
+
| `provider` | `--provider` | LiteLLM provider name (e.g., `openai`, `anthropic`, `bedrock`, `vertex_ai`) |
|
|
140
|
+
| `eval_model_name` | `--eval-model-name` | Model identifier (e.g., `gpt-4o`, `claude-3-5-sonnet-20241022`) |
|
|
141
|
+
| `eval_model_params` | `--eval-model-params` | Additional model parameters as JSON (e.g., `{"temperature": 0}`) |
|
|
142
|
+
| `endpoint_url` | `--endpoint-url` | Custom endpoint URL for local/self-hosted models |
|
|
143
|
+
|
|
144
|
+
**Cloud provider example:**
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
export OPENAI_API_KEY="..."
|
|
148
|
+
run-clear-eval-analysis --provider openai --eval-model-name gpt-4o
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
**Local model example (vLLM, llama.cpp, Ollama, etc.):**
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
run-clear-eval-analysis \
|
|
155
|
+
--provider openai \
|
|
156
|
+
--eval-model-name my-local-model \
|
|
157
|
+
--endpoint-url http://localhost:8000/v1
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
No credentials are needed when using `--endpoint-url` with a local server.
|
|
161
|
+
|
|
162
|
+
Set the required environment variables for your provider according to [LiteLLM's documentation](https://docs.litellm.ai/docs/providers).
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## Documentation
|
|
167
|
+
|
|
168
|
+
| Guide | Description |
|
|
169
|
+
|-------|-------------|
|
|
170
|
+
| [**Agentic Workflows Guide**](src/clear_eval/agentic/README.md) | Multi-agent evaluation — trace preprocessing, step-by-step and trajectory analysis, configuration reference |
|
|
171
|
+
| [**Agentic Dashboard Guide**](docs/agentic/dashboard.md) | Dashboard features — workflow view, node analysis, trajectory explorer, path and temporal analysis |
|
|
172
|
+
| [**LLM Analysis Guide**](docs/llm-analysis.md) | Full pipeline reference — input formats, CLI arguments, configuration, and external judges |
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## Citation
|
|
177
|
+
|
|
178
|
+
If you use CLEAR in your research, please cite the relevant paper(s):
|
|
179
|
+
|
|
180
|
+
**LLM Analysis** ([AAAI 2026](https://ojs.aaai.org/index.php/AAAI/article/view/42398)):
|
|
181
|
+
```bibtex
|
|
182
|
+
@inproceedings{yehudai2026clear,
|
|
183
|
+
title={CLEAR: Error analysis via llm-as-a-judge made easy},
|
|
184
|
+
author={Yehudai, Asaf and Eden, Lilach and Perlitz, Yotam and Bar-Haim, Roy and Shmueli-Scheuer, Michal},
|
|
185
|
+
booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
|
|
186
|
+
volume={40},
|
|
187
|
+
number={48},
|
|
188
|
+
pages={41736--41738},
|
|
189
|
+
year={2026}
|
|
190
|
+
}
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
**Agentic Analysis** (ACL 2026, to appear — [preprint](https://arxiv.org/abs/2605.22608)):
|
|
194
|
+
```bibtex
|
|
195
|
+
@article{yehudai2026agentic,
|
|
196
|
+
title={Agentic CLEAR: Automating Multi-Level Evaluation of LLM Agents},
|
|
197
|
+
author={Yehudai, Asaf and Eden, Lilach and Shmueli-Scheuer, Michal},
|
|
198
|
+
journal={arXiv preprint arXiv:2605.22608},
|
|
199
|
+
year={2026}
|
|
200
|
+
}
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## License
|
|
206
|
+
|
|
207
|
+
Apache 2.0 — see [LICENSE](LICENSE) for details.
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "clear_eval"
|
|
7
|
-
version = "
|
|
7
|
+
version = "2.0.2"
|
|
8
8
|
description = "A python API sdk facilitating Error Analysis via LLM-as-a-Judge"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
authors = [{ name = "Lilach Eden", email = "lilache@il.ibm.com"},
|
|
@@ -14,13 +14,15 @@ classifiers = [
|
|
|
14
14
|
"Programming Language :: Python :: 3",
|
|
15
15
|
"Operating System :: OS Independent",
|
|
16
16
|
]
|
|
17
|
+
requires-python = ">=3.10"
|
|
18
|
+
|
|
17
19
|
dependencies = [
|
|
18
20
|
"python-dotenv",
|
|
19
21
|
"langchain",
|
|
20
22
|
"langgraph",
|
|
21
23
|
"langchain_openai",
|
|
22
24
|
"langchain_ibm",
|
|
23
|
-
"ibm_watsonx_ai>=1.
|
|
25
|
+
"ibm_watsonx_ai>=1.3.42",
|
|
24
26
|
"openai",
|
|
25
27
|
"pyyaml",
|
|
26
28
|
"pandas",
|
|
@@ -31,9 +33,22 @@ dependencies = [
|
|
|
31
33
|
"seaborn",
|
|
32
34
|
"langchain_community",
|
|
33
35
|
"numpy",
|
|
34
|
-
"pyarrow>=
|
|
36
|
+
"pyarrow>=22.0.0",
|
|
37
|
+
"nest-asyncio",
|
|
38
|
+
"nicegui>=3.7.1",
|
|
39
|
+
"plotly",
|
|
40
|
+
"networkx",
|
|
41
|
+
"litellm>=1.83.0",
|
|
42
|
+
"nest-asyncio",
|
|
43
|
+
"scipy",
|
|
44
|
+
'scikit-learn',
|
|
45
|
+
"botocore"
|
|
46
|
+
]
|
|
47
|
+
|
|
48
|
+
[project.optional-dependencies]
|
|
49
|
+
tool-calls = [
|
|
50
|
+
"agent-lifecycle-toolkit"
|
|
35
51
|
]
|
|
36
|
-
requires-python = ">=3.10"
|
|
37
52
|
|
|
38
53
|
[tool.setuptools]
|
|
39
54
|
include-package-data = true
|
|
@@ -55,3 +70,6 @@ run-clear-eval-generation = "clear_eval.cli:run_generation_cli"
|
|
|
55
70
|
run-clear-eval-evaluation = "clear_eval.cli:run_evaluation_cli"
|
|
56
71
|
run-clear-eval-aggregation = "clear_eval.cli:run_aggregation_cli"
|
|
57
72
|
run-clear-eval-dashboard = "clear_eval.cli:run_dashboard_cli"
|
|
73
|
+
run-clear-agentic-eval = "clear_eval.cli:run_clear_agentic_eval"
|
|
74
|
+
launch-agentic-dashboard = "clear_eval.cli:run_clear_agentic_dashboard"
|
|
75
|
+
run-clear-agentic-dashboard = "clear_eval.cli:run_clear_agentic_dashboard"
|