让代码与自然语言和数据上下文同地存放,提升大模型编程效率。
A Literate Programming Environment for Human and Machine Agents
- 用可执行的程序散文语法,把代码、名称和说明关联成一体。
- 通过名字图谱和绑定机制,实现代码与上下文的精准对齐。
- 适合需要高效协作的开发人员和大模型编程工具使用者。
本文提出一个面向人类与语言感知机器代理协同构建文献化程序的环境。该环境包含可执行程序散文的语法、将名称视为一等对象的解析器、关联文本、名称与可执行产物的内部名称图谱,以及对现有编程语言和测试工具集的绑定机制。它支持将代码与其最相关的自然语言和结构化数据上下文共处一处,更充分地利用大语言模型(LLM)的上下文窗口。同时,为LLM编码代理提供了更接近人类程序员在集成开发环境(IDE)中使用的符号感知搜索与使用信息的工具集。我们描述了一个包含三个成熟编程语言绑定的工作原型及若干示例程序。
原文摘要 · Abstract (English)
This paper introduces an environment for constructing literate programs in concert with language-aware machine agents. This environment includes a grammar for executable program essays, a parser that treats names as first-class objects, an internal name-graph which relates prose, names and executable artifacts, and a binding mechanism for existing languages and testing toolsets. This supports co-location of code with its most relevant natural language and structured data context, making better use of Large Language Model (LLM) context windows. It also provides LLM coding agents with a toolset more analogous to the symbol-aware search and usage information available in human programmer-facing Integrated Development Environments (IDEs). We describe a working implementation with bindings to three established programming languages, and several example programs.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。