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

# Evaluation Quickstart

> Evaluate your LLM app.

<Steps>
  <Step title="Installation">
    First, you'll need a Parea API key. See [Authentication](/api-reference/authentication) to get started.

    After you've followed those steps, you are ready to install the Parea SDK client.

    <CodeGroup>
      ```bash python theme={null}
      pip install parea-ai
      ```

      ```bash node theme={null}
      npm install parea-ai
      ```
    </CodeGroup>
  </Step>

  <Step title="Create an evaluation script">
    Start with creating a simple evaluation script.

    <Tabs>
      <Tab title="Python">
        ```python theme={null}
        import os

        from dotenv import load_dotenv

        from parea import Parea, trace
        from parea.evals.general import levenshtein

        load_dotenv()

        p = Parea(api_key=os.getenv("PAREA_API_KEY"))


        # annotate function with the trace decorator and pass the evaluation function(s)
        @trace(eval_funcs=[levenshtein])
        def greeting(name: str) -> str:
            return f"Hello {name}"

        p.experiment(
            "Greetings",  # experiment name
            data=[
                { "name": "Foo", "target": "Hi Foo" },
                { "name": "Bar", "target": "Hello Bar" },
            ],  # test data to run the experiment on (list of dicts)
            func=greeting,
        ).run()
        ```
      </Tab>

      <Tab title="TypeScript">
        ```typescript theme={null}
        import { Parea, trace, Completion, CompletionResponse, Log, Message, levenshtein } from 'parea-ai';
        import * as dotenv from 'dotenv';

        dotenv.config();

        const p = new Parea(process.env.PAREA_API_KEY);

        // annotate function with the trace decorator and pass the evaluation function(s)
        const greet = trace(
          'greetings',
          (name: string): string => {
            return `Hello ${name}`;
          },
          {
            evalFuncs: [levenshtein],
          },
        );

        export async function main() {
          const e = p.experiment(
            'Greetings',  // experiment name
            [
              { name: 'Foo', target: 'Hi Foo' },
              { name: 'Bar', target: 'Hello Bar' },
            ], // test data to run the experiment on (list of dicts)
            greet, // function to run (callable)
          );
          return await e.run();
        }

        main().then(() => {
          console.log('Experiment complete!');
        });
        ```
      </Tab>
    </Tabs>
  </Step>

  <Step title="Run experiment">
    After you've followed the above steps, you are ready run your experiment.

    <CodeGroup>
      ```bash python theme={null}
      python3 path/to/experiment_file.py
      ```

      ```bash node theme={null}
      ts-node path/to/experiment_file.ts
      ```
    </CodeGroup>
  </Step>

  <Step title="View results">
    The executed script will create a link to the experiment overview & its traces.
    You will see a high-level overview of your experiment, including average values for metrics such as latencies and cost, and any evaluation functions you've defined.
    You will see a table of your logs, and any chains will be expandable. The log table supports search, filtering, and sorting.

    <img src="https://mintcdn.com/pareaai/lIjZ3aMZeTkxaUc8/welcome/greeting-experiment-detailed-view-graphs.png?fit=max&auto=format&n=lIjZ3aMZeTkxaUc8&q=85&s=40c042b7f7672b74118bd867cd5d9d6e" alt="greeting-experiment" width="1840" height="771" data-path="welcome/greeting-experiment-detailed-view-graphs.png" />

    You can create additional statistics by clicking the "Pin stat" button. If you click a log, it will open the detailed trace view. Here, you can step through each span and view inputs, outputs, messages, metadata, and other key metrics associated with a given trace.
  </Step>

  <Step title="Can you improve to 100%?">
    For our first experiment, we only achieved a 77.8% score.
    Can you improve the score to 100%?
    If you run another experiment, you can compare the results like the screenshot below.

    <img src="https://mintcdn.com/pareaai/lIjZ3aMZeTkxaUc8/welcome/improved-greeting-experiment-top-bar-view.png?fit=max&auto=format&n=lIjZ3aMZeTkxaUc8&q=85&s=6edbe9bb947dcf08857109e4b68a4435" alt="greeting-experiment" width="1839" height="498" data-path="welcome/improved-greeting-experiment-top-bar-view.png" />
  </Step>
</Steps>

## What's Next?

Dive deeper into [Experiments](/evaluation/overview) or get started with [monitoring](/welcome/getting-started) your application.
