Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix usage of opik.Prompt in quickstart notebook #795

Merged
merged 1 commit into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -581,9 +581,9 @@
"\n",
"ITERATION_SUMMARY_PROMPT = opik.Prompt(\n",
" name=\"Iteration Summary Prompt\",\n",
" prompt=\"\"\"Document: {document}\n",
"Current summary: {current_summary}\n",
"Instruction to focus on: {instruction}\n",
" prompt=\"\"\"Document: {{document}}\n",
"Current summary: {{current_summary}}\n",
"Instruction to focus on: {{instruction}}\n",
"\n",
"Generate a concise, entity-dense, and highly technical summary from the provided Document that specifically addresses the given Instruction.\n",
"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ res = evaluate(
task=evaluation_task,
scoring_metrics=[EvaluateSummary(name="summary-metrics")],
prompt=ITERATION_SUMMARY_PROMPT,
project_name="Chain of Density Summarization"
project_name="Chain of Density Summarization",
)
```

Expand All @@ -470,9 +470,9 @@ import opik

ITERATION_SUMMARY_PROMPT = opik.Prompt(
name="Iteration Summary Prompt",
prompt="""Document: {document}
Current summary: {current_summary}
Instruction to focus on: {instruction}
prompt="""Document: {{document}}
Current summary: {{current_summary}}
Instruction to focus on: {{instruction}}

Generate a concise, entity-dense, and highly technical summary from the provided Document that specifically addresses the given Instruction.

Expand Down Expand Up @@ -508,7 +508,7 @@ res = evaluate(
task=evaluation_task,
scoring_metrics=[EvaluateSummary(name="summary-metrics")],
prompt=ITERATION_SUMMARY_PROMPT,
project_name="Chain of Density Summarization"
project_name="Chain of Density Summarization",
)
```

Expand Down