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.
翻译:摘要:使用一种专门针对自然语言对话进行微调的先进大型语言模型(LLM),开发了一个基于蒙特卡罗模拟的随机依赖建模应用程序,而无需人类编写任何代码。这包括与ChatGPT进行自然语言交互和使用数学形式进行交互。在人类专家的仔细监督下,这导致生成了MATLAB,Python和R的工作代码,用于从给定的copula模型进行抽样,评估模型的密度,执行最大似然估计,为CPU和GPU进行并行计算进行代码优化,以及计算结果的可视化。与其他评估LLM(如ChatGPT)在特定领域任务上的准确性的新兴研究不同,本研究关注如何通过人工智能(AI)与人类专家的协作来实现标准统计任务的成功解决方案。特别是,通过仔细的提示工程,我们将ChatGPT生成的成功解决方案与不成功的解决方案分开,从而得到了相关的优缺点的全面列表。我们证明,如果避免典型的陷阱,我们可以从与AI合作中获得实质性的好处。例如,我们显示如果ChatGPT由于缺乏或错误的知识无法提供正确的解决方案,人类专家可以提供正确的知识,例如数学定理和公式,并使其应用所获得的知识以提供正确的解决方案。这种能力为实现编程解决方案提供了有吸引力的机会,即使用户对编程技术的了解相对有限。