Skip links

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:

DOC 68 Leapfrog 101

  1. We are in Optilogic’s Cosmic Frog application.
  2. Click on the Module Menu icon (3 horizontal bars) to open the list of Cosmic Frog modules.
  3. Select Leapfrog from the list.

Once the Leapfrog module is open, users’ screens will look similar to the following screenshot:

DOC 68 Leapfrog 102

  1. While inside the Leapfrog module, users will see the jumping frog icon at the top, to the right of the Module Menu icon.
  2. 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.
  3. 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.
  4. 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.
  5. 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.”

DOC 68 Leapfrog 103

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:

DOC 68 Leapfrog 104a

  1. The example prompt that was submitted to Leapfrog.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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:

DOC 68 Leapfrog 105a

  1. The prompt asks Leapfrog to Increase demand by 20%.
  2. 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.
  3. 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.
  4. 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):

DOC 68 Leapfrog 106

Next, we will run the SQL query:

DOC 68 Leapfrog 107

  1. Click on the Run SQL button.
  2. 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.
  3. 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:

DOC 68 Leapfrog 108

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.):

DOC 68 Leapfrog 109

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:

DOC 68 Leapfrog 110a

  1. We are looking at the same “Increase demand by 20%” prompt and response pair again.
  2. The SQL Query section has been collapsed now.
  3. The Scenarios section has been expanded here. It contains details for creating a new scenario in the Cosmic Frog model based on the prompt:
  4. 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”.
  5. 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”.
  6. The details of the scenario item are listed here:
    1. The name of the table to which the change is made: CustomerDemand.
    2. The action that represents the change made: quantity = quantity * 1.2.
    3. 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).
  7. 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:

DOC 68 Leapfrog 021

After navigating to the Scenarios module within our Cosmic Frog model, we can see the scenario and its item have been created:

DOC 68 Leapfrog 111

  1. There is now a scenario named “Increase Customer Demand by 20 Percent” in our list of scenarios.
  2. 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:
    1. Table Name is set to CustomerDemand.
    2. The actions change the quantity field to its current value multiplied by 1.2.
    3. 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:

DOC 68 Leapfrog 112b

Leapfrog Conversations

Prompts and their responses are organized into conversations in the Leapfrog module:

DOC 68 Leapfrog 113

  1. We are in the Leapfrog module, looking at the list of Conversations.
  2. 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.
  3. 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:

DOC 68 Leapfrog 114

  1. The Conversations drop-down menu, which has following options:
    1. 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.
    2. 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.
    3. 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:

DOC 68 Leapfrog 115a

  1. This prompt asks to add a product named RAW_4 to an existing group named ALL_RAW_GROUP.
  2. 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.
  3. 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.
  4. 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):
    1. Table/Field Issue: use this when Leapfrog’s SQL response was targeting a different table and/or field than user intended.
    2. Query Type: use this when Leapfrog’s SQL response was of a different query type than expected (e.g. UPDATE instead of DELETE).
    3. Incomplete: use this when any part of the response seems incomplete.
    4. Slow Response: use this if Leapfrog took an unusually long time to provide a response.
    5. Other: use this if the other 4 tags do not cover the issue user sees with the response.
  5. 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).
  6. If user decides not to send the additional feedback, they can click on the Close button.
  7. 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:

DOC 68 Leapfrog 116a

  1. 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.
  2. 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:

DOC 68 Leapfrog 117a

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.

DOC 68 Leapfrog 118

  1. 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:

DOC 68 Leapfrog 119

DOC 68 Leapfrog 120

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:

    1. 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.
    2. 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.
    3. 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):
      1. metadata.txt – contains the log messages of the export.
      2. query_results.csv – contains all results of the query.
      3. 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.
  1. 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.
  2. 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.

DOC 68 Leapfrog 121

After clicking on Save, following message appears beneath the Data Grid in Leapfrog’s response:

DOC 68 Leapfrog 122

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:

DOC 68 Leapfrog 123

If we choose to save the Data Grid as a view instead of a table, it goes as follows:

DOC 68 Leapfrog 124

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:

DOC 68 Leapfrog 125

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:

DOC 68 Leapfrog 126

  1. 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:

DOC 68 Leapfrog 127

    1. Pin column: option to fix the location of the column, either left or right. By default, columns are not pinned (the No Pin option).
    2. Autosize This Column: resizes the width of the selected column to fit the column heading and column values.
    3. Autosize All Columns: resizes the width of all columns to fit the column heading and column values.
    4. Choose Columns: lets user select which columns to show and which to hide.
    5. Reset Columns: undo any resizing, reordering and custom selection of columns to revert to the original grid layout and contents.
  1. 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:

  1. Querying data in the input and output tables
  2. Changing data in the input tables directly
  3. Creating scenarios and scenario items
  4. Creating groups, and adding group members
  5. Creating new models
  6. Running models
  7. Geocoding locations
  8. Leapfrog is self-aware
  9. 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):

DOC 68 Leapfrog 128

DOC 68 Leapfrog 129

DOC 68 Leapfrog 130

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):

DOC 68 Leapfrog 131

DOC 68 Leapfrog 132

DOC 68 Leapfrog 133

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):

DOC 68 Leapfrog 134

DOC 68 Leapfrog 135

DOC 68 Leapfrog 136

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:

DOC 68 Leapfrog 137

DOC 68 Leapfrog 138

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:

DOC 68 Leapfrog 139

DOC 68 Leapfrog 140

DOC 68 Leapfrog 141

DOC 68 Leapfrog 142

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:

DOC 68 Leapfrog 143

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):

DOC 68 Leapfrog 144

DOC 68 Leapfrog 145

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:

DOC 68 Leapfrog 146

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:

DOC 68 Leapfrog 147

  1. Open the Model Activity list by clicking on the speech bubble icon at the top of the screen, towards the right.
  2. 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:

DOC 68 Leapfrog 148

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:

DOC 68 Leapfrog 149

DOC 68 Leapfrog 150a

DOC 68 Leapfrog 151a

DOC 68 Leapfrog 152a

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:

DOC 68 Leapfrog 153a

DOC 68 Leapfrog 154

DOC 68 Leapfrog 155a

Tips & Tricks

To get the most out of Leapfrog, please take note of these tips & tricks:

  1. 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.
  2. 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.
  3. 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.).
    1. 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.
  4. 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.
  5. 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.
  6. 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.
  7. 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:
    1. Try achieving what you desire in multiple steps. Some examples are shown in screenshots at the end of this section.
    2. If possible, use more explicit prompts which use table and field names. Some examples are shown in screenshots at the end of this section.
    3. Start a new conversation when your line of questioning changes or when the responses you are receiving are clearly off track.
  8. 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:

DOC 68 Leapfrog 156

  1. 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.
  2. 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:

DOC 68 Leapfrog 157

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:

DOC 68 Leapfrog 158

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:

DOC 68 Leapfrog 159

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:

DOC 68 Leapfrog 160

DOC 68 Leapfrog 161

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]?”:

DOC 68 Leapfrog 162

DOC 68 Leapfrog 163

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:

DOC 68 Leapfrog 164

DOC 68 Leapfrog 165

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:

DOC 68 Leapfrog 166

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:

  1. Create a new blank model called US Distribution
  2. Add 4 items to the Products table. Name them: Bullfrog_Train, Amphibian_Slime, Toady_Squishy, and Polliwog_Table with status = Include.
  3. Help me add locations. Set status for all of these to Include.
    1. add 3 DCs into Facilities table at the following locations: Memphis, TN Reno, NV Jacksonville, FL
    2. Add into Facilities table 2 MFG locations: one in Detroit, MI and the other in Dallas, TX
    3. add 50 customers into Customers table located at the capital city of each state of USA.
  4. Geocode all of my sites
  5. Generate demand for all customers for all products with random quantity between 10 and 1000. Insert this into CustomerDemand table with status = include
  6. Set model start date = 1/1/2025 and end date = 12/31/2025
  7. Insert the following lanes into Transportation Policies with status = Include.
    1. From all facilities starting with MFG to all facilities starting with DC, these all come from the Facilities table
    2. From all facilities starting with DC to all customers
  8. 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.
  9. Add Production Policies for each facility starting with “MFG” for all products
  10. Populate throughput capacity for DCs = 50k for Reno and Memphis and 100k for Jacksonville
  11. Create a scenario which increases DC Memphis throughput capacity to 100k
  12. Run network optimization on both scenarios
  13. Where do I look for customer flow comparison between scenarios?
  14. 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.
  15. Like that, but show me the distinct combinations.
  16. What’s the cost difference between both scenarios?
  17. 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”:

DOC 68 LeapfrogVid 01

Clicking on the link in Leapfrog’s response will take user to the Leapfrog module in this newly created US Distribution model:

DOC 68 LeapfrogVid 02

  1. The name of the model shown at the top in Cosmic Frog: US Distribution.
  2. 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.
  3. 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:

DOC 68 LeapfrogVid 03

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:

DOC 68 LeapfrogVid 04

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:

DOC 68 LeapfrogVid 05

DOC 68 LeapfrogVid 06

Since all Facilities and Customers have blank Latitudes and Longitudes, our next (fourth) prompt is to geocode all sites:

DOC 68 LeapfrogVid 07

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:

DOC 68 LeapfrogVid 08

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:

DOC 68 LeapfrogVid 09

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:

DOC 68 LeapfrogVid 10

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:

DOC 68 LeapfrogVid 11

Our sixth prompt sets the model end and start dates, so the model horizon is all of 2025:

DOC 68 LeapfrogVid 12

Again, we can double-check this after running the SQL response by having a look in the Model Settings input table:

DOC 68 LeapfrogVid 13

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:

DOC 68 LeapfrogVid 14

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):

DOC 68 LeapfrogVid 15

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:

DOC 68 LeapfrogVid 16

Clicking the Run SQL button will run the 4 UPDATE statements, and we can see the changes in the Transportation Policies input table:

DOC 68 LeapfrogVid 17

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:

DOC 68 LeapfrogVid 18

Again, double-checking after running the SQL from the response, we see the 8 expected records in the Production Policies input table:

DOC 68 LeapfrogVid 19

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:

DOC 68 LeapfrogVid 20

We can see these numbers appear in the Throughput Capacity field on the Facilities input table after running the SQL of Leapfrog’s response:

DOC 68 LeapfrogVid 21

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:

DOC 68 LeapfrogVid 22

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:

DOC 68 LeapfrogVid 23

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:

DOC 68 LeapfrogVid 24

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):

DOC 68 LeapfrogVid 25

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:

DOC 68 LeapfrogVid 26

Looking in the Optimization Network Summary output table, we also see there are results for both scenarios:

DOC 68 LeapfrogVid 27

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:

DOC 68 LeapfrogVid 28

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:

DOC 68 LeapfrogVid 29

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:

DOC 68 LeapfrogVid 30

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:

DOC 68 LeapfrogVid 31

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!

Have More Questions?

Contact Support Contact Sales Visit Frogger Pond Community