> For the complete documentation index, see [llms.txt](https://docs.lumi-ai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lumi-ai.com/using-lumi/lumi-use-cases/business-metrics.md).

# Business Metrics

## **Advanced KPI Calculation**

### Lumi enables users to calculate custom, business-specific KPIs tailored to their organization’s performance.

**Purpose**: Lumi can manage advanced, user-defined KPIs that are unique to specific business operations, leveraging tailored business context.

View [business context set-up best practices.](/setting-up/configure-knowledge-base/add-business-context.md)

<figure><img src="/files/YR1tgsaATanXg2oyBfp9" alt=""><figcaption></figcaption></figure>

{% hint style="info" %} <mark style="color:blue;">Use Case:</mark> A supply chain manager wants to understand which products are often purchased together to improve bundling strategies. Additionally, a warehouse needs to calculate the months of supply for each item to ensure stock is maintained at optimal levels. Lumi allows these advanced KPI calculations in real time using simple language.
{% endhint %}

{% hint style="warning" %} <mark style="color:orange;">Note:</mark> These types of calculations often need to be configured and are not "out of the box" like simple aggregations above. Proper setup and business context are necessary.
{% endhint %}

> **Typical Prompts:**
>
> 1. *"Which items are most frequently ordered together over the past 6 months?"*
> 2. *"Calculate the outbound cases per hour for each warehouse in Q2 2024."*
> 3. *"What is the average lead time for deliveries, and which supplier has the longest lead time?"*
>
> **Example Output: Which items have the highest months of supply?**

<figure><img src="/files/jL8VYhamzmrrvDa3hBTA" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.lumi-ai.com/using-lumi/lumi-use-cases/business-metrics.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
