Skip to main content

Quickstart

This guide helps you integrate the Opik platform with your existing LLM application.

Set up

Getting started is as simple as creating an account on Comet or self-hosting the platform.

Once your account is created, you can start logging traces by installing the Opik Python SDK:

pip install opik

and configuring the SDK with:

import opik

opik.configure(use_local=False)
tip

If you are self-hosting the platform, simply set the use_local flag to True in the opik.configure method.

Integrating with your LLM application

You can start logging traces to Opik by simply adding the @track decorator to your LLM application:

from opik import track

@track
def your_llm_application(input):
# Your existing LLM application logic here
output = "..."
return output

To learn more about the track decorator, see the track documentation. Once the traces are logged, you can view them in the OPIK UI:

Opik Traces