Get Business Insights From Your Workflow

This article discusses ways to get insights on user interactions with the AI workflow, such as themes and trends in user questions.

AI operations team are often interested in understanding and measuring the technical performance and business impact of production workflows. Technical performance analytics, such as uptime and latency, is available in the Analytics view of each workflow. This article explores how to turn raw running logs into business insights, such as user interaction trends and process automation performance.

AI-Powered Flow Report

An AI-Powered Report is available for every workflow in StackAI and can be generated on-demand. This report contains a summary of interaction patterns, thematic analysis of inputs and outputs, and suggest workflow enhancements based on usage analysis.

Customized Flow Report

Beyond the AI-Powered Report, operators can create analytics workflow within StackAI. The rest of this article will provide example projects you can import into your organization.

Simple Report

Below is a simple form of a customized report.

Example workflow: simple report
1

Set up HTTP request

You can use the Analytics APIs to download historical data. See here for the full API documentation.

To set up the HTTP request, you will need the project ID of the production workflow and an API key.

The project ID can be found in the url of the project: https://www.stack-ai.com/project/698xxxd95/workflow. The API keys are managed by the organization Admins and can be found under Settings > API Key > Organization Private Keyarrow-up-right.

2

Review Python node

The Python node in the template is already set up to transform the historical data into LLM-ready format. You can modify the code further to adapt to your needs.

3

Set up instructions for analysis

The example project includes sample prompts. You can update prompts in the AI agent with instructions on the usage analysis and the output format.

Scheduled Report

You can run the report periodically with a trigger.

Example workflow: scheduled report
1

Set report frequency

You can configure the frequency, time, and timezone of the trigger.

2

Set report interval

The time tool fetches the date when the report is run.

The python node outputs the start date of the report. For example, if the report runs every 14 days, you can change the number of days in the code to 13, as the analysis start date is 13 days before today.

3

Update the rest of the workflow

Follow the guide in Simple Report to finish setting up the HTTP request and analysis instructions.

Scheduled Report, Delivered

You can further enhance the periodic reporting by sending an automated communication. The example project includes an Outlook tool, but you can change it to other email providers or applications.

Example workflow: scheduled report with email

Using Outlook as an example, you can create an OAuth2 connection to your email address and configure email recipients, subject, body, and attachments.

You can set up these values manually, or let AI infer from your prompt. See Prompt Optimization with Tools for more details.

Last updated

Was this helpful?