strands-agents-evals 0.1.0__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.
- strands_agents_evals-0.1.0.dist-info/METADATA +408 -0
- strands_agents_evals-0.1.0.dist-info/RECORD +68 -0
- strands_agents_evals-0.1.0.dist-info/WHEEL +4 -0
- strands_agents_evals-0.1.0.dist-info/licenses/LICENSE +175 -0
- strands_agents_evals-0.1.0.dist-info/licenses/NOTICE +1 -0
- strands_evals/__init__.py +22 -0
- strands_evals/case.py +53 -0
- strands_evals/display/display_console.py +150 -0
- strands_evals/evaluators/__init__.py +23 -0
- strands_evals/evaluators/evaluator.py +182 -0
- strands_evals/evaluators/faithfulness_evaluator.py +116 -0
- strands_evals/evaluators/goal_success_rate_evaluator.py +90 -0
- strands_evals/evaluators/harmfulness_evaluator.py +135 -0
- strands_evals/evaluators/helpfulness_evaluator.py +148 -0
- strands_evals/evaluators/interactions_evaluator.py +244 -0
- strands_evals/evaluators/output_evaluator.py +72 -0
- strands_evals/evaluators/prompt_templates/case_prompt_template.py +63 -0
- strands_evals/evaluators/prompt_templates/faithfulness/__init__.py +11 -0
- strands_evals/evaluators/prompt_templates/faithfulness/faithfulness_v0.py +30 -0
- strands_evals/evaluators/prompt_templates/goal_success_rate/__init__.py +11 -0
- strands_evals/evaluators/prompt_templates/goal_success_rate/goal_success_rate_v0.py +17 -0
- strands_evals/evaluators/prompt_templates/harmfulness/__init__.py +11 -0
- strands_evals/evaluators/prompt_templates/harmfulness/harmfulness_v0.py +8 -0
- strands_evals/evaluators/prompt_templates/helpfulness/__init__.py +11 -0
- strands_evals/evaluators/prompt_templates/helpfulness/helpfulness_v0.py +38 -0
- strands_evals/evaluators/prompt_templates/prompt_templates.py +176 -0
- strands_evals/evaluators/prompt_templates/tool_parameter_accuracy/__init__.py +11 -0
- strands_evals/evaluators/prompt_templates/tool_parameter_accuracy/tool_parameter_accuracy_v0.py +40 -0
- strands_evals/evaluators/prompt_templates/tool_selection_accuracy/__init__.py +11 -0
- strands_evals/evaluators/prompt_templates/tool_selection_accuracy/tool_selection_accuracy_v0.py +23 -0
- strands_evals/evaluators/tool_parameter_accuracy_evaluator.py +112 -0
- strands_evals/evaluators/tool_selection_accuracy_evaluator.py +112 -0
- strands_evals/evaluators/trajectory_evaluator.py +100 -0
- strands_evals/experiment.py +652 -0
- strands_evals/extractors/__init__.py +3 -0
- strands_evals/extractors/graph_extractor.py +30 -0
- strands_evals/extractors/swarm_extractor.py +73 -0
- strands_evals/extractors/tools_use_extractor.py +164 -0
- strands_evals/extractors/trace_extractor.py +166 -0
- strands_evals/generators/__init__.py +3 -0
- strands_evals/generators/experiment_generator.py +498 -0
- strands_evals/generators/prompt_template/prompt_templates.py +75 -0
- strands_evals/generators/topic_planner.py +60 -0
- strands_evals/mappers/__init__.py +6 -0
- strands_evals/mappers/session_mapper.py +27 -0
- strands_evals/mappers/strands_in_memory_session_mapper.py +473 -0
- strands_evals/simulation/README.md +323 -0
- strands_evals/simulation/__init__.py +6 -0
- strands_evals/simulation/actor_simulator.py +292 -0
- strands_evals/simulation/profiles/__init__.py +5 -0
- strands_evals/simulation/profiles/actor_profile.py +26 -0
- strands_evals/simulation/prompt_templates/__init__.py +11 -0
- strands_evals/simulation/prompt_templates/actor_profile_extraction.py +25 -0
- strands_evals/simulation/prompt_templates/actor_system_prompt.py +64 -0
- strands_evals/simulation/prompt_templates/goal_completion.py +27 -0
- strands_evals/simulation/tools/__init__.py +5 -0
- strands_evals/simulation/tools/goal_completion.py +93 -0
- strands_evals/telemetry/__init__.py +15 -0
- strands_evals/telemetry/_cloudwatch_logger.py +209 -0
- strands_evals/telemetry/config.py +207 -0
- strands_evals/telemetry/tracer.py +38 -0
- strands_evals/tools/evaluation_tools.py +67 -0
- strands_evals/types/__init__.py +11 -0
- strands_evals/types/evaluation.py +105 -0
- strands_evals/types/evaluation_report.py +244 -0
- strands_evals/types/simulation/__init__.py +5 -0
- strands_evals/types/simulation/actor.py +34 -0
- strands_evals/types/trace.py +205 -0
|
@@ -0,0 +1,408 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: strands-agents-evals
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Evaluation framework for Strands
|
|
5
|
+
Author-email: AWS <opensource@amazon.com>
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
License-File: NOTICE
|
|
9
|
+
Requires-Python: >=3.10
|
|
10
|
+
Requires-Dist: boto3>=1.26.0
|
|
11
|
+
Requires-Dist: opentelemetry-api>=1.20.0
|
|
12
|
+
Requires-Dist: opentelemetry-instrumentation-threading<1.00b0,>=0.51b0
|
|
13
|
+
Requires-Dist: opentelemetry-sdk>=1.20.0
|
|
14
|
+
Requires-Dist: pydantic<3.0.0,>=2.0.0
|
|
15
|
+
Requires-Dist: rich<15.0.0,>=14.0.0
|
|
16
|
+
Requires-Dist: strands-agents-tools<1.0.0,>=0.1.0
|
|
17
|
+
Requires-Dist: strands-agents>=1.0.0
|
|
18
|
+
Requires-Dist: typing-extensions>=4.0
|
|
19
|
+
Provides-Extra: dev
|
|
20
|
+
Requires-Dist: hatch<2.0.0,>=1.0.0; extra == 'dev'
|
|
21
|
+
Requires-Dist: mypy<2.0.0,>=1.15.0; extra == 'dev'
|
|
22
|
+
Requires-Dist: pre-commit<4.6.0,>=3.2.0; extra == 'dev'
|
|
23
|
+
Requires-Dist: ruff<0.15.0,>=0.13.0; extra == 'dev'
|
|
24
|
+
Provides-Extra: otel
|
|
25
|
+
Requires-Dist: opentelemetry-exporter-otlp-proto-http<2.0.0,>=1.30.0; extra == 'otel'
|
|
26
|
+
Provides-Extra: test
|
|
27
|
+
Requires-Dist: pytest-asyncio<1.4.0,>=1.0.0; extra == 'test'
|
|
28
|
+
Requires-Dist: pytest-cov<8.0.0,>=7.0.0; extra == 'test'
|
|
29
|
+
Requires-Dist: pytest-xdist<4.0.0,>=3.0.0; extra == 'test'
|
|
30
|
+
Requires-Dist: pytest<10.0.0,>=8.0.0; extra == 'test'
|
|
31
|
+
Description-Content-Type: text/markdown
|
|
32
|
+
|
|
33
|
+
<div align="center">
|
|
34
|
+
<div>
|
|
35
|
+
<a href="https://strandsagents.com">
|
|
36
|
+
<img src="https://strandsagents.com/latest/assets/logo-github.svg" alt="Strands Agents" width="55px" height="105px">
|
|
37
|
+
</a>
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
<h1>
|
|
41
|
+
Strands Evals SDK
|
|
42
|
+
</h1>
|
|
43
|
+
<h2>
|
|
44
|
+
A comprehensive evaluation framework for AI agents and LLM applications.
|
|
45
|
+
</h2>
|
|
46
|
+
|
|
47
|
+
<div align="center">
|
|
48
|
+
<a href="https://github.com/strands-agents/evals/graphs/commit-activity"><img alt="GitHub commit activity" src="https://img.shields.io/github/commit-activity/m/strands-agents/evals"/></a>
|
|
49
|
+
<a href="https://github.com/strands-agents/evals/issues"><img alt="GitHub open issues" src="https://img.shields.io/github/issues/strands-agents/evals"/></a>
|
|
50
|
+
<a href="https://github.com/strands-agents/evals/pulls"><img alt="GitHub open pull requests" src="https://img.shields.io/github/issues-pr/strands-agents/evals"/></a>
|
|
51
|
+
<a href="https://github.com/strands-agents/evals/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/github/license/strands-agents/evals"/></a>
|
|
52
|
+
<a href="https://pypi.org/project/strands-agents-evals/"><img alt="PyPI version" src="https://img.shields.io/pypi/v/strands-agents-evals"/></a>
|
|
53
|
+
<a href="https://python.org"><img alt="Python versions" src="https://img.shields.io/pypi/pyversions/strands-agents-evals"/></a>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<p>
|
|
57
|
+
<a href="https://strandsagents.com/">Documentation</a>
|
|
58
|
+
◆ <a href="https://github.com/strands-agents/samples">Samples</a>
|
|
59
|
+
◆ <a href="https://github.com/strands-agents/sdk-python">Python SDK</a>
|
|
60
|
+
◆ <a href="https://github.com/strands-agents/sdk-typescript">Typescript SDK</a>
|
|
61
|
+
◆ <a href="https://github.com/strands-agents/tools">Tools</a>
|
|
62
|
+
◆ <a href="https://github.com/strands-agents/evals">Evaluations</a>
|
|
63
|
+
</p>
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
|
+
Strands Evaluation is a powerful framework for evaluating AI agents and LLM applications. From simple output validation to complex multi-agent interaction analysis, trajectory evaluation, and automated experiment generation, Strands Evaluation provides comprehensive tools to measure and improve your AI systems.
|
|
67
|
+
|
|
68
|
+
## Feature Overview
|
|
69
|
+
|
|
70
|
+
- **Multiple Evaluation Types**: Output evaluation, trajectory analysis, tool usage assessment, and interaction evaluation
|
|
71
|
+
- **LLM-as-a-Judge**: Built-in evaluators using language models for sophisticated assessment with structured scoring
|
|
72
|
+
- **Trace-based Evaluation**: Analyze agent behavior through OpenTelemetry execution traces
|
|
73
|
+
- **Automated Experiment Generation**: Generate comprehensive test suites from context descriptions
|
|
74
|
+
- **Custom Evaluators**: Extensible framework for domain-specific evaluation logic
|
|
75
|
+
- **Experiment Management**: Save, load, and version your evaluation experiments with JSON serialization
|
|
76
|
+
- **Built-in Scoring Tools**: Helper functions for exact, in-order, and any-order trajectory matching
|
|
77
|
+
|
|
78
|
+
## Quick Start
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
# Install Strands Evals SDK
|
|
82
|
+
pip install strands-agents-evals
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
```python
|
|
86
|
+
from strands import Agent
|
|
87
|
+
from strands_evals import Case, Experiment
|
|
88
|
+
from strands_evals.evaluators import OutputEvaluator
|
|
89
|
+
|
|
90
|
+
# Create test cases
|
|
91
|
+
test_cases = [
|
|
92
|
+
Case[str, str](
|
|
93
|
+
name="knowledge-1",
|
|
94
|
+
input="What is the capital of France?",
|
|
95
|
+
expected_output="The capital of France is Paris.",
|
|
96
|
+
metadata={"category": "knowledge"}
|
|
97
|
+
)
|
|
98
|
+
]
|
|
99
|
+
|
|
100
|
+
# Create evaluators with custom rubric
|
|
101
|
+
evaluators = [
|
|
102
|
+
OutputEvaluator(
|
|
103
|
+
rubric="""
|
|
104
|
+
Evaluate based on:
|
|
105
|
+
1. Accuracy - Is the information correct?
|
|
106
|
+
2. Completeness - Does it fully answer the question?
|
|
107
|
+
3. Clarity - Is it easy to understand?
|
|
108
|
+
|
|
109
|
+
Score 1.0 if all criteria are met excellently.
|
|
110
|
+
Score 0.5 if some criteria are partially met.
|
|
111
|
+
Score 0.0 if the response is inadequate.
|
|
112
|
+
"""
|
|
113
|
+
)
|
|
114
|
+
]
|
|
115
|
+
|
|
116
|
+
# Create experiment and run evaluation
|
|
117
|
+
experiment = Experiment[str, str](cases=test_cases, evaluators=evaluators)
|
|
118
|
+
|
|
119
|
+
def get_response(case: Case) -> str:
|
|
120
|
+
agent = Agent(callback_handler=None)
|
|
121
|
+
return str(agent(case.input))
|
|
122
|
+
|
|
123
|
+
# Run evaluations
|
|
124
|
+
reports = experiment.run_evaluations(get_response)
|
|
125
|
+
reports[0].run_display()
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Installation
|
|
129
|
+
|
|
130
|
+
Ensure you have Python 3.10+ installed, then:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
# Create and activate virtual environment
|
|
134
|
+
python -m venv .venv
|
|
135
|
+
source .venv/bin/activate # On Windows use: .venv\Scripts\activate
|
|
136
|
+
|
|
137
|
+
# Install in development mode
|
|
138
|
+
pip install -e .
|
|
139
|
+
|
|
140
|
+
# Install with test dependencies
|
|
141
|
+
pip install -e ".[test]"
|
|
142
|
+
|
|
143
|
+
# Install with both test and dev dependencies
|
|
144
|
+
pip install -e ".[test,dev]"
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## Features at a Glance
|
|
148
|
+
|
|
149
|
+
### Output Evaluation with Custom Rubrics
|
|
150
|
+
|
|
151
|
+
Evaluate agent responses using LLM-as-a-judge with flexible scoring criteria:
|
|
152
|
+
|
|
153
|
+
```python
|
|
154
|
+
from strands_evals.evaluators import OutputEvaluator
|
|
155
|
+
|
|
156
|
+
evaluator = OutputEvaluator(
|
|
157
|
+
rubric="Score 1.0 for accurate, complete responses. Score 0.5 for partial answers. Score 0.0 for incorrect or unhelpful responses.",
|
|
158
|
+
include_inputs=True, # Include context in evaluation
|
|
159
|
+
model="us.anthropic.claude-sonnet-4-20250514-v1:0" # Custom judge model
|
|
160
|
+
)
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### Trajectory Evaluation with Built-in Scoring
|
|
164
|
+
|
|
165
|
+
Analyze agent tool usage and action sequences with helper scoring functions:
|
|
166
|
+
|
|
167
|
+
```python
|
|
168
|
+
from strands_evals.evaluators import TrajectoryEvaluator
|
|
169
|
+
from strands_evals.extractors import tools_use_extractor
|
|
170
|
+
from strands_tools import calculator
|
|
171
|
+
|
|
172
|
+
def get_response_with_tools(case: Case) -> dict:
|
|
173
|
+
agent = Agent(tools=[calculator])
|
|
174
|
+
response = agent(case.input)
|
|
175
|
+
|
|
176
|
+
# Extract trajectory efficiently to prevent context overflow
|
|
177
|
+
trajectory = tools_use_extractor.extract_agent_tools_used_from_messages(agent.messages)
|
|
178
|
+
|
|
179
|
+
# Update evaluator with tool descriptions
|
|
180
|
+
evaluator.update_trajectory_description(
|
|
181
|
+
tools_use_extractor.extract_tools_description(agent, is_short=True)
|
|
182
|
+
)
|
|
183
|
+
|
|
184
|
+
return {"output": str(response), "trajectory": trajectory}
|
|
185
|
+
|
|
186
|
+
# Evaluator includes built-in scoring tools: exact_match_scorer, in_order_match_scorer, any_order_match_scorer
|
|
187
|
+
evaluator = TrajectoryEvaluator(
|
|
188
|
+
rubric="Score 1.0 if correct tools used in proper sequence. Use scoring tools to verify trajectory matches."
|
|
189
|
+
)
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### Trace-based Helpfulness Evaluation
|
|
193
|
+
|
|
194
|
+
Evaluate agent helpfulness using OpenTelemetry traces with seven-level scoring:
|
|
195
|
+
|
|
196
|
+
```python
|
|
197
|
+
from strands_evals.evaluators import HelpfulnessEvaluator
|
|
198
|
+
from strands_evals.telemetry import StrandsEvalsTelemetry
|
|
199
|
+
from strands_evals.mappers import StrandsInMemorySessionMapper
|
|
200
|
+
|
|
201
|
+
# Setup telemetry for trace capture
|
|
202
|
+
telemetry = StrandsEvalsTelemetry().setup_in_memory_exporter()
|
|
203
|
+
|
|
204
|
+
def user_task_function(case: Case) -> dict:
|
|
205
|
+
telemetry.memory_exporter.clear()
|
|
206
|
+
|
|
207
|
+
agent = Agent(
|
|
208
|
+
trace_attributes={"session.id": case.session_id},
|
|
209
|
+
callback_handler=None
|
|
210
|
+
)
|
|
211
|
+
response = agent(case.input)
|
|
212
|
+
|
|
213
|
+
# Map spans to session for evaluation
|
|
214
|
+
spans = telemetry.memory_exporter.get_finished_spans()
|
|
215
|
+
mapper = StrandsInMemorySessionMapper()
|
|
216
|
+
session = mapper.map_to_session(spans, session_id=case.session_id)
|
|
217
|
+
|
|
218
|
+
return {"output": str(response), "trajectory": session}
|
|
219
|
+
|
|
220
|
+
# Seven-level scoring: Not helpful (0.0) to Above and beyond (1.0)
|
|
221
|
+
evaluators = [HelpfulnessEvaluator()]
|
|
222
|
+
experiment = Experiment[str, str](cases=test_cases, evaluators=evaluators)
|
|
223
|
+
|
|
224
|
+
# Run evaluations
|
|
225
|
+
reports = experiment.run_evaluations(user_task_function)
|
|
226
|
+
reports[0].run_display()
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
### Automated Experiment Generation
|
|
230
|
+
|
|
231
|
+
Generate comprehensive test suites automatically from context descriptions:
|
|
232
|
+
|
|
233
|
+
```python
|
|
234
|
+
from strands_evals.generators import ExperimentGenerator
|
|
235
|
+
from strands_evals.evaluators import TrajectoryEvaluator
|
|
236
|
+
|
|
237
|
+
# Define available tools and context
|
|
238
|
+
tool_context = """
|
|
239
|
+
Available tools:
|
|
240
|
+
- calculator(expression: str) -> float: Evaluate mathematical expressions
|
|
241
|
+
- web_search(query: str) -> str: Search the web for information
|
|
242
|
+
- file_read(path: str) -> str: Read file contents
|
|
243
|
+
"""
|
|
244
|
+
|
|
245
|
+
# Generate experiment with multiple test cases
|
|
246
|
+
generator = ExperimentGenerator[str, str](str, str)
|
|
247
|
+
experiment = await generator.from_context_async(
|
|
248
|
+
context=tool_context,
|
|
249
|
+
num_cases=10,
|
|
250
|
+
evaluator=TrajectoryEvaluator,
|
|
251
|
+
task_description="Math and research assistant with tool usage",
|
|
252
|
+
num_topics=3 # Distribute cases across multiple topics
|
|
253
|
+
)
|
|
254
|
+
|
|
255
|
+
# Save generated experiment
|
|
256
|
+
experiment.to_file("generated_experiment", "json")
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
### Custom Evaluators with Structured Output
|
|
260
|
+
|
|
261
|
+
Create domain-specific evaluation logic with standardized output format:
|
|
262
|
+
|
|
263
|
+
```python
|
|
264
|
+
from strands_evals.evaluators import Evaluator
|
|
265
|
+
from strands_evals.types import EvaluationData, EvaluationOutput
|
|
266
|
+
|
|
267
|
+
class PolicyComplianceEvaluator(Evaluator[str, str]):
|
|
268
|
+
def evaluate(self, evaluation_case: EvaluationData[str, str]) -> EvaluationOutput:
|
|
269
|
+
# Custom evaluation logic
|
|
270
|
+
response = evaluation_case.actual_output
|
|
271
|
+
|
|
272
|
+
# Check for policy violations
|
|
273
|
+
violations = self._check_policy_violations(response)
|
|
274
|
+
|
|
275
|
+
if not violations:
|
|
276
|
+
return EvaluationOutput(
|
|
277
|
+
score=1.0,
|
|
278
|
+
test_pass=True,
|
|
279
|
+
reason="Response complies with all policies",
|
|
280
|
+
label="compliant"
|
|
281
|
+
)
|
|
282
|
+
else:
|
|
283
|
+
return EvaluationOutput(
|
|
284
|
+
score=0.0,
|
|
285
|
+
test_pass=False,
|
|
286
|
+
reason=f"Policy violations: {', '.join(violations)}",
|
|
287
|
+
label="non_compliant"
|
|
288
|
+
)
|
|
289
|
+
|
|
290
|
+
def _check_policy_violations(self, response: str) -> list[str]:
|
|
291
|
+
# Implementation details...
|
|
292
|
+
return []
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
### Tool Usage and Parameter Evaluation
|
|
296
|
+
|
|
297
|
+
Evaluate specific aspects of tool usage with specialized evaluators:
|
|
298
|
+
|
|
299
|
+
```python
|
|
300
|
+
from strands_evals.evaluators import ToolSelectionAccuracyEvaluator, ToolParameterAccuracyEvaluator
|
|
301
|
+
|
|
302
|
+
# Evaluate if correct tools were selected
|
|
303
|
+
tool_selection_evaluator = ToolSelectionAccuracyEvaluator(
|
|
304
|
+
rubric="Score 1.0 if optimal tools selected, 0.5 if suboptimal but functional, 0.0 if wrong tools"
|
|
305
|
+
)
|
|
306
|
+
|
|
307
|
+
# Evaluate if tool parameters were correct
|
|
308
|
+
tool_parameter_evaluator = ToolParameterAccuracyEvaluator(
|
|
309
|
+
rubric="Score based on parameter accuracy and appropriateness for the task"
|
|
310
|
+
)
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
## Available Evaluators
|
|
314
|
+
|
|
315
|
+
### Core Evaluators
|
|
316
|
+
- **OutputEvaluator**: Flexible LLM-based evaluation with custom rubrics
|
|
317
|
+
- **TrajectoryEvaluator**: Action sequence evaluation with built-in scoring tools
|
|
318
|
+
- **HelpfulnessEvaluator**: Seven-level helpfulness assessment from user perspective
|
|
319
|
+
- **FaithfulnessEvaluator**: Evaluates if responses are grounded in conversation history
|
|
320
|
+
- **GoalSuccessRateEvaluator**: Measures if user goals were achieved
|
|
321
|
+
|
|
322
|
+
### Specialized Evaluators
|
|
323
|
+
- **ToolSelectionAccuracyEvaluator**: Evaluates appropriateness of tool choices
|
|
324
|
+
- **ToolParameterAccuracyEvaluator**: Evaluates correctness of tool parameters
|
|
325
|
+
- **InteractionsEvaluator**: Multi-agent interaction and handoff evaluation
|
|
326
|
+
- **Custom Evaluators**: Extensible base class for domain-specific logic
|
|
327
|
+
|
|
328
|
+
## Experiment Management and Serialization
|
|
329
|
+
|
|
330
|
+
Save, load, and version experiments for reproducibility:
|
|
331
|
+
|
|
332
|
+
```python
|
|
333
|
+
# Save experiment with metadata
|
|
334
|
+
experiment.to_file("customer_service_eval", "json")
|
|
335
|
+
|
|
336
|
+
# Load experiment from file
|
|
337
|
+
loaded_experiment = Experiment.from_file("./experiment_files/customer_service_eval.json", "json")
|
|
338
|
+
|
|
339
|
+
# Experiment files include:
|
|
340
|
+
# - Test cases with metadata
|
|
341
|
+
# - Evaluator configuration
|
|
342
|
+
# - Expected outputs and trajectories
|
|
343
|
+
# - Versioning information
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
## Evaluation Metrics and Analysis
|
|
347
|
+
|
|
348
|
+
Track comprehensive metrics across multiple dimensions:
|
|
349
|
+
|
|
350
|
+
```python
|
|
351
|
+
# Built-in metrics to consider:
|
|
352
|
+
metrics = {
|
|
353
|
+
"accuracy": "Factual correctness of responses",
|
|
354
|
+
"task_completion": "Whether agent completed the task",
|
|
355
|
+
"tool_selection": "Appropriateness of tool choices",
|
|
356
|
+
"response_time": "Agent response latency",
|
|
357
|
+
"hallucination_rate": "Frequency of fabricated information",
|
|
358
|
+
"token_usage": "Efficiency of token consumption",
|
|
359
|
+
"user_satisfaction": "Subjective helpfulness ratings"
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
# Generate analysis reports
|
|
363
|
+
reports = experiment.run_evaluations(task_function)
|
|
364
|
+
reports[0].run_display() # Interactive display with metrics breakdown
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
## Best Practices
|
|
368
|
+
|
|
369
|
+
### Evaluation Strategy
|
|
370
|
+
1. **Diversify Test Cases**: Cover knowledge, reasoning, tool usage, conversation, edge cases, and safety scenarios
|
|
371
|
+
2. **Use Statistical Baselines**: Run multiple evaluations to account for LLM non-determinism
|
|
372
|
+
3. **Combine Multiple Evaluators**: Use output, trajectory, and helpfulness evaluators together
|
|
373
|
+
4. **Regular Evaluation Cadence**: Implement consistent evaluation schedules for continuous improvement
|
|
374
|
+
|
|
375
|
+
### Performance Optimization
|
|
376
|
+
1. **Use Extractors**: Always use `tools_use_extractor` functions to prevent context overflow
|
|
377
|
+
2. **Update Descriptions Dynamically**: Call `update_trajectory_description()` with tool descriptions
|
|
378
|
+
3. **Choose Appropriate Judge Models**: Use stronger models for complex evaluations
|
|
379
|
+
4. **Batch Evaluations**: Process multiple test cases efficiently
|
|
380
|
+
|
|
381
|
+
### Experiment Design
|
|
382
|
+
1. **Write Clear Rubrics**: Include explicit scoring criteria and examples
|
|
383
|
+
2. **Include Expected Trajectories**: Define exact sequences for trajectory evaluation
|
|
384
|
+
3. **Use Appropriate Matching**: Choose between exact, in-order, or any-order matching
|
|
385
|
+
4. **Version Control**: Track agent configurations alongside evaluation results
|
|
386
|
+
|
|
387
|
+
## Documentation
|
|
388
|
+
|
|
389
|
+
For detailed guidance & examples, explore our documentation:
|
|
390
|
+
|
|
391
|
+
- [User Guide](https://strandsagents.com/latest//user-guide/evals-sdk/quickstart.md)
|
|
392
|
+
- [Evaluator Reference](https://strandsagents.com/latest/user-guide/evals-sdk/evaluators/)
|
|
393
|
+
|
|
394
|
+
## Contributing ❤️
|
|
395
|
+
|
|
396
|
+
We welcome contributions! See our [Contributing Guide](CONTRIBUTING.md) for details on:
|
|
397
|
+
- Development setup
|
|
398
|
+
- Contributing via Pull Requests
|
|
399
|
+
- Code of Conduct
|
|
400
|
+
- Reporting of security issues
|
|
401
|
+
|
|
402
|
+
## License
|
|
403
|
+
|
|
404
|
+
This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.
|
|
405
|
+
|
|
406
|
+
## Security
|
|
407
|
+
|
|
408
|
+
See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
strands_evals/__init__.py,sha256=LzUchWCMqfkXf4ca1p-S8YGBG5yTvy8ePTbdoVlqO8E,508
|
|
2
|
+
strands_evals/case.py,sha256=KWAL947NkmNzg9FFdTsL6KI9AFLQ8IcFjaOjcs9x5to,2131
|
|
3
|
+
strands_evals/experiment.py,sha256=H_XJnOPufqg_3ZhSnjFFMFEzo4CqRtoHbHdFqLXR4iQ,28183
|
|
4
|
+
strands_evals/display/display_console.py,sha256=bOTr6RepgnifALz2DgXnnk3c4Jjxu_mA68-pFr7xry0,5932
|
|
5
|
+
strands_evals/evaluators/__init__.py,sha256=OfZU5RkYewHOAnEjPKdxiEvPnfOOWNZc_9nQpAfARfI,887
|
|
6
|
+
strands_evals/evaluators/evaluator.py,sha256=XEesDeT83H93B1X_w8s0Nsb1KKHy26QO8b99Hi6vKbc,7466
|
|
7
|
+
strands_evals/evaluators/faithfulness_evaluator.py,sha256=i6oLgG58BxYAv-lottapn4XfSBncvGyYNIXNRqSILAQ,4742
|
|
8
|
+
strands_evals/evaluators/goal_success_rate_evaluator.py,sha256=ZKP2Us62_cwVwUVng9QlOytkrMXC7ObOlp7xr-obOw8,3373
|
|
9
|
+
strands_evals/evaluators/harmfulness_evaluator.py,sha256=odKugWJUbVGuPzU3gEQjdumqIkmbKRIyPEKLESQt-vQ,5315
|
|
10
|
+
strands_evals/evaluators/helpfulness_evaluator.py,sha256=7lRLhDsr1PSbPAILmDG015lfxn6iKa_dQleuFzlzMcQ,5922
|
|
11
|
+
strands_evals/evaluators/interactions_evaluator.py,sha256=-JB85oXiEGyCr7oUH5nzwJpPw4GBWcmMKNzOHjErRSo,10694
|
|
12
|
+
strands_evals/evaluators/output_evaluator.py,sha256=XEul2qc7cArl192cojKeB4BZ9EX8pCbpAQv7xwIqJAk,2949
|
|
13
|
+
strands_evals/evaluators/tool_parameter_accuracy_evaluator.py,sha256=jLHA2hR3E23N3fOZEeOR_KqqkYwzP2FWNnTZOd55h9E,4642
|
|
14
|
+
strands_evals/evaluators/tool_selection_accuracy_evaluator.py,sha256=bDa_-k3ye9v80urdyFIpsURSmdK6g7muZ_w0NfN_E3Y,4575
|
|
15
|
+
strands_evals/evaluators/trajectory_evaluator.py,sha256=MIq0dxGxMBw-cOt8zc80jrVnO-McqtBQ5E4_0An2ka4,3989
|
|
16
|
+
strands_evals/evaluators/prompt_templates/case_prompt_template.py,sha256=NQH3flsOxQOp4sLAQ0g6Q4YjkpuIWzNJqZ8-bSIn78c,2687
|
|
17
|
+
strands_evals/evaluators/prompt_templates/prompt_templates.py,sha256=tx4auXcHo-wxsQtJ9wCJGQbbURmhsRkB4LS-CzmAwwA,14468
|
|
18
|
+
strands_evals/evaluators/prompt_templates/faithfulness/__init__.py,sha256=_18J1msOfOikbvyYefAmOJEFaBJ2G75ybkTyQeHNvRA,178
|
|
19
|
+
strands_evals/evaluators/prompt_templates/faithfulness/faithfulness_v0.py,sha256=0NVqDYnppwg-pBb6PW6PGaOuBwlYz7bVJLu0EgkI4dk,1410
|
|
20
|
+
strands_evals/evaluators/prompt_templates/goal_success_rate/__init__.py,sha256=cfOeRMakkG_FL7_1ewJl3AuCJGT13ZSWM7tnInLJetw,188
|
|
21
|
+
strands_evals/evaluators/prompt_templates/goal_success_rate/goal_success_rate_v0.py,sha256=35fuJ_LEqEfz5jhCp4jwihs6U9azM5KI4Ms86U0cLZE,1950
|
|
22
|
+
strands_evals/evaluators/prompt_templates/harmfulness/__init__.py,sha256=Y2KQcYKBnRPGoQKeTqqQ52Cour-VR82ve6JQyl36WtQ,176
|
|
23
|
+
strands_evals/evaluators/prompt_templates/harmfulness/harmfulness_v0.py,sha256=uGvZlfcPxfdHpUR_If2-xpMCX6-ynFlT0MnjZzqH3xA,1108
|
|
24
|
+
strands_evals/evaluators/prompt_templates/helpfulness/__init__.py,sha256=8j55Lwo3qmkVDflZWXwxjauot7IAayN5ua1X9yQS1vM,176
|
|
25
|
+
strands_evals/evaluators/prompt_templates/helpfulness/helpfulness_v0.py,sha256=MUlK5B0RDdQdcL5Ke_cp5V6sbuVZcwdlBnUoC3Ju9B4,1569
|
|
26
|
+
strands_evals/evaluators/prompt_templates/tool_parameter_accuracy/__init__.py,sha256=lFx-tDGveafaqAAEvVuYU3-Pj9G0-14GlSrMkq80wX0,200
|
|
27
|
+
strands_evals/evaluators/prompt_templates/tool_parameter_accuracy/tool_parameter_accuracy_v0.py,sha256=D_m1aJN7AXeA8Z2iIysxvwx52TtiozGZFWvnXvG8Tms,2259
|
|
28
|
+
strands_evals/evaluators/prompt_templates/tool_selection_accuracy/__init__.py,sha256=AiMdoIS4-MqGeeNQkzPkjBnOxW5W5-jw20Qbn6fOjik,200
|
|
29
|
+
strands_evals/evaluators/prompt_templates/tool_selection_accuracy/tool_selection_accuracy_v0.py,sha256=zfB8Y2j8we5MNZ5RFJAI6pCckY4p3JvcZ4yNt8pXYIo,1483
|
|
30
|
+
strands_evals/extractors/__init__.py,sha256=Jmlrk-m8sSS_LwmCVSloIkg3BjOgRzNEezjaAGMw5rw,74
|
|
31
|
+
strands_evals/extractors/graph_extractor.py,sha256=TeT-58JB9roqSvy2ELz1kg8WF5YO-cfLlGZTO0F9s_4,1105
|
|
32
|
+
strands_evals/extractors/swarm_extractor.py,sha256=Sm1XFCkAGVdF3XDyO3iF-20I8C6sAQ8JPNP5fgotOFU,2682
|
|
33
|
+
strands_evals/extractors/tools_use_extractor.py,sha256=XTD7dDIWMiuaIYjUCRnZP45ly629n2XtkrbBwMlKU-s,6190
|
|
34
|
+
strands_evals/extractors/trace_extractor.py,sha256=l7gk5rUFoUcxQduPJz49OX66SdgeK1MLt81aF1yr4Lc,6653
|
|
35
|
+
strands_evals/generators/__init__.py,sha256=B1F30DAIf0kPyBdE4PAZvSby-dTelqb_7hFJoATqVb0,89
|
|
36
|
+
strands_evals/generators/experiment_generator.py,sha256=6wLTL0iG2b0YAiu0w8dDiaBxOIy7p_Fs7l3hCjgQc0w,22655
|
|
37
|
+
strands_evals/generators/topic_planner.py,sha256=FtgTVDlV9hWJyO8E4Z__nEWvvrOJzmTW4y6yZ9Alx1A,2436
|
|
38
|
+
strands_evals/generators/prompt_template/prompt_templates.py,sha256=recCRAVpieWSgyF9zgGohEaJUpfl641aCUGs_7NnXcc,3969
|
|
39
|
+
strands_evals/mappers/__init__.py,sha256=kynJoztcQCJtCcQQDBttxxqJeSro95rqibNyDRRtrIU,297
|
|
40
|
+
strands_evals/mappers/session_mapper.py,sha256=PjNPC_M1yr6_1-zSjt8oPBJxSqGAY8Iv_JdXMUJvraQ,632
|
|
41
|
+
strands_evals/mappers/strands_in_memory_session_mapper.py,sha256=JDtXnJXgngCo0zA7JfcOUAL0PDl6SPZg8AX9eBPsin8,22009
|
|
42
|
+
strands_evals/simulation/README.md,sha256=N8s3MZ9lkWPgkczuYWjYV-E4Rldtp1zmeJXDX4ggwaw,9843
|
|
43
|
+
strands_evals/simulation/__init__.py,sha256=NRn3ZWO-6zL6P5CmGj_CW9adSP99R0gczC8eQU4zxpA,158
|
|
44
|
+
strands_evals/simulation/actor_simulator.py,sha256=DTxNspi7lXzsG3SZqiCUP7hGIHYusP7DfNyxG04yxus,11492
|
|
45
|
+
strands_evals/simulation/profiles/__init__.py,sha256=d6WJcCezOtiqp5BOiSMGFPGnmHIMcc75Jj2qJmhLGVY,145
|
|
46
|
+
strands_evals/simulation/profiles/actor_profile.py,sha256=Mmd_yZquG38ceN3b1OgwehFGqke0FAHK5HO1ikeGwbI,948
|
|
47
|
+
strands_evals/simulation/prompt_templates/__init__.py,sha256=ZfPu49OTcDDxll2_LDv9OMrXaxlYrs9fDa4e8yJWkX8,366
|
|
48
|
+
strands_evals/simulation/prompt_templates/actor_profile_extraction.py,sha256=YkCdpL962rZDMoFIlF49ChcdBhLz1ix2CxWHYo61yMU,907
|
|
49
|
+
strands_evals/simulation/prompt_templates/actor_system_prompt.py,sha256=BZuYIIPZB74Dcmpfh27IgycgOCr7oFIYj3dt9_1LDBA,2950
|
|
50
|
+
strands_evals/simulation/prompt_templates/goal_completion.py,sha256=Z3QO_jU1hYbjGJTImnMQU7djF7wBQahk_6cGNJ1RtyE,670
|
|
51
|
+
strands_evals/simulation/tools/__init__.py,sha256=1FNCdTHrDG8Nirw7NFH671yVD4hfUPNF3eV2zrnGTbs,145
|
|
52
|
+
strands_evals/simulation/tools/goal_completion.py,sha256=Z_d0ih-VwTBKiT69hUhQFxH6r9WmaozQP0yjxaE2-y0,3252
|
|
53
|
+
strands_evals/telemetry/__init__.py,sha256=yGJ3_JtA5Zfbm1VbeZc-ela0xD4CpfcF_vzyTfXqeY8,382
|
|
54
|
+
strands_evals/telemetry/_cloudwatch_logger.py,sha256=l1_9ZKB2YNs7pL7A0giykz-1kV5TZevsx4SJ6b8KTZM,7757
|
|
55
|
+
strands_evals/telemetry/config.py,sha256=nJkEwL1lCYLWj5oyHG2dS8cu7fS4TGHdcR1WLbYkE68,8155
|
|
56
|
+
strands_evals/telemetry/tracer.py,sha256=aCQd8UZ8rtKoZ3Hmjs-ZOIWSgtwi8YVQhiMgHKJqiVE,997
|
|
57
|
+
strands_evals/tools/evaluation_tools.py,sha256=rtl1oJU1OLOy00SuKwogDU8YVjAjk1u0U5DHwY-E7sM,1864
|
|
58
|
+
strands_evals/types/__init__.py,sha256=HWUmyMprLg40Rq51CE2NhfbtHKK-QL9BVYneA4ft94E,273
|
|
59
|
+
strands_evals/types/evaluation.py,sha256=FKtmfa5NYlZ9WeXA-YvR1YYCRgY4Aj6PtuZRoC0SuXQ,3830
|
|
60
|
+
strands_evals/types/evaluation_report.py,sha256=vT86zO4Qn9CQbULo3aziGMdG-1qWLdcBFJf6tNs_Rxk,10474
|
|
61
|
+
strands_evals/types/trace.py,sha256=BFoEylzAlENyPH702T5MDz-_H21-Wfx-FFTSXX1tDfY,4844
|
|
62
|
+
strands_evals/types/simulation/__init__.py,sha256=-mz5lW6qFfIMm4dJGaP9pXY3xeiefLbB0XevjdFykkU,133
|
|
63
|
+
strands_evals/types/simulation/actor.py,sha256=ESTV8165c3Ad5QT4yYmjm-A-oZdwZ0Rf0Lq7zokjTPo,1163
|
|
64
|
+
strands_agents_evals-0.1.0.dist-info/METADATA,sha256=M51KkWtamOJjOpBeVocDA2A1np_X17BZmmWyLGTHvUE,15145
|
|
65
|
+
strands_agents_evals-0.1.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
66
|
+
strands_agents_evals-0.1.0.dist-info/licenses/LICENSE,sha256=yIWKWnZEC7ykhOE0z330Y4XQkN0YssWOZQ-TkliALls,10141
|
|
67
|
+
strands_agents_evals-0.1.0.dist-info/licenses/NOTICE,sha256=Eg13ogOmcI7JpMjxniFnKG81vwU3X8X7P_IlpvVg5RU,66
|
|
68
|
+
strands_agents_evals-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|