Getting Started with Leapfrog AI
Leapfrog helps Cosmic Frog users explore and use their model data via natural language. View data, make changes, create scenarios, run scenarios, analyze outputs, and a whole lot more!
Leapfrog combines an extensive knowledge of PostgreSQL with the complete knowledge of Optilogic’s Anura data schema (and the Cosmic Frog models that use it), and all the natural language capabilities of today’s advanced general purpose LLMs. The model is then further fine-tuned on a growing set of prompt-response pairs hand-crafted by supply chain modeling experts, helping users go further, faster with their modeling and analysis in Cosmic Frog.
For a high-level overview and short video introducing Leapfrog, please see the Leapfrog landing page on Optilogic’s website.
In this documentation, we will first get users oriented on where to find Leapfrog and how to interact with it. In the section after, Leapfrog’s capabilities will be listed out with examples of each. Next, the Tips & Tricks section will give users helpful pointers so they can get the most out of Leapfrog. Finally, we will step through the process of building, running, and analyzing a Cosmic Frog model start to finish by only using Leapfrog!
Dive in if you’re ready to take the leap!
Interacting with Leapfrog
Getting Started
Start using Leapfrog by opening the module within Cosmic Frog:
- We are in Optilogic’s Cosmic Frog application.
- Click on the Module Menu icon (3 horizontal bars) to open the list of Cosmic Frog modules.
- Select Leapfrog from the list.
Once the Leapfrog module is open, users’ screens will look similar to the following screenshot:
- While inside the Leapfrog module, users will see the jumping frog icon at the top, to the right of the Module Menu icon.
- Leapfrog will greet you with a short introduction of how it works and how it can help users. This message is shown as the first one in new conversations between Leapfrog and the user.
- User can add questions / prompts to the conversation by typing in the “Enter a question” free text box at the bottom of the screen. After typing in a prompt, hit the Enter key or click on the send icon on the right to submit it to Leapfrog.
- Several example prompts are shown here to help users get started with Leapfrog. Clicking on 1 will submit it to Leapfrog and Leapfrog will then respond to it.
- The second option under the question mark icon at the top is “Open Leapfrog Help”, which will open this Help article in a new tab of the browser.
When first starting to use Leapfrog, users will also see the Privacy and Data Security statement, which reads as follows:
“Leapfrog AI Training: Optilogic does not use your model data to train Leapfrog. We do collect and store conversational data so it can be accessed again by the user, as well as to understand usage patterns and areas of strength/weakness for the LLM. Included in this data: natural language input prompts, text and SQL responses, as well as feedback from users. This information is maintained by Optilogic, not shared with third parties, and all of the conversation data is subject to the data security and privacy terms of the Optilogic platform.”
This message will stay visible within Leapfrog whenever it is being used, unless user clicks on the grey cross button on the right to close the message. Once closed, the message will not be shown again while using Leapfrog.
Leapfrog Responds to Questions
Depending on the type of question, Leapfrog’s response to it can take different forms: text, links, SQL queries, data grids, and options to create scenarios & scenario items. We will look at several examples of questions that result in these different types of responses in this section.
For our first question, we used the first example prompt “What are the top 3 products by demand?” by clicking on it, which results in the following response from Leapfrog:
- The example prompt that was submitted to Leapfrog.
- The top part of Leapfrog’s response shows a SQL Query, which can answer the question that was posed. By default, the SQL Query is expanded, so the SQL statement is visible. User can collapse the SQL statement by clicking on the button with the arrowhead pointing down. In this case, the SQL Statement uses a SELECT query, applied to the Customer Demand input table where it sums the Quantity field for each unique Product Name. The result is sorted by this summed Total Quantity in descending order (high to low), and the top 3 products are then filtered out by using the Limit 3 clause.
- If user wants to use the SQL Statement elsewhere, it can be copied to the clipboard by clicking on the button with 2 squares at the bottom of the query.
- When prompts result in a response from Leapfrog in the form of a SQL SELECT statement, a Data Grid is shown beneath the SQL Query. This Data Grid shows the result of the SQL Query, and it is by default expanded too. It can be collapsed by clicking on the button with the arrowhead pointing down. Please note that this preview of the data grid is limited to 50 rows.
- There are several options for the user on how to use the data grid by clicking on one of the 3 icons at the bottom of it. These perform following actions, from left to right: export the data grid to an .xlsx Excel file, export the data grid to a .csv file, and save the data grid as a table or view. These options are explained in more detail in the section “Data Grid Options” further below.
- For Leapfrog’s continuous improvement, it is helpful when users rate Leapfrog’s responses by clicking on the thumbs up or thumbs down buttons at the top right of a response, and, optionally, include more details in this feedback. Giving Leapfrog feedback is explained in more detail in the section “Feedback for Continuous Improvement” further below.
This first prompt asked a question about the input data contained in the Cosmic Frog model. Let us now look at a slightly different type of prompt, which asks to change model input:
- The prompt asks Leapfrog to Increase demand by 20%.
- This prompt results in an UPDATE SQL Statement, where the Quantity field on the Customer Demand input table will be set to its current value multiplied by 1.2, resulting in the asked for 20% increase.
- Prompts that result in actionable SQL queries (i.e. UPDATE, INSERT, and DELETE Statements) will show a Run SQL button at the bottom of the SQL Query section of the response. If user wants to make this change in the input table directly (changing this table permanently), user can click on the Run SQL button to perform this action. See the next screenshots below which step through this, including looking at the input table before and after the query is run.
- For this type of prompt that results in an UPDATE SQL query, a Scenarios section is also part of the response, giving user the option to create a scenario that makes the change to the input data when that specific scenario is run, rather than making the change permanently in the master data in the input table. We will explore how this works below after walking through the Run SQL option.
We are going to run the SQL query of the above response to our “Increase demand by 20%” prompt. Before doing so, let’s review a subset of 10 records of the Customer Demand input table (under the Data Module, in the Input Tables section):
Next, we will run the SQL query:
- Click on the Run SQL button.
- In the message confirming user wants to run the SQL query against the model that comes up, user can opt to cancel out if deciding not to make this permanent change to the Quantity field on the Customer Demand input table.
- User can click on the Run SQL button in the message when ready to make this change.
After clicking the Run SQL button at the bottom of the SQL Query section in Leapfrog’s response, it becomes greyed out so it will not accidentally be run again. Hovering over the button also shows text indicating the query was already run:
Note that closing and reopening the model or refreshing the browser will revert the Run SQL button’s state so it is clickable again.
Opening the Customer Demand table again and looking at the same 10 records, we see that the Quantity field has indeed been changed to its previous value multiplied by 1.2 (the first record’s value was 643, and 643 * 1.2 = 771.6, etc.):
Running the SQL query to increase the demand by 20% directly in the master data worked fine as we just saw. However, if we do not want to change the master data, but rather want to increase the demand quantity as part of a scenario, this is possible too:
- We are looking at the same “Increase demand by 20%” prompt and response pair again.
- The SQL Query section has been collapsed now.
- The Scenarios section has been expanded here. It contains details for creating a new scenario in the Cosmic Frog model based on the prompt:
- A name for the new scenario to be created has been auto generated based on the prompt and is called “Increase Customer Demand by 20 Percent”.
- Similarly, a name for the new scenario item that will be assigned to the new scenario has been auto generated too and it is also called “Increase Customer Demand by 20 Percent”.
- The details of the scenario item are listed here:
- The name of the table to which the change is made: CustomerDemand.
- The action that represents the change made: quantity = quantity * 1.2.
- The filter condition that determines which records of the table the action will be applied to: None (meaning that the change is made to all records in the table).
- User can click on the Create Scenario button to create the scenario and item using these names and details. After clicking on the Create Scenario button, it becomes greyed out and the hover over text also indicates that the scenario has already been created:
After navigating to the Scenarios module within our Cosmic Frog model, we can see the scenario and its item have been created:
- There is now a scenario named “Increase Customer Demand by 20 Percent” in our list of scenarios.
- This scenario has 1 item assigned to it, named “Increase Customer Demand by 20 Percent”. The details of which match those listed out in the Scenarios section of the Leapfrog response:
- Table Name is set to CustomerDemand.
- The actions change the quantity field to its current value multiplied by 1.2.
- There are no conditions for the scenario item, so the actions are applied to all records in the Customer Demand table.
Note that if desired, the scenario and scenario item names auto generated by Leapfrog can be changed in the Scenarios module of Cosmic Frog: just select the scenario or item and then choose “Rename” from the Scenario drop-down list at the top.
As a final example of a question & answer pair in this section, let us look at one where Leapfrog responds with text:
Leapfrog Conversations
Prompts and their responses are organized into conversations in the Leapfrog module:
- We are in the Leapfrog module, looking at the list of Conversations.
- All conversations that were created within the currently active Cosmic Frog model are listed here. By default, they are named the same as the first prompt in the conversation.
- When hovering over a conversation, text will pop up telling the user how many prompts and responses that specific conversation contains.
Users can organize their conversations with Leapfrog by using the options from the Conversations drop-down at the top of the Leapfrog module:
- The Conversations drop-down menu, which has following options:
- Choose the New option to start a new conversation. Users may want to do this to keep conversations shorter and organized. One could for example have a conversation that is only about querying output data, another conversation that revolves around creating new scenarios, and a third one that focuses on creating views to be used for Analytics dashboards. This way user does not need to scroll through one very long conversation to return to specific prompts.
- Rename can be used to change the names of conversations, to for example be more concise and more descriptive of the whole conversation rather than just referring to the first prompt of the conversation.
- To keep things organized, conversations that were not giving the desired responses or those that have become irrelevant can be deleted by using this Delete option.
Feedback for Continuous Improvement
Users can rate Leapfrog responses by clicking on the thumbs up (like) and thumbs down (dislike) buttons and, optionally, providing additional feedback. This feedback is used to continuously improve Leapfrog. Giving a thumbs up to indicate the response is what you expected helps reinforce correct answers from Leapfrog. When a response is not what was expected or wrong, users can help improve Leapfrog’s underlying LLM by giving the response a thumbs down. Especially thumbs down ratings & additional feedback will be reviewed so Leapfrog can learn and become more useful all the time.
When a response is not as expected as was the case in the following screenshot, user is encouraged to click the thumbs down button:
- This prompt asks to add a product named RAW_4 to an existing group named ALL_RAW_GROUP.
- Leapfrog responds with an UPDATE SQL Query which will set the MemberName to RAW_4 of all records that have GroupName set to ALL_RAW_GROUP, which will change the existing members of the ALL_RAW_GROUP. This is not what the user intended.
- User has clicked on the thumbs down (Dislike) button, which is now a darker shade of blue and increased in size. This feedback is submitted immediately after clicking the thumbs down button.
- After clicking the thumbs down button, a form where additional feedback can optionally be given is opened. There are 5 tags here that user can click to indicate why the response was given a thumbs down (note that multiple tags can be selected if desired):
- Table/Field Issue: use this when Leapfrog’s SQL response was targeting a different table and/or field than user intended.
- Query Type: use this when Leapfrog’s SQL response was of a different query type than expected (e.g. UPDATE instead of DELETE).
- Incomplete: use this when any part of the response seems incomplete.
- Slow Response: use this if Leapfrog took an unusually long time to provide a response.
- Other: use this if the other 4 tags do not cover the issue user sees with the response.
- In the “Type your feedback here” textbox, user can type in a brief description of why the response was given a thumbs down (or thumbs up).
- If user decides not to send the additional feedback, they can click on the Close button.
- When user has selected the appropriate tag(s) and typed in their feedback, they can submit it by clicking on the Send button. Note that user needs to type something in the “Type your feedback here” textbox for the Send button to become active.
After clicking on the Send button, the additional feedback is summarized by Leapfrog and added to the conversation:
- A message thanking user for the feedback is shown and the thumbs down icon is shown in a darker shade of blue while also having been increased in size.
- The tag(s) and text of the additional feedback are added to the conversation and labelled “Feedback”.
The next screenshot shows an example where user gave Leapfrog’s response a thumbs up as it was what user expected. This feedback can then be used by Leapfrog to reinforce correct answers. User also had the option to provide additional feedback again, using any of the following 4 optional tags: Showcase Example, Surprising, Fun, and Repeatable Use Case. In this example, user decided not to give additional feedback and clicked on the Close button after the additional feedback form came up:
If you have any additional Leapfrog feedback (or questions) beyond what can be captured here, you can feel free to send an email to Leapfrog@Optilogic.com. You are also very welcome to ask questions, share your experiences, and provide feedback on Leapfrog in the Frogger Pond Community.
Please note that the screenshots in the remainder of this document mostly show the thumbs up & down feedback icons at the top right of Leapfrog responses whereas they will be at the bottom left in your Leapfrog responses.
Data Grid Options
We will now go back to our first prompt “What are the top 3 products by demand” to explore some of the options users have when Data Grids are included in a Leapfrog response, which is the case when Leapfrog’s SQL Query response is a SELECT statement.
- Clicking on the grid icon exports the data grid to an .xlsx Excel file. Following 2 messages will appear below the Data Grid when exporting the Data Grid, these can be closed by clicking on the grey cross on the far right in the messages:
When clicking on the Download File button, a zip file with the name of the active Cosmic Frog model appended with an ID, is downloaded to the user’s Downloads folder. The zip contains:
-
- An .xlsx file of the same name as the zip file. This Excel file contains a query_results worksheet which contains the data that was the result of the SQL Query of the Leapfrog response in Cosmic Frog. This is the same data as seen in the Data Grid, or possibly more if the result is more than 50 rows (the Data Grid preview is limited to 50 rows). The other worksheets in this Excel file contain the SQL Query on the source_query worksheet and the mapping of table or view names to worksheet names on the Sheet Mapping worksheet.
- A README.txt file with the same name as the zip file – this file contains notes about Excel limitations regarding maximum number of rows and maximum number of characters for worksheet names and how these are handled.
- A subfolder with the same name as the zip file which contains 3 more files. These are the same files that will be downloaded when user chooses to Export to CSV (see next bullet, #2):
- metadata.txt – contains the log messages of the export.
- query_results.csv – contains all results of the query.
- source_query.sql – contains the SQL Statement that was used to generate the data in the query_results.csv, the same SQL SELECT statement seen in Leapfrog’s response.
- Clicking on the icon with the comma exports the data grid to a .csv file. The same 2 messages as shown above for exporting Excel files will appear. Once the file is created and user has clicked on the Download File button, a zip file with the name of the active Cosmic Frog model appended with an ID, is downloaded to the user’s Downloads folder. This folder contains 3 files, which are the same as those listed under bullet 1.c above.
- Clicking on the disk icon allows user to save the data grid as a new table or view within the active Cosmic Frog model’s database. It brings up the following form on the right-hand side where user can choose to Save as either a Table or View, give the new table/view a Name and then click on Save to save the table or view.
After clicking on Save, following message appears beneath the Data Grid in Leapfrog’s response:
Looking in the Custom Tables section (#2 in screenshot below) of the Data module (#1 in screenshot below), we indeed see this newly created table named top3products (#3 in screenshot below) with the same contents as the Data Grid of the Leapfrog response:
If we choose to save the Data Grid as a view instead of a table, it goes as follows:
We choose Save as View and give it the name of Top3Products_View. The message that comes up once the view is created reads as follows:
Going to the Analytics module in Cosmic Frog, choosing to add a new dashboard and in this new dashboard a new visualization, we can find the top3products_view in the Views section:
- The Data Grid previews in Leapfrog responses have some of the same options as the input, output, and custom tables in the Data module of Cosmic Frog. When clicking on the 3 vertical dots, the available options are shown:
-
- Pin column: option to fix the location of the column, either left or right. By default, columns are not pinned (the No Pin option).
- Autosize This Column: resizes the width of the selected column to fit the column heading and column values.
- Autosize All Columns: resizes the width of all columns to fit the column heading and column values.
- Choose Columns: lets user select which columns to show and which to hide.
- Reset Columns: undo any resizing, reordering and custom selection of columns to revert to the original grid layout and contents.
- Users can manually resize columns by clicking on the vertical bar to the right of the icon with 3 vertical dots and then dragging left or right.
Please note:
- The Data Grid preview within Leapfrog responses is limited to 50 rows. When exporting to Excel/CSV or saving as a table/view, all records that result from the SQL SELECT statement will be included.
- A Custom Table created by saving a Data Grid as a table is a static snapshot of the data represented by the SELECT at the time the table is created and will not change if data changes in the model. Conversely, a View saves the SQL statement so any time you access that View it will pull a live, up-to-date picture of the data represented by the SELECT statement.
Leapfrog Capabilities
In this section we will list out what Leapfrog is capable of and give examples of each capability.
These capabilities include:
- Querying data in the input and output tables
- Changing data in the input tables directly
- Creating scenarios and scenario items
- Creating groups, and adding group members
- Creating new models
- Running models
- Geocoding locations
- Leapfrog is self-aware
- Multi-language support
Each of these capabilities will be discussed in the following sections, where a brief description of each capability is given, several example prompts illustrating the capability are listed, and a few screenshots showing the capability are included as well.
Querying Data
Interrogate input and output data using natural language. Use it to check completeness of input data, and to summarize input and/or output data. Leapfrog responds with SELECT Statements and shows a Data Grid preview as we have seen above. Export the data grid or save it as a table or view for further use, which has been covered above already too.
Example prompts:
- Are there any facilities, customers or suppliers that are not geocoded?
- Show me any product names used in the Bills of Materials table that are not specified as product names in the Products table.
- Show me the lowest cost scenario and any other scenarios within 5% of that lowest cost.
- Which largest customers account for 80% of the demand quantity?
- What is the average distance for flows from Assembly locations to DCs?
- Show me work centers that have utilization below 30% during all periods of the model.
- Which facilities have throughput utilization above 90% during any period of the model?
- How many routes does each scenario have?
- What is the lowest cost Greenfield scenario?
The following 3 screenshots show examples of checking input data (first screenshot), and interrogating output data (second and third screenshot):
Changing, Adding, and Removing Data
Tell Leapfrog what you want to edit in the input data of your Cosmic Frog model, and it will respond with UPDATE, INSERT, and DELETE SQL Statements. User can opt to run these SQL Queries to permanently make the change in the master input data. For UPDATE SQL Queries, Leapfrog’s response will also include the option to create a scenario and scenario item that will make the change, which we will focus on in the next section.
Example prompts:
- Increase demand by 15%.
- Exclude all Suppliers that are based in Europe.
- Remove all Facilities that are located in the USA.
- Add a transportation policy from the group DCs to the group Customers.
- On the DCs to Customers transportation policy set unit cost to 0.8.
The following 3 screenshots show examples changing values in the input data (first screenshot), adding records to an input table (second screenshot), and deleting records from an input table (third screenshot):
Creating Scenarios and Scenario Items
Make changes to input data, but through scenarios rather than updating the master tables directly. Prompts that result in UPDATE SQL Queries will have a Scenarios part in their responses and users can easily create a new scenario that will make the input data change by one click of a button.
Example prompts:
- Change the inventory carrying cost percentage in the Model Settings table to 12.
- Include processes that have “Include Expansion 2027” in the Notes field.
- Exclude all inventory policies.
- Decrease demand by 20% and increase sourcing costs by 5%.
The following 3 screenshots show example prompts with responses from which scenarios can be created: create a scenario which makes a change to all records in 1 input table (first screenshot), create a scenario which makes a change to records in 1 input table that match a condition (second screenshot), and create a scenario that makes changes in 2 input tables (third screenshot):
The above screenshots show examples of Leapfrog responses that contain a Scenarios section and from which new scenarios and scenario items can be created by clicking on the Create Scenario button. In addition to the above, users can also use Leapfrog to manage scenarios by using prompts that specifically create scenarios and/or items and assigning specific scenario items to specific scenarios. These result in INSERT INTO SQL Statements which can then be implemented by using the Run SQL button. See the following 2 screenshots for examples of this, where 1) a new scenario is created and an existing scenario item is then assigned to it, and 2) a new scenario item is created which is then assigned to an already existing scenario:
Creating Groups and Adding Group Members
Leapfrog can create new groups and add group members to new and existing groups. Just specify the group name and which members it needs to have in the prompt and Leapfrog’s response will be one or multiple INSERT INTO SQL Statements.
Example prompts:
- Add all Facilities with FacilityStatus = Consider to a new group named Candidate_Facilities.
- Create a new Group named TruckModes and add Modes that contain Truck in their names to it.
- Add RM10 to the RAW_MATERIALS group.
- Create a group “TEXAS_Customers” and add customers located in Texas to it.
The following 4 screenshots show example prompts of creating groups and group members: 1) creates a new products group and adds products that have names with a certain prefix (FG_) to it, 2) creates a new periods group and adds 3 specific periods to it, 3) creates a new suppliers group and adds all suppliers that are located in China to it, and 4) adds a new member to an existing facilities group, and in addition explicitly sets the Status and Notes field of this new record in the Groups table:
Creating New Models
Leapfrog can create a new, blank model. Leapfrog responds by immediately creating the new model and the response contains a link which takes user to the Leapfrog module in this newly created model in a new tab of the browser.
Example prompts:
- Create a new model named “Simulation Test 1”
- Start a new blank model
- In this case Leapfrog will give it a default name like NewModel
Following screenshot shows an example where a new model named “CreatedByLeapfrog” was created:
Running Models
You can ask Leapfrog to kick off any model runs for you. Optionally you can specify the scenario(s) you want to be run, which engine to use, and what resource size to use. If no engine is specified, the Neo engine (Network Optimization) will be used. If no resource size is specified, S will be used. Leapfrog’s response will summarize the scenario(s) that are run, the engine that is used and the resource size that is used. In addition, it contains a link to the Run Manager application on Optilogic’s platform, which will be opened in a new tab of the browser when clicked. In the Run Manager, users can monitor the progress of any model runs.
The engines available in Cosmic Frog are:
- Neo – Network Optimization
- Infeasibility – infeasibility diagnosis for Neo
- Throg – Simulation
- Triad – Greenfield
- Hopper – Transportation Optimization
- Dendro – Inventory Optimization
The resource sizes available are as follows, from smallest to largest: Mini, 4XS, 3XS, 2XS, XS, S, M, L, XL, 2XL, 3XL, 4XL, Overkill.
Example prompts:
- Run my model.
- Please note that this will run all scenarios present in the model.
- Please run the Baseline scenario using the Hopper engine and a resource size of XS.
- Please run Greenfield on the 7 Optimal Facilities scenario.
The following 2 screenshots show example prompts where the responses are to run the models: only specify the scenario name and then a network optimization (Neo) is run using resource size S (first screenshot), and specifically run Greenfield (Triad) on 2 scenarios, where the resource size to be used is specified in the prompt (second screenshot):
Geocoding Locations
Leapfrog can find latitude & longitude pairs for locations (customers, facilities, and suppliers) based on the location information specified in these input tables (e.g. Address, City, Region, Country). Leapfrog’s response will contain a link which will open a Cosmic Frog map showing the locations that have been geocoded in a new tab of the browser.
Example prompts:
- Geocode all locations.
- Geocode my customers.
- Geocode Facilities and Suppliers.
Notes on using Leapfrog for geocoding locations:
- Only locations where either the latitude value or the longitude value or both are blank will be geocoded. Locations where latitude = longitude = 0 will not be geocoded and neither will locations which already have values for both latitude and longitude.
- Currently, it is not possible to specify that only a subset of locations in a table should be geocoded.
In the following screenshot, user asks Leapfrog to geocode facilities and suppliers:
As geocoding a larger set of locations can take some time, it may look like the geocoding was not done or done incompletely if looking at the map or in the Customers / Facilities / Suppliers input tables shortly after kicking off the geocoding. A helpful tool which shows the progress of the geocoding (and other tools / utilities within Cosmic Frog) is the Model Activity list:
- Open the Model Activity list by clicking on the speech bubble icon at the top of the screen, towards the right.
- After the “Geocode my customers” prompt was submitted to Leapfrog, the “Geocoding customers table” activity appeared in the list of model activities. It shows the progress of the geocoding, and this status is refreshed frequently. Once the geocoding completes, click on the link in Leapfrog’s response to view the geocoded data. The link opens a new tab in the browser and shows Cosmic Frog’s Maps module with the Customers layer on the Supply Chain map enabled:
Leapfrog is Self-aware
Leapfrog knows about itself, Optilogic, Cosmic Frog and the Anura database schema, LLM’s, and more. Ask Leapfrog questions so it can share its knowledge with you.
Example prompts:
- What are you, Leapfrog?
- Can you show me the latest release notes?
- Can you tell me about Large Language Models?
- What version are you?
- What are you good at?
- What are you not so good at?
- What are the options for the Simulation Policy field on the Inventory Policies table?
- Please tell me about scenarios in Cosmic Frog.
- What is the default value for the circuity factor in the Model Settings table?
The following 4 screenshots show examples of these types of prompts & Leapfrog’s responses: 1) ask Leapfrog about its version, 2) Leapfrog knows what it is good at, 3) and also what it is less good at, and 4) an example of getting information about a specific field and the values it can be set to:
Multi-Language Support
Even though this documentation and Leapfrog example prompts are predominantly in English, Leapfrog supports many languages so users can ask questions in their most natural language. Where the Leapfrog response is in text form, it can respond in the language the question was asked in. Other response types like a standard message with a link or names of scenarios and scenario items will be in English.
The following 3 screenshots show: 1) a list of languages Leapfrog supports, 2) a French prompt to reduce transportation costs by 15%, and 3) a Spanish prompt asking Leapfrog about its version, which Leapfrog responds to in Spanish:
Tips & Tricks
To get the most out of Leapfrog, please take note of these tips & tricks:
- Each Conversation thread is related to the active Cosmic Frog model. So, if you ask Leapfrog to “show me [this]” it will only pull that information from your active model.
- Conversation history is stored on the platform at the user level – not in the model database – so it does not get shared when a model is shared.
- Asking Leapfrog a question does not change your model: the response is not executed unless user decides to go ahead with it by clicking on an additional button (e.g. Run SQL, Create Scenario, etc.).
- Note that creating models, running models or geocoding locations will start immediately after the user has asked Leapfrog to perform these tasks without additional confirmation from the user. If a model run has accidentally been kicked off, it can be cancelled through the Run Manager.
- Optilogic is confident Leapfrog will help many users use Cosmic Frog more efficiently and we are very proud of it. It is not perfect, however. Therefore, users are encouraged to review Leapfrog’s responses carefully before making changes to model data.
- Leapfrog (and LLMs generally) are non-deterministic. This means that you can expect to see slight variations in responses – in particular with text responses – for the exact same input prompt.
- Leapfrog has a ‘memory’ within each unique Conversation. This means you can reference a previous prompt or response in a subsequent request. This is helpful for building upon, clarifying, or making adjustments to get the exact response you are looking for. Think for example of follow-up prompts like “I meant …”, “Like that, but with X changed”, “And how about Y?”, etc. Some examples of these are shown in screenshots at the end of this section.
- Leapfrog is an eager conversationalist and will always do its best to answer your request. It is still learning though, and sometimes it gets off track. Some tactics to resolve this are:
- Try achieving what you desire in multiple steps. Some examples are shown in screenshots at the end of this section.
- If possible, use more explicit prompts which use table and field names. Some examples are shown in screenshots at the end of this section.
- Start a new conversation when your line of questioning changes or when the responses you are receiving are clearly off track.
- Within prompts, users can create new lines using Shift + Enter. This is convenient when for example entering a list, as shown in the following screenshot:
- You can personalize the avatar you see when conversing with Leapfrog. By default, this avatar just uses the first letter of your Optilogic account name. Your Leapfrog user avatar is linked to your Frogger Pond Community profile: simply go to Frogger Pond Community > Profile icon > Preferences > Preferences > Profile Picture to update it.
- Instead of typing prompts, you can also use voice to text if your computer supports this. “Online speech recognition” will need to be turned on when using Windows. You can find this by going to Start > Settings > Privacy (Windows 10) / Privacy & security (Windows 11) > Speech. Once there, you will see a toggle to turn online speech recognition on and off:
After this is turned on, you can start using it by pressing the keyboard’s Windows key + H. A bar with a microphone which shows messages like “initializing”, “listening”, “thinking” will show up at the top of your active monitor:
Now you can speak into your computer’s microphone, and your spoken words will be turned into text. If you put your cursor in Leapfrog’s question / prompt area, click on the microphone in the bar at the top so your computer starts listening, and then say what you want to ask Leapfrog, it will appear in the prompt area. You can then click on the send icon to submit your prompt / question to Leapfrog.
The following screenshots show several examples of how one can build on previous prompts and responses and try to re-direct Leapfrog as described in bullets 6 and 7 of the Tips & Tricks above. In the first example user wants to delete records from an input table whereas Leapfrog’s initial response is to change the Status of these records to Exclude. The follow-up prompt clarifies that user wants to remove them. Note that it is not needed to repeat that it is about facilities based in the USA, which Leapfrog still knows from the previous prompt:
In the following example shown in the next 2 screenshots, user starts by asking Leapfrog to show the 2 DCs with the highest throughput. User means for each scenario but has not stated this explicitly and Leapfrog’s first response is not what user intended. In the follow-up prompt the user clarifies this (“I meant…”) without needing to repeat the whole question:
In the next 2 screenshots we see an example of first asking Leapfrog to show outputs that meet certain criteria (within 10%), and then essentially wanting to ask the same question but with the criteria changed (within 5%). There is no need to repeat the first prompt, it suffices to say something like “How about with [changed criteria]?”:
When Leapfrog only does part of what a user intends to do, it can often still be achieved in multiple steps. See the following screenshots where user intended to change 2 fields on the Production Count Constraints table and initially Leapfrog only changes one. The follow-up prompt simply consists of “And [change 2]”, building on the previous prompt. In the third prompt user was more explicit in describing the 2 changes and then Leapfrog’s response is what user intended to achieve:
In the following screenshot we see how Leapfrog did not understand user’s intention to add a new group member (product RAW_4) to an existing products group from the wording of this prompt. Instead, it will update all members of the ALL_RAW_GROUP to RAW_4 if the SQL of this prompt is run. Adding more explicit language to indicate that RAW_4 is intended to be a new member of this existing group in the second prompt achieves what was intended:
Build, Run, and Analyze a Model using just Leapfrog!
Here we will step through the process of building a complete Cosmic Frog demo model, creating an additional scenario, running this new scenario and the Baseline scenario, and interrogating some of the scenarios’ outputs, all by using only Leapfrog.
Please note that if you are trying the same steps using Leapfrog in your Cosmic Frog:
- You may notice some small differences in data in the input and output tables as compared to the below, as the same prompt can result in different responses. For example, names of locations can be different if not explicitly specified in the prompt, and generating random numbers can result in different sets of numbers on different computers.
- In the screenshots below the order of the columns has sometimes been changed and records may appear in a different order due to sorting.
We will first list the prompts that were used to build, run, and analyze the model, and then review the whole process step-by-step through (lots of!) screenshots. Here is the list of prompts that were submitted to Leapfrog:
- Create a new blank model called US Distribution
- Add 4 items to the Products table. Name them: Bullfrog_Train, Amphibian_Slime, Toady_Squishy, and Polliwog_Table with status = Include.
- Help me add locations. Set status for all of these to Include.
- add 3 DCs into Facilities table at the following locations: Memphis, TN Reno, NV Jacksonville, FL
- Add into Facilities table 2 MFG locations: one in Detroit, MI and the other in Dallas, TX
- add 50 customers into Customers table located at the capital city of each state of USA.
- Geocode all of my sites
- Generate demand for all customers for all products with random quantity between 10 and 1000. Insert this into CustomerDemand table with status = include
- Set model start date = 1/1/2025 and end date = 12/31/2025
- Insert the following lanes into Transportation Policies with status = Include.
- From all facilities starting with MFG to all facilities starting with DC, these all come from the Facilities table
- From all facilities starting with DC to all customers
- In transportation policies, put in transportation unit cost of $0.02 for lanes from DCs and $0.01 for MFG-DC lanes. Use EA-MI as uom for the cost.
- Add Production Policies for each facility starting with “MFG” for all products
- Populate throughput capacity for DCs = 50k for Reno and Memphis and 100k for Jacksonville
- Create a scenario which increases DC Memphis throughput capacity to 100k
- Run network optimization on both scenarios
- Where do I look for customer flow comparison between scenarios?
- From the optimizationflowsummary table, using the CustomerFulfillment flows, compare the source used by each destination and show me the destinations with different sources in baseline vs. increase Memphis dc capacity scenario.
- Like that, but show me the distinct combinations.
- What’s the cost difference between both scenarios?
- Show me outbound quantity comparison for DCs
And here is the step-by-step process shown through screenshots, starting with the first prompt given to Leapfrog to create a new empty Cosmic Frog model with the name “US Distribution”:
Clicking on the link in Leapfrog’s response will take user to the Leapfrog module in this newly created US Distribution model:
- The name of the model shown at the top in Cosmic Frog: US Distribution.
- Next, we have added the second prompt to add 4 products to the Products table, where we specify their names, and that the Status field needs to be set to Include.
- User clicked on the Run SQL button to execute the SQL query to add the products, which we double-check ran OK by opening the Products table:
In the next prompt (the third one from the list), distribution center (DC) and manufacturing (MFG) locations are added to the Facilities table, and customer locations to the Customers table. Note the use of a numbered list to help Leapfrog break the response up into multiple INSERT INTO statements:
After running the SQL of that Leapfrog response, user has a look in the Facilities and Customers tables and notices that as expected all Latitude and Longitude values are blank:
Since all Facilities and Customers have blank Latitudes and Longitudes, our next (fourth) prompt is to geocode all sites:
Once the geocoding completes (which can be checked in the Model Activity list), user clicks on one of the links in the Leapfrog response. This opens the Supply Chain map of the model in a new tab in the browser, showing Facilities and Customers, which all look to be geocoded correctly:
We can also double-check this in the Customers and Facilities tables, see for example next screenshot of a subset of 5 customers which now have values in their Latitude and Longitude fields:
For a (network optimization – Neo) model to work, we will also need to add demand. As this is an example/demo model, we can use Leapfrog to generate random demand quantities for us, see this next (fifth) prompt and response:
After clicking the Run SQL button, we can have a look in the Customer Demand input table, where we find the expected 200 records (50 customers which each have demand for 4 products) and eyeballing the values in the Quantity field we see the numbers are as expected between 10 and 1000:
Our sixth prompt sets the model end and start dates, so the model horizon is all of 2025:
Again, we can double-check this after running the SQL response by having a look in the Model Settings input table:
We also need Transportation Policies, the following prompt (the seventh from our list) takes care of this and creates lanes from all MFGs to all DCs and from all DCs to all customers:
We see the 6 enumerated MFG (2 locations) to DC (3 locations) lanes when opening and sorting the Transportation policies table, plus the first few records of the 150 enumerated DC to customer lanes. No Unit Costs are set so far (blank values):
Our eighth prompt sets the transportation unit costs on the transportation policies created in the previous step. All use a unit of measure of EA-MI which means the costs entered are per unit per mile, and the cost itself is 1 cent on MFG to DC lanes and 2 cents on DC to customer lanes:
Clicking the Run SQL button will run the 4 UPDATE statements, and we can see the changes in the Transportation Policies input table:
In order to run, the model also needs Production Policies, which the next (ninth) prompt takes care of: both MFG locations can produce all 4 products:
Again, double-checking after running the SQL from the response, we see the 8 expected records in the Production Policies input table:
Our 3 DCs have an upper limit as to how much throughput they can handle over the year, this is 50,000 for the DCs in Reno and Memphis and 100,000 for the DC in Jacksonville. Prompt number 10 sets these:
We can see these numbers appear in the Throughput Capacity field on the Facilities input table after running the SQL of Leapfrog’s response:
We want to explore what happens if the maximum throughput of the DC in Memphis is increased to 100,000; this is what the eleventh prompt asks to do:
Leapfrog’s response has both a SQL UPDATE query, which would change the throughput at DC_Memphis in the Facilities input table, and a Scenarios section. We choose to click on the Create Scenario button so a new scenario is created (Increase Memphis DC Capacity) which will contain 1 scenario item (set_dc_memphis_capacity_to_100000) that sets the throughput capacity at DC_Memphis to 100,000:
Our small demo model is now complete, and we will use Leapfrog (using our twelfth prompt) to run network optimization (using the Neo engine) on the Baseline and Increase Memphis DC Capacity scenarios:
While the scenarios are running, we are thinking about what will be interesting outputs to review, and ask Leapfrog about how one can compare customers flows between scenarios (prompt number 13):
This information can come in handy in one of the next prompts to direct Leapfrog on where to look.
Using the link from the previous Leapfrog response where we started the optimization runs for both scenarios, we open the Run Manager in a new tab of the browser. Both scenarios have completed successfully as their State is set to Done:
Looking in the Optimization Network Summary output table, we also see there are results for both scenarios:
In the next few prompts Leapfrog is used to look at outputs of the 2 scenarios that have been run. The prompt (number 14 from our list) in the next screenshot aims to get Leapfrog to show us which customers have a different source in the Increase Memphis DC Capacity scenario as compared to the Baseline scenario:
Leapfrog’s response is almost what we want it to be, however it has duplicates in the Data Grid. Therefore, we follow our previous prompt up with the next one (number 15), where we ask to see only distinct combinations. Instead of “distinct” we could have also used the word “unique” in our prompt:
We see that the source for around 11-12 customers changed from the DC in Jacksonville in the Baseline to the DC in Memphis in the Increase Memphis DC Capacity scenario.
Cost comparisons between scenarios are usually interesting too, so that is what prompt number 16 asks about:
We notice that increasing the throughput capacity at DC_Memphis leads to a lower total supply chain cost by about 56.5k USD. Next, we want to see how much flow has shifted between the DCs in the Baseline scenario compared to the Increase Memphis DC Capacity scenario, which is what the last prompt (number 17) asks about:
This tells us that the throughput at DC_Reno is the same in both scenarios, but that increasing the DC_Memphis throughput capacity allows a shift of about 24k units from the DC in Jacksonville to the DC in Memphis (which was at its maximum 50k throughput in the Baseline scenario). This volume shift is what leads to the reduction in total supply chain cost.
We hope this gives you a good idea of what Leapfrog is capable of today. Stay tuned for more exciting features to be added in future releases!
Do you have any Leapfrog questions or feedback? Feel free to use the Frogger Pond Community to ask questions, share your experiences, and provide feedback. Or, shoot us an email at Leapfrog@Optilogic.com.
Happy Leapfrogging!