Planning Analytics

Planning Analytics

Get AI-infused integrated business planning

 View Only

Your AI Agent for IBM Planning Analytics powered by watsonx, LangChain and TM1py

By Maximilian Burkardt posted Mon January 13, 2025 04:07 PM

  
Your AI Agent for IBM Planning Analytics powered by watsonx, LangChain and TM1py

There is a lot of content about AI Agents, but how could real world examples look like? As a Prototype, I've implemented a LangChain Agent for IBM Planning Analytics to show the potential of agentic behaviour in the context of Business Analytics and decision support.

The developed PA-gentic asset is able to answer flexible user questions  as well as interact with the underlying multidimensional data source. In more detail the Agent is able to call required tools depending on the user task/question to interact with Planning Analytics and external functions, services or applications. There is one tool for retrieving values (LLM-based mdx generation and execution), one for writing values into Planning Analytics, one for retrieving domain knowledge from a company knowledge base (RAG using watsonx Discovery) and one for Python generation and execution for adhoc-tasks like a k-means clustering for a defined dataset.

A More Detailed Use Case and a Demo: se case in more detail & demo:

Before IBM, I’ve worked 7 years in the Retail and Supply Chain industry. One key learning from an analytical perpective has been the success critical role of domain knowledge for decision support. There are a lot of use cases, where you need company specific knowledge to interprete a detected pattern or anomaly correct. Let me introduce you to one example use case:

  • Question: Which sales channel offers a significant ratio of his space towards non-grocery products? What are the unit sales for this sales channel for Phones in Maryland and Massachusetts?

  • Answer: The sales channel that offers a significant ratio of its space towards non-grocery products is the Hypermarket. The unit sales for Hypermarket sales channel for Phones in Maryland is 1868.51 and in Massachusetts is 1588.77.

 
To answer such a question, the business user needs company specific knowledge about their different store concepts as well as data insights. The screen recording video below shows you the agentic Workflow.
 
PA-gentic plans the required steps to come to a final solution and executes the required tools for this. In the first step, the Agent has a look into the companies knowledge base to learn, that the questions (“…sales channel offers a significant ratio of his space towards non-grocery products…) adresses the Hypermarket sales channel. Such insights can be very company and domain specific. In the next step the Agent calls the tool for mdx generation and infuses the task from the user as well as the learning from the domain contaxt (=Hypermarket channel) into the tool call. 
After that the LLM-generated mdx statement is executed using TM1py. Based on the extacted data and the learning from the domain knowledge base the Agent comes up with the final solution.
 
The role of watsonx
 
watsonx.ai is used for the interaction with the Large Language Models. The LLM behind the LangChain Orchestrator Agent as well as the GenAI based tools are based on watsonx. I’m working with deployed Prompt Templates (PTA), which means I can manage the Prompt Templates for the Agent and tools centrally in a governed and monitored way and the Agent only needs to send the input data in Json-format to the PTA endpoint. The model instruction, examples and parameters are part of the PTA and not part of the Agent code itself.
 
 
 

This way you could change for example the LLM for mdx generation without touching the Agent code itself. Furthermore you are able to use the tracking and monitoring capabilities of watsonx.governance.
 
Next steps
 
This is a prototype with great feedback around the world. As a next step I will work on the optimization of the LLM for mdx generation (Prompt Engineering vs. Prompt Tuning vs. Finetuning) to be easier customizable for a clients specific data model and do develop a more standard process for interested clients. Furthermore I will develop the Agent logic additionally in watsonx Orchestrate.
 
If you would like to do a deep dive or ask questions, feel free reaching out to me in the community, or maximilian.burkardt@ibm.com or  on LinkedIn.
 
 
 
 
 
 
 
 
 
 
 
0 comments
30 views

Permalink