This section details how to manage and use AI-powered assistant bots in a Pyplan application. An assistant is capable of answering questions about the documents it was indexed with.
To create a new assistant bot, click on the Create new assistant button:
After clicking it, you will see the following dialog:
where:
Name: name of the assistant bot.
AI framework: you must choose one of the following AI frameworks currently available in Pyplan:
Haystack: recommended for Retrieval-Augmented Generation (RAG) assistants.
OpenAI assistant.
After confirming, the following fields will become available for you to edit:
Name: name of the assistant bot.
AI framework: you must choose one of the following AI frameworks currently available in Pyplan:
Haystack: recommended for Retrieval-Augmented Generation (RAG) assistants.
OpenAI assistant: OpenAI powered assistant. These assistant bots are linked to the following properties: - Application ID, - Company and - Server. That means: if you change the application ID of your app, you will not be able to see all the assistant bots you created with the old application ID. The same applies if the application is moved to another company or Pyplan server.
LLM model: name of the OpenAI model to use when answering questions.
Description (optional): description of the assistant bot.
Instructions: the system instructions that the assistant uses to answer questions. Pyplan provides a basic intial set of instructions.
Files in documents folder: this is where you can add or delete all the files that contain the information from which you want your assistant to answer.
Add files with nodes information: Everytime you update an assistant, Pyplan automatically will generate a file called “nodes_and_interfaces.json” that includes information about nodes that have documentation in it in the current version of the application.
Add files with interfaces information: Everytime you update an assistant, Pyplan automatically will generate a file called “nodes_and_interfaces.json” that includes information about all the interfaces in the current version of the application.
A few considerations:
If you want your assistant bot to take into account the newly added documents, you must update the assistant bot manually so that It can take reindex the new documents.
To ask questions to the activated assistant bots of your application, you must click on the following icon located at the topbar of Pyplan with your application opened:
When you first open the assistant, it will ask you whether you want to ask something about Pyplan or your application like this:
If you select My app (which is the name of the activated assistant bot), the assistant will start providing answers based on the documents you uploaded and indexed it with.
Considerations:
To start a new conversation or change the initial topic of it, you must click on the Clear messages icon button on the top of the chat window:
To ask questions about Pyplan as an application ("how do I create a new version of the app?", for example), you must choose the Pyplan option when starting the assistant from the topbar:
This assistant will answer questions about programming in Python language. It can be launched from the coding widget in the diagram and then select the “Show/hide code assistant” option:
There are three more available code assistants that you can access through the same menu:
Code bug fixer: If your node raises an exception, you can try letting the assistant fix the bug for you.
Code optimizer: The assistant will try to refactor and optimize your code for better performance and readability.
Code completer: The assistant will add new code when you provide instructions in comments within the definition of the node.
This assistant lets you change how a component is visualized by modifying its configuration within an interface.
To use it, select the “Visualizer” option, click the header of the component you want to modify to add it to the context, and then start asking your questions.
Example questions:
"Filter the ‘Month / YTD’ dimension by 'Month'".
“Highlight the rows where the P&L concept is ‘Sales’ or ‘Gross Margin’ with a blue background and white text”.
“Show numeric format with ‘$’ as prefix, 1 decimal place, and thousands separator”.
“Add a calculated item that divides Actual by Budget from the Actual vs Budget comparison”.
"Apply percentage format to the "Actual / Budget" calculated column".