history of implementation of the GigaChat service in Luxms BI

You can't just take it and...

You can't just take it and…

Now neural networks are a hype that seems to have passed its peak of inflated expectations on the Gartner curve, and within the company we periodically argue about the usefulness of neural networks and their future. One of the disputes even went beyond the company to Data&AI forum with the topic “AI myths, hype and reality”. Therefore, we, as the team of the Luxms BI business intelligence platform vendor, could not pass by, and, at the request of one of the clients, we developed our platform in terms of integration with the GigaChat neural network model. I’ll tell you now what came of it.

Luxms BI is a data visualization and analysis platform that helps companies monitor processes, analyze performance indicators and prepare interactive reports.

GigaChat is a neural network model that understands and responds to user requests in natural language. The model is able to take into account the context in which the request is formulated, which allows it to generate relevant and context-sensitive responses. Unlike ChatGPT, GigaChat is trained on Russian-language texts and therefore understands Russian speech better.

Integration with Luxms BI

Typically, BI platforms are used for data visualization. Users often need to provide managers or other employees with reports on their work, showing graphs and giving explanations for them, since the other person may not be very immersed in the data and its specifics. And, in our opinion, providing graphs with textual explanations, conclusions, and recommendations is one of the rules of good form. But people don’t always want to write them, or they want to do it somehow easier and faster.

The purpose of integrating Luxms BI and GigaChat in this example is to make it easier for the user to prepare management reports based on data visualized in Luxms BI. And we wanted to do it in a way that AI actually helps BI users and is easy to use.

As a result, working with GigaChat in Luxms BI will be convenient and familiar for those who have ever used neural networks or even online consultant chats on websites.

Usage scenario:

  1. The user of the business intelligence system needs to provide a written (text) report to the manager;

  2. The user inside the Luxms BI system, using a visual interface, selects the dash (graph) that he needs to analyze;

  3. In the chat, the user creates requests to GigaChat and edits the result during the dialogue, iteratively creating the final text;

  4. The user transfers the generated text into a report for the manager.

But not everything was so simple for us.

What's “under the hood”

For integration we needed:

  • get GigaChat tokens (tariffs),

  • write an API so that a request is sent from the browser to the Luxms BI core, there it receives a token, and then from there it goes to GigaChat, since it is quite unsafe to store the token on the client,

  • write a large number of different routines and conduct testing.

The most difficult thing in this task was to write the query words (prompts) correctly so that the neural network would produce the required result.

Prompts used to generate responses define the role of GigaChat, the target audience and the main emphasis of the response.

For example: the neural network’s answer to the question “Who is the bullfinch?” will differ depending on the context. If we write “imagine that all birds are dinosaurs and tell us who the bullfinch is,” then the information and presentation will change.

Changing AI response depending on context

Changing AI response depending on context

In business analytics, you can also set context. For example, a prompt could indicate that GigaChat acts as a business analyst with 10 years of experience, focused on top management, and should focus on strategic aspects and key metrics. In this case, when describing sales data for the quarter, GigaChat can automatically formulate the main trends, highlight key indicators and offer recommendations for their improvement. Or he can act as an HR specialist who prepares a report on the same data for his manager, and then GigaChat will place other emphasis, for example, on the achievement of KPIs by each specific employee for bonuses.

With the help of pre-prepared messages, GigaChat receives a context for responses, through which we form an understanding of where it is, what is required of it, what is happening to it, etc. They include, among other things, a description of the visualization (title, data, categories, etc.), and GigaChat then generates text descriptions for the presented data. But not everything went smoothly.

Writing prom for a neural network is similar to teaching a child or a beginner in something. General instructions will not apply here. For example:

  • If you give a child the task of making a salad with one phrase, “Make a salad,” the result will be unpredictable and will greatly depend on the child’s previous experience: he can prepare a fruit salad or cut vegetables, but not season it with sour cream or mayonnaise, or even try to heat it in the microwave , if he thinks that what is ready is hot;

  • A new employee in the company also needs additional explanations, because even the usual phrase “make a copy of this document” can cause difficulties at different stages – he can make a photocopy, maybe a scanned copy, or maybe “freeze” in front of the MFP if he has never used it .

It’s the same with a neural network: in order to get the necessary information from it, you need to take into account many nuances and provide it with a comprehensive context. If this is not done, the results may differ greatly from the desired ones. And many casualties were lost in this battle 😀

An example of incorrect analysis and understanding of data during tests:

AI testing

AI testing

In this GigaChat integration, we did not additionally train the neural network after docking, we only gave it context – additional understanding of what we need from it specifically in our requests.

And we were able to achieve certain results. For example, when we click on the chat button, we open GigaChat, it introduces itself and offers a choice of dashes for discussion. After choosing, he offers 3 options for questions that can be asked about this dash. After each answer, it generates new questions.

Options for questions from GigaChat to yourself as part of the integration

Options for questions from GigaChat to yourself as part of the integration

At the same time, we retained the opportunity to ask GigaChat a question yourself or even give it additional context.

We are not disclosing industrial details and deeper implementation details yet – we are currently engaged in ensuring patent protection of our developments.

Clearly wording your request is critical to obtaining a correct and useful result.

Finding the right words is not an easy task

Finding the right words is not an easy task

What happened in the end

“If you suffer for a long time, something will work out,” says popular wisdom. And we got the following:

  • The user can work with the language model directly from the Luxms BI interface;

  • Information from the graphs (context) is transferred to the language model for subsequent work with it;

  • The user can generate text descriptions for visual elements;

  • The user can create formatted fragments of a text report based on data (structure, lists, etc.)

Despite significant advances, the current integration with GigaChat has several limitations:

  • Lost context when closing a chat: Currently, the context of an interaction is lost when a chat is closed, limiting the ability to further use the accumulated data to improve the interaction. In the future, we can ensure that the context is saved, since GigaChat has the technical ability to do this.

  • Need to validate results: Although GigaChat generates high-quality responses, validation of results is necessary to confirm their accuracy and relevance, especially in critical business processes. To increase reliability and factuality, you can use RAG (augmented generation). We have successful experience using RAG for tasks such as working with technical documentation, but we did not use it in this version of the application.

And then…

Since the integration of Luxms BI and GigaChat in this case freed users from the need to manually write text comments, allowing them to focus on analyzing and making decisions based on the information received, we plan to improve the work with both context and results. We have plans to develop in several directions:

  1. Description of not only individual elements, but also entire visualization panels. Expanding the capabilities of GigaChat to describe not only individual visualization elements, such as graphs and charts, but also general data, which will allow for more accurate and specific reports;

  2. Integration with Data Governance systems, priority is integration with Arenadata Catalog. The introduction of integration with data management systems will enrich the context used by GigaChat, which will increase the accuracy and completeness of the generated responses;

  3. Integration of text generation into report templates, the creation of which is already implemented in Luxms BI. Developing functionality for automatically embedding generated text into pre-prepared report templates will simplify the process of preparing documents and ensure uniformity in the presentation of information;

  4. Manage visualization parameters via GigaChat. In the future, it is planned to provide the ability to control visualization parameters, such as changing the color of bars, scaling graphs and other settings, directly through GigaChat commands. This will allow users to more flexibly and conveniently customize visual representations of data by giving commands in natural language.

This project turned out to be interesting and allowed us to take a fresh look at how and with what words we pose tasks not only to the neural network, but even to colleagues or subordinates XD

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *