Pair Programming with Large Language Models for Sampling and Estimation of Copulas

03/31/2023
by   Jan Górecki, et al.
0

Without writing a single line of code by a human, an example Monte Carlo simulation based application for stochastic dependence modeling with copulas is developed using a state-of-the-art large language model (LLM) fine-tuned for conversations. This includes interaction with ChatGPT in natural language and using mathematical formalism, which, under careful supervision by a human-expert, led to producing a working code in MATLAB, Python and R for sampling from a given copula model, evaluation of the model's density, performing maximum likelihood estimation, optimizing the code for parallel computing for CPUs as well as for GPUs, and visualization of the computed results. In contrast to other emerging studies that assess the accuracy of LLMs like ChatGPT on tasks from a selected area, this work rather investigates ways how to achieve a successful solution of a standard statistical task in a collaboration of a human-expert and artificial intelligence (AI). Particularly, through careful prompt engineering, we separate successful solutions generated by ChatGPT from unsuccessful ones, resulting in a comprehensive list of related pros and cons. It is demonstrated that if the typical pitfalls are avoided, we can substantially benefit from collaborating with an AI partner. For example, we show that if ChatGPT is not able to provide a correct solution due to a lack of or incorrect knowledge, the human-expert can feed it with the correct knowledge, e.g., in the form of mathematical theorems and formulas, and make it to apply the gained knowledge in order to provide a solution that is correct. Such ability presents an attractive opportunity to achieve a programmed solution even for users with rather limited knowledge of programming techniques.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
12/13/2022

Benchmarking Large Language Models for Automated Verilog RTL Code Generation

Automating hardware design could obviate a significant amount of human e...
research
02/21/2023

Playing the Werewolf game with artificial intelligence for language understanding

The Werewolf game is a social deduction game based on free natural langu...
research
06/13/2023

ChatGPT vs. Lightweight Security: First Work Implementing the NIST Cryptographic Standard ASCON

This study, to the best of our knowledge, is the first to explore the in...
research
06/08/2023

Is AI the better programming partner? Human-Human Pair Programming vs. Human-AI pAIr Programming

The emergence of large-language models (LLMs) that excel at code generat...
research
07/07/2021

Evaluating Large Language Models Trained on Code

We introduce Codex, a GPT language model fine-tuned on publicly availabl...
research
06/30/2022

GitHub Copilot AI pair programmer: Asset or Liability?

Automatic program synthesis is a long-lasting dream in software engineer...
research
07/17/2023

Extending the Frontier of ChatGPT: Code Generation and Debugging

Large-scale language models (LLMs) have emerged as a groundbreaking inno...

Please sign up or login with your details

Forgot password? Click here to reset