AskIt: Unified Programming Interface for Programming with Large Language Models
August 29, 2023 ยท Entered Twilight ยท ๐ IEEE/ACM International Symposium on Code Generation and Optimization
Repo contents: .eslintrc.js, .github, .gitignore, .npmignore, .prettierrc.json, .vscode, README.md, examples, jest.config.ts, js_examples, package-lock.json, package.json, src, tests, tsconfig.json
Authors
Katsumi Okuda, Saman Amarasinghe
arXiv ID
2308.15645
Category
cs.PL: Programming Languages
Cross-listed
cs.AI,
cs.SE
Citations
6
Venue
IEEE/ACM International Symposium on Code Generation and Optimization
Repository
https://github.com/katsumiok/ts-askit
โญ 35
Last Checked
3 months ago
Abstract
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) type-guided 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.
Community Contributions
Found the code? Know the venue? Think something is wrong? Let us know!
๐ Similar Papers
In the same crypt โ Programming Languages
R.I.P.
๐ป
Ghosted
R.I.P.
๐ป
Ghosted
Tensor Comprehensions: Framework-Agnostic High-Performance Machine Learning Abstractions
R.I.P.
๐ป
Ghosted
Glow: Graph Lowering Compiler Techniques for Neural Networks
R.I.P.
๐ป
Ghosted
Learnable Programming: Blocks and Beyond
R.I.P.
๐ป
Ghosted
Scenic: A Language for Scenario Specification and Scene Generation
R.I.P.
๐ป
Ghosted