AskIt: Unified Programming Interface for Programming with Large Language Models

被引:0
|
作者
Okuda, Katsumi [1 ,2 ]
Amarasinghe, Saman [1 ]
机构
[1] MIT, CSAIL, Cambridge, MA 02139 USA
[2] Mitsubishi Electr Corp, Amagasaki, Hyogo, Japan
关键词
domain specific language; code generation; large; language model; software engineering; artificial intelligence;
D O I
暂无
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
Large Language Models (LLMs) exhibit a unique phenomenon known as emergent abilities, demonstrating adeptness across numerous tasks, from text summarization to code generation. While these abilities open up novel avenues in software design and crafting, their incorporation presents substantial challenges. Developers face decisions regarding the use of LLMs for directly performing tasks within applications as well as for generating and executing code to accomplish these tasks. Moreover, effective prompt design becomes a critical concern, given the necessity of extracting data from natural language outputs. To address these complexities, this paper introduces AskIt, a domain-specific language (DSL) specifically designed for LLMs. AskIt simplifies LLM integration by providing a unified interface that not only allows for direct task execution using LLMs but also supports the entire cycle of code generation and execution. This dual capability is achieved through (1) typeguided output control, (2) template-based function definitions, and (3) prompt generation for both usage modes. Our evaluations underscore AskIt's effectiveness. Across 50 tasks, AskIt generated concise prompts, achieving a 16.14 % reduction in prompt length compared to benchmarks. Additionally, by enabling a seamless transition between using LLMs directly in applications and for generating code, AskIt achieved significant efficiency improvements, as observed in our GSM8K benchmark experiments. The implementations of AskIt in TypeScript and Python are available at https://github.com/katsumiok/ts- askit and https://github.com/katsumiok/pyaskit, respectively.
引用
收藏
页码:41 / 54
页数:14
相关论文
共 50 条
  • [1] Large Language Models in Robot Programming Potential in the programming of industrial robots
    Syniawa, Daniel
    Ates, Baris
    Boshoff, Marius
    Kuhlenkoetter, Bernd
    [J]. ATP MAGAZINE, 2024, (6-7):
  • [2] Prompting Is Programming: A Query Language for Large Language Models
    Beurer-Kellner, Luca
    Fischer, Marc
    Vechev, Martin
    [J]. PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2023, 7 (PLDI):
  • [3] Propagating Large Language Models Programming Feedback
    Koutcheme, Charles
    Hellas, Arto
    [J]. PROCEEDINGS OF THE ELEVENTH ACM CONFERENCE ON LEARNING@SCALE, L@S 2024, 2024, : 366 - 370
  • [4] Fully Autonomous Programming with Large Language Models
    Liventsev, Vadim
    Grishina, Anastasiia
    Harma, Aki
    Moonen, Leon
    [J]. PROCEEDINGS OF THE 2023 GENETIC AND EVOLUTIONARY COMPUTATION CONFERENCE, GECCO 2023, 2023, : 1146 - 1155
  • [5] Towards a unified programming language
    Madsen, OL
    [J]. ECOOP 2000 - OBJECT-ORIENTED PROGRAMMING, 2000, 1850 : 1 - 26
  • [6] A Programming Language Is Not a User Interface
    Wagner, Arno
    [J]. COMMUNICATIONS OF THE ACM, 2014, 57 (09) : 8 - 8
  • [7] Programming Computational Electromagnetic Applications Assisted by Large Language Models
    Fernandes, Leandro Carisio
    [J]. IEEE ANTENNAS AND PROPAGATION MAGAZINE, 2024, 66 (01) : 63 - 71
  • [8] Using Large Language Models to Enhance Programming Error Messages
    Leinonen, Juho
    Hellas, Arto
    Sarsa, Sami
    Reeves, Brent
    Denny, Paul
    Prather, James
    Becker, Brett A.
    [J]. PROCEEDINGS OF THE 54TH ACM TECHNICAL SYMPOSIUM ON COMPUTER SCIENCE EDUCATION, VOL 1, SIGCSE 2023, 2023, : 563 - 569
  • [9] Large Language Models (GPT) for automating feedback on programming assignments
    Pankiewicz, Maciej
    Baker, Ryan S.
    [J]. 31ST INTERNATIONAL CONFERENCE ON COMPUTERS IN EDUCATION, ICCE 2023, VOL I, 2023, : 68 - 77
  • [10] A language for generic programming in the large
    Siek, Jeremy G.
    Lumsdaine, Andrew
    [J]. SCIENCE OF COMPUTER PROGRAMMING, 2011, 76 (05) : 423 - 465