Skip to content

Commit bb1aa53

Browse files
committed
feat: Update evaluation and workflow templates to enhance configuration management and streamline execution steps
1 parent 1feada9 commit bb1aa53

5 files changed

Lines changed: 44 additions & 154 deletions

File tree

deploy/base/templates/evaluate-template.yaml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,10 @@ spec:
1212
model:
1313
type: string
1414
description: "Model name to use for evaluation (e.g., gemini-2.5-flash-lite)"
15-
metricsConfigPath:
15+
openApiBasePath:
1616
type: string
17-
description: "Path to metrics configuration file (JSON or YAML)"
18-
default: "config/metrics.yaml"
19-
image:
20-
type: string
21-
description: "Docker image to use for the evaluate step"
22-
default: "ghcr.io/agentic-layer/testbench/testworkflows:0.1.1"
17+
description: "Base path for OpenAI API"
18+
default: "http://ai-gateway-litellm.ai-gateway:4000"
2319

2420
# Steps to execute
2521
steps:
@@ -33,11 +29,14 @@ spec:
3329
- -c
3430
args:
3531
- |
36-
uv run python3 evaluate.py "{{ config.model }}" --metrics-config "{{ config.metricsConfigPath }}" && \
32+
uv run python3 evaluate.py "{{ config.model }}" --metrics-config "/app/config/metrics.yaml" && \
3733
if [ -f data/results/evaluation_scores.json ]; then
3834
echo "✓ Evaluation completed"
3935
cat data/results/evaluation_scores.json
4036
else
4137
echo "✗ Error: Results file not created"
4238
exit 1
4339
fi
40+
env:
41+
- name: OPENAI_API_BASE
42+
value: "{{ config.openApiBasePath }}"

deploy/base/templates/publish-template.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ metadata:
88
app: testworkflows
99

1010
spec:
11+
12+
config:
13+
otelExporterOtlpEndpoint:
14+
type: string
15+
description: "OTel Collector endpoint for exporting traces and metrics"
16+
default: "http://lgtm.monitoring:4318"
17+
1118
# Steps to execute
1219
steps:
1320
- name: publish-metrics
@@ -17,3 +24,6 @@ spec:
1724
- "{{ workflow.name }}"
1825
- "{{ execution.id }}"
1926
- "{{ execution.number }}"
27+
env:
28+
- name: OTEL_EXPORTER_OTLP_ENDPOINT
29+
value: "{{ config.otelExporterOtlpEndpoint }}"

deploy/base/templates/run-template.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ spec:
1313
agentUrl:
1414
type: string
1515
description: "URL to the agent endpoint (A2A protocol)"
16+
otelExporterOtlpEndpoint:
17+
type: string
18+
description: "OTel Collector endpoint for exporting traces and metrics"
19+
default: "http://lgtm.monitoring:4318"
1620

1721
# Steps to execute
1822
steps:
@@ -24,3 +28,6 @@ spec:
2428
args:
2529
- run.py
2630
- "{{ config.agentUrl }}"
31+
env:
32+
- name: OTEL_EXPORTER_OTLP_ENDPOINT
33+
value: "{{ config.otelExporterOtlpEndpoint }}"

deploy/local/multi-turn-workflow.yaml

Lines changed: 20 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -8,57 +8,27 @@ metadata:
88
app: testworkflows
99

1010
spec:
11-
# Pod configuration with volumes
12-
pod:
13-
volumes:
14-
- name: metrics-config
15-
configMap:
16-
name: multi-turn-metrics-config
17-
- name: dataset
18-
configMap:
19-
name: dataset
11+
content:
12+
files:
13+
- path: /data/datasets/ragas_dataset.jsonl
14+
contentFrom:
15+
configMapKeyRef:
16+
name: dataset
17+
key: dataset.jsonl
18+
- path: /app/config/metrics.yaml
19+
contentFrom:
20+
configMapKeyRef:
21+
name: multi-turn-metrics-config
22+
key: metrics.yaml
2023

2124
container:
2225
image: ghcr.io/agentic-layer/testbench/testworkflows:latest
23-
env:
24-
- name: OPENAI_API_BASE
25-
value: "http://ai-gateway-litellm.ai-gateway:4000"
26-
- name: OTEL_EXPORTER_OTLP_ENDPOINT
27-
value: "http://lgtm.monitoring:4318"
28-
volumeMounts:
29-
- name: metrics-config
30-
mountPath: /app/config/metrics.yaml
31-
subPath: metrics.yaml
32-
- name: dataset
33-
mountPath: /data/datasets/ragas_dataset.jsonl
34-
subPath: dataset.jsonl
3526

36-
# Steps using the templates
37-
steps:
38-
# Step 1: Setup - Download and convert dataset
39-
# - name: setup
40-
# use:
41-
# - name: ragas-setup-template
42-
# config:
43-
# bucket: "datasets"
44-
# key: "multi_turn_dataset.json"
45-
46-
# Step 2: Run - Execute agent queries
47-
- name: run
48-
use:
49-
- name: ragas-run-template
50-
config:
51-
agentUrl: "http://weather-agent.sample-agents:8000"
52-
53-
# Step 3: Evaluate - Run RAGAS evaluation
54-
- name: evaluate
55-
use:
56-
- name: ragas-evaluate-template
57-
config:
58-
model: "gemini-2.5-flash-lite"
59-
metricsConfigPath: "/app/config/metrics.yaml"
60-
61-
# Step 4: Publish - Push metrics to OTLP
62-
- name: visualize
63-
use:
64-
- name: ragas-visualize-template
27+
use:
28+
- name: ragas-run-template
29+
config:
30+
agentUrl: "http://weather-agent.sample-agents:8000"
31+
- name: ragas-evaluate-template
32+
config:
33+
model: "gemini-2.5-flash-lite"
34+
- name: ragas-visualize-template

deploy/local/ragas-evaluation-workflow.yaml

Lines changed: 0 additions & 96 deletions
This file was deleted.

0 commit comments

Comments
 (0)