Skip to content

Commit 3d6c053

Browse files
authored
Merge pull request #175 from zenml-io/feature/better-visualization
Better visualization of the evaluation
2 parents 5ad4548 + 8fa36e2 commit 3d6c053

File tree

4 files changed

+419
-134
lines changed

4 files changed

+419
-134
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.74.0
1+
0.75.0

llm-complete-guide/pipelines/llm_eval.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from typing import Optional
1818

1919
import click
20-
from steps.create_prompt import create_prompt
20+
from steps.create_prompt import PROMPT, create_prompt
2121
from steps.eval_e2e import e2e_evaluation, e2e_evaluation_llm_judged
2222
from steps.eval_retrieval import (
2323
retrieval_evaluation_full,
@@ -26,14 +26,14 @@
2626
retrieval_evaluation_small_with_reranking,
2727
)
2828
from steps.eval_visualisation import visualize_evaluation_results
29-
from zenml import pipeline
29+
from zenml import pipeline, save_artifact
3030

3131

3232
@pipeline(enable_cache=True)
3333
def llm_eval(after: Optional[str] = None) -> None:
3434
"""Executes the pipeline to evaluate a RAG pipeline."""
3535
# define prompt
36-
prompt = create_prompt()
36+
prompt = save_artifact(PROMPT, "prompt")
3737

3838
# Retrieval evals
3939
failure_rate_retrieval = retrieval_evaluation_small(after=after)

llm-complete-guide/steps/create_prompt.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@
1616

1717
from zenml import log_metadata, step
1818

19+
PROMPT = """
20+
You are a friendly chatbot. \
21+
You can answer questions about ZenML, its features and its use cases. \
22+
You respond in a concise, technically credible tone. \
23+
You ONLY use the context from the ZenML documentation to provide relevant
24+
answers. \
25+
"""
1926

2027
@step
2128
def create_prompt() -> str:

0 commit comments

Comments
 (0)