AI Setup

AI Setup

This guide will walk you through the process of setting up your pi application to use the upcoming AI features.

Important Points

At present we recommend using one provider across the whole installation however it is possible to supply individual API keys via the variables below if you require users or roles to have their own key. We will be looking to expand support to multiple providers.

Vector Database

To use all the AI features you will require a Vector DB. At present we only support Qdrant.

Windows

In our Windows install we bundle and configure Qdrant automatically (you must choose it as a component in the installer).

Linux and containers

On Linux and container deployments, you should provide it manually and ensure it is up and running on a suitable port.

Example container deployment in docker compose format:

qdrant: image: qdrant/qdrant:v1.15.5 ports: - "6333:6333" # REST API - "6334:6334" # gRPC API volumes: - qdrant_data:/qdrant/storage restart: unless-stopped

Below is a link to the Qdrant binaries (we highly recommend using container deployments):

https://github.com/qdrant/qdrant/releases

In a container or Linux environment, you must provide the following environment variables to the server application to allow it to find the vector DB:

If desired, you can use additional segregation of the data in the vector database by supplying

  • PI_VECTOR_DB_NAMESPACE

You can find information on monitoring and telemetry for Qdrant here:

https://qdrant.tech/documentation/guides/monitoring/

Supported Providers

At present we support the following providers:

Provider

Provider name value

Default embedding model

Default chat model

Default reasoning model

Provider

Provider name value

Default embedding model

Default chat model

Default reasoning model

Open AI

openai

text-embedding-3-small

gpt-4o-mini

gpt-5-mini

Open AI compatible*

openai

text-embedding-3-small

gpt-4o-mini

gpt-5-mini

* - We offer the unsupported ability to use other providers providing an OpenAI-compatible API. For example, local models or third-party cloud services. We will be looking to expand our list of supported and tested providers.

Applying the settings

To configure the AI functionality, you must provide the following dashboard variables (not environment variables) globally:

  • AI_PROVIDER = openai

  • AI_API_KEY = A working API key used for global actions such as creating embeddings of chart information

To utilise the chart builder and pi-ai, you must also apply the following:

  • AI_AI_URL = The URL at which the pi-ai module lives i.e. http://localhost:9919. If setting via config tool or docker as system admin, use PI_VARIABLE_PI_AI_URL instead.

  • PI_ADDITIONAL_SERVICES_PI_CALLBACK_URL = The dashboard URL for pi-ai to call back to i.e. http://localhost:8224. Must be set at the system level via config tool or docker. This will also be used for other applicable modules such as the renderer.

In addition, you can provide the following dashboard variables globally

  • AI_PROVIDER_URL = A URL which will override the default URL for the provider, for example http://localhost:11434/v1/

  • AI_EMBEDDING_MODEL = A model name for the embedding model which will override the default

  • AI_CHAT_MODEL = The name of a chat model if you don’t wish to use the default, for example gpt-4o-mini

  • AI_REASONING_MODEL = The name of a chat model supporting reasoning if you don’t wish to use the default, for example gpt-5-mini. This model is used for the more powerful features such as chart builder.

Using multiple providers

It is possible to use multiple providers across users, roles or organisations. To do this you must ensure the embedding provider is consistent across the Dashboard instance. For example, you could deploy an embedding model within your network.

Once that configuration is in place, you can modify the provider/chat settings as you wish, and each LLM interaction will be made according to that configured for the user.

  • AI_EMBEDDING_PROVIDER = openai

  • AI_EMBEDDING_PROVIDER_URL = A URL which will override the default URL for the embedding provider (used for creating chart metadata in vector format), for example http://localhost:11434/v1/

  • AI_EMBEDDING_API_KEY = The api key for the embedding connection

  • AI_EMBEDDING_MODEL = A model name for the embedding model which will override the default

Beta Features

Some of the AI features may be in beta, in which case you won’t be able to use them without supplying the key to enable them in the enabled beta features field. Reach out to Support if you require details.

Token Usage

To help customers gauge likely costs from using the AI features, we are providing some guideline token usage figures for the features we have.

Feature/Procedure

Description

Model Type

Input Tokens

Output Tokens

Feature/Procedure

Description

Model Type

Input Tokens

Output Tokens

Embedding of chart info

Turning the chart info from each chart into vectors for use in features such as AI Chart Explorer

Embedding

~ 50 per chart

N/A

Chart Description (Large table)

Describing a chart using the data

Language

~5000 per request

~500 per request

Chart Description (Small chart)

Describing a chart using the data

Language

~500 per chart

~500 per request

Chart Explorer

Finding and analysing across multiple charts

Language

~5-10k per request

~2k per request

Report Description

Create description of reports or report components

Language

~200-5k per request

~300 per request

Chart Builder

Build new charts from configured data connections

Language (with reasoning)

~50k per request

~3k per request

Token usage per user and feature is tracked in the repository database table MIS_AI_AUDIT. You can create tables and charts from this data to observe usage data. We also recommend applying budget limits via your provider to cap usage costs; this can be done on a per-user basis if desired by providing a unique key to users.

 

Recommended Models

The minimum standard of model you can use depends on which features you wish to use. Simpler features will work fine on older/less expensive models but more complex features require something more capable.

Feature

OpenAI recommendation (minimum)

Feature

OpenAI recommendation (minimum)

Chart Summarisation

gpt-4o-mini

Chart Explorer

gpt-4o-mini

Report Summarisation

gpt-4o-mini

Chart Builder

gpt-5-mini

  • Features currently in development are more advanced, so will require a newer, more capable model, for example gpt-5-mini or gpt-5.4-nano. Our recommendations will be confirmed as the features are released.

  • Local models can be used but your experience will depend on how capable the model and hardware is, considerable resources will be needed to receive an experience similar to that provided by a cloud service such as OpenAI, especially as concurrent usage increases. We suggest testing your model and infrastructure against our service recommendations to ensure the experience of your users is at a similar level.