Quickstart
How to monitor your apps with Galileo Observe
Getting started with Galileo Observe is really easy. It involves 3 steps:
Create a project
Integrate Galileo in your code
Choose your Guardrail metrics
Create a Project
The first step is creating a project from the Galileo UI.
Go to Galileo Console
Click on the big + icon on the top left
Follow the steps to create your Observe project.
Integrate into your code
Galileo Observe can integrate via Langchain callbacks, our Python Logger, or via RESTFul APIs.
Authentication
To authenticate Galileo, perform the following steps
Add your Galileo Console URL (
GALILEO_CONSOLE_URL
) to your environment variables.
Set your user name and password OR your API key (recommended) to your environment variables
We recommend using an API key to authenticate. To create one, go to "API Keys" under your profile bubble.
Getting an API Key
To create an API key:
Go to your Galileo Console settings
Go to API Keys
Select Create a new key
Integrating with Langchain
We support integrating into both Python-based and Typescript-based Langchain systems:
Integrating into your Python-based Langchain application is the easiest and recommended route. You can just add GalileoObserveCallback(project_name="YOUR_PROJECT_NAME")
to the callbacks
of your chain invocation.
The GalileoObserveCallback logs your input, output, and relevant statistics back to Galileo, where additional evaluation metrics are computed.
Non Langchain: Custom Logging via Python Logger
If you're not using LangChain, you can use our Python Logger to log your data to Galileo. The Logger automatically batches and uploads data in the background asynchronously, ensuring the performance and reliability of your application is not compromised.
Use the log_prompt() and log_completion() to log your prompt, model, hyperparameters and the response respectively, as shown below:
Logging through our REST APIs
If you are looking to log directly from the client (e.g. using Javascript), you can log directly through our APIs. The Monitor API endpoints can be found on the swagger docs for your environment. More instructions can be found here.
Once you've integrated Galileo into your production app code, you can choose your Guardrail metrics.
Last updated