In this example, we've asked the AI (ChatGPT) to create a set amount of additional data based on a provided csv file of model points. In the screenshots below, the purple icon denotes the user input and the orange icon is what the AI has sent back.
The AI has verified what the user would like to accomplish and comes back with a question about a column in the supplied file.
After the user prompts the AI to continue and create the file, the work is done and a link to access the new file is provided by the AI.
At this point the user has asked the AI to revise the provided file with a tweak to the face amount, the AI then provides a new file to reflect those changes.
The user has asked the AI to create multiple new versions of the previously generated file, this time with some parameters around the number of rows. The AI has come back with a question to clarify one of the columns in the csv file that was provided.
Once again the AI has a bit of confusion around the "SUM_ASSURED" column and has asked the user for more clarification.
The user has prompted the AI to ignore the column that was giving it trouble and at this point the AI is able to generate the additional 3 versions of the file.
In this example, we used AI (ChatGPT via API) to create documentation of the functions available for modeling on the Montoux platform (functions were coded in Go). The documentation needed to include function description, required and optional inputs, type of the returned value, and examples.
To accomplish this, a Python library called “Langchain” (https://github.com/langchain-ai/langchain) was used to:
• Store knowledge of our Golang functions and actuarial modeling code
• Store knowledge of our Montoux Model Script (m2) files so it could use those as examples
• Store and use the a custom prompt (see below)
• Call the OpenAI API (GPT4)
• Let a user specify which function to document
This is an example of a custom prompt that was provided to the AI:
After using the Langchain Python library to accomplish the tasks mentioned above, the AI was able to produce the requested documentation. Below are examples of what the AI returned:
Function 1 - SnapToZero
Function 2 - DistanceToMean
Function 3 - Increment
While the results that the AI produced were great, there was still a minor amount of editing that needed to be done. Below are the final results of the documentation process.
Function 1 - SnapToZero
Function 2 - DistanceToMean
Function 3 - Incremenet
In this example, we've asked the AI (ChatGPT) to convert a snippet of Python code to Go.
The user has made the request for the AI to convert the code. The AI then acknowledges the requests and asks the user to provide the code they would like translated.
The user responds with the Python code they would like converted into Go.
The AI then acknowledges the submission from the user and feeds back the corresponding Go code.
This is the code generated by the AI (code has been extracted from the screenshot for readability purposes.
The AI then explains some of it's methodology and includes a short disclaimer about how it generated some of the code.
In this example, we've asked the AI (ChatGPT) to compare two difference models and summarize the differences.
First, the user asks the AI to summarize the key difference between two actuarial models, the user then pastes the models into the dialog box after the request.
The AI then summarizes the key differences in the models, it also notes some of the other components that are handled similarly between the two models.
In this example, we've asked the AI (ChatGPT) to generate some code as well as documentation for that code.
The user has made the request for the AI to create python code to calculate VM-20 reserves for a term life assurance policy. The AI provides a high-level example of how that might be done.
This is the code generated by the AI (code has been extracted from the screenshot for readability purposes.
After displaying the code, the AI gives a quick description of how the code functions and warns that it may be necessary to consult with a professional before using it.
The user has made the request for the AI to create python code to calculate VM-20 reserves for a universal life insurance policy. The AI provides a high-level example of how that might be done.
This is the code generated by the AI (code has been extracted from the screenshot for readability purposes.
The AI once again provides a code along with a warning that the code is highly simplified and recommends consulting with an actuary.
The user then asks the AI to generate some documentation that will allow the model to be coded in any language, the AI returns an outline of requirements for the model.
The user has asked the AI to create documentation for a model built in Golang that would allow the model to be coded by a developer in another language. The AI notes that there was no code provided.
The user submits the model that was originally coded in Golang for the AI to analyze.
The AI has analyzed the Golang code and returned documentation for the user that will allow the model to be coded in another language.
The user has asked the AI to run the python code. The AI has encountered some errors and outlines them for the user.
The user asks the AI to run the iul reserve model code, the AI remarks that it does not have the code to be run.
Now the user has provided the AI with the code it would like it to run.
The AI acknowledges the receipt of this code, informs the user which environment the code can be run in and provides the output of the code it received.
Reserve for the term life assurance policy: 7874.564052386748
This is the code generated by the AI (code has been extracted from the screenshot for readability purposes.
The AI then describes what the code models and gives the user that information, it once again includes a disclaimer.
The user has now asked the AI to rewrite the code and include documentation that explains what the code is doing.
This is the code generated by the AI (code has been extracted from the screenshot for readability purposes.
The AI has sent back the code and explained what the comments are to be used for.
In this example, we've asked the AI (ChatGPT) to generate Python code for a two-factor Hull-White model.
Here the AI receives the prompt and gives some information on the output it is going to give include defining variables and the equations the model is based on.
This is the code generated by the AI (code has been extracted from the screenshot for readability purposes.
After providing the code, the AI goes on to give more context to the model along with a disclaimer about the code that it generated.
Here the user has asked the AI to make some adjustments to the code, the AI responds explaining what changes it will make to the code to accomplish this request.
This is the code generated by the AI (code has been extracted from the screenshot for readability purposes.
The AI explains the additional object that was created in the code to accomplish the user's request. It again provides a disclaimer about the code that it produced.
The user has now asked the AI to add some additional code to produce the results in a csv file. The AI responds with the method it will use to accomplish this.
This is the code generated by the AI (code has been extracted from the screenshot for readability purposes.
The AI finishes by describing what the additional code will do and gives a note to add this code snippet to the code it had provided previously.