Back to Opik

Optimizer Introduction Cookbook

apps/opik-documentation/documentation/fern/docs-v2/development/optimization-runs/quickstart_notebook.mdx

2.0.22-6605-merge-20651.6 KB
Original Source
<Info> This example demonstrates end-to-end prompt optimization on the HotPotQA dataset using Opik Agent Optimizer. All steps, code, and explanations are provided in the interactive Colab notebook below. </Info> <Callout> This notebook powers the **Quickstart notebook** entry in the Agent Optimization navigation. </Callout>

Load Example Notebook

<Note> To follow this example, simply open the Colab notebook below. You can run, modify, and experiment with the workflow directly in your browser—no local setup required. </Note>
PlatformLaunch Link
Google Colab (Preferred)
GitHubView the notebook on GitHub

What you'll learn

  • How to set up Opik Agent Optimizer SDK
  • How to setup Opik Cloud (Comet Account) for prompt optimization
  • How to use the HotPotQA dataset for multi-hop question answering
  • How to define metrics and task configs
  • How to run the FewShotBayesianOptimizer and interpret results
  • How to visualize optimization runs in the Opik UI

Quick Start

  1. Click the Colab badge above to launch the notebook.
  2. Follow the step-by-step instructions in the notebook.
  3. For more details, see the Opik Agent Optimizer documentation.