πGetting Started
Introduction
This tutorial will guide you step-by-step on how to install the GenAI Evaluator SDK and run your first evaluation.
Installation
Run the following command to install
pip install --extra-index-url "https://oauth2accesstoken:$(gcloud auth print-access-token)@glsdk.gdplabs.id/gen-ai-internal/simple/" "gllm-evals[deepeval,langchain,ragas]"Run the following command to install
pip install --extra-index-url "https://oauth2accesstoken:$(gcloud auth print-access-token)@glsdk.gdplabs.id/gen-ai-internal/simple/" "gllm-evals[deepeval,langchain,ragas]"Run the following command to install
FOR /F "tokens=*" %T IN ('gcloud auth print-access-token') DO pip install --extra-index-url "https://oauth2accesstoken:%T@glsdk.gdplabs.id/gen-ai-internal/simple/" "gllm-evals[deepeval,langchain,ragas]"Environment Setup
Set a valid language model credential as an environment variable.
In this example, let's use an OpenAI API key.
Get an OpenAI API key from OpenAI Console.
export OPENAI_API_KEY="sk-..."$env:OPENAI_API_KEY = "sk-..."set OPENAI_API_KEY="sk-..."Running Your First Evaluation
In this tutorial, we will evaluate RAG pipeline output.
Create a script called eval.py
Run the script
The evaluator will generate a response for the given input, e.g.:
Congratulations! You have successfully run your first evaluation
Recommendation
If you want to run an end-to-end evaluation, use the evaluate() convenience function instead of the step-by-step commands above.
It will automatically handle experiment tracking (via the Experiment Tracker) and integrates results into your existing Dataset, so you donβt have to wire these pieces together manually.
Next Steps
You're now ready to start using our evaluators. We offer several prebuilt evaluators to get you started:
Looking for something else? Build your own custom evaluator here.
*All fields are optional and can be adjusted depending on the chosen metric.
Last updated