> ## Documentation Index
> Fetch the complete documentation index at: https://docs.uptrain.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Get started with UpTrain in a few simple steps

<Steps>
  <Step title="Install UpTrain">
    Run the following commands in your terminal to install UpTrain:

    ```bash theme={null}
    pip install uptrain
    ```
  </Step>

  <Step title="Import required libraries">
    ```python theme={null}
    from uptrain import EvalLLM, Evals
    import json
    ```
  </Step>

  <Step title="Create your data">
    You can define your data as a simple dictionary with the following keys:

    * `question`: The question you want to ask
    * `context`: The context relevant to the question
    * `response`: The response to the question

    ```python theme={null}
    data = [{
        "question": [
            "Which is the most popular global sport?",
            "Who created the Python language?",
        ],
        "context": [
            "The popularity of sports can be measured in various ways, including TV viewership, social media presence, number of participants, and economic impact. Football is undoubtedly the world's most popular sport with major events like the FIFA World Cup and sports personalities like Ronaldo and Messi, drawing a followership of more than 4 billion people.",
            "Python, created by Guido van Rossum in the late 1980s, is a high-level general-purpose programming language. Its design philosophy emphasizes code readability, and its language constructs aim to help programmers write clear, logical code for both small and large-scale software projects.",
        ],
        "response":[
            "Football is the most popular sport with around 4 billion followers worldwide",
            "Python language was created by Guido van Rossum.",
        ]
    }]
    ```
  </Step>

  <Step title="Run Evaluations">
    Create an instance of the `EvalLLM` class and pass your OpenAI API key to the constructor.

    ```python theme={null}
    OPENAI_API_KEY = "sk-********************"  # Insert your OpenAI key here
    eval_llm = EvalLLM(openai_api_key=OPENAI_API_KEY)
    ```

    <Info>You can find your OpenAI API key [here](https://beta.openai.com/account/api-keys).</Info>
  </Step>

  <Step title="Evaluate your data">
    Now that we have our data, we can evaluate it using UpTrain. We use the `evaluate` method to do this. This method takes the following arguments:

    * `data`: The data you want to evaluate upon
    * `evals`: The evaluations you want to perform on your data

    You can find the list of all available evaluations [here](/predefined-evaluations).

    ```python theme={null}
    results = eval_llm.evaluate(
        data=data,
        checks=[Evals.CONTEXT_RELEVANCE, Evals.FACTUAL_ACCURACY, Evals.RESPONSE_COMPLETENESS]
    )
    ```
  </Step>

  <Step title="Get your results">
    ```python theme={null}
    print(json.dumps(results, indent=3))
    ```
  </Step>
</Steps>
