arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2502.08756cs.AIcs.SE
收藏

从PowerPoint UI草图到基于Web的应用:使用知识增强型LLM、上下文感知视觉提示和React框架的GIS仪表盘开发模式驱动代码生成

From PowerPoint UI Sketches to Web-Based Applications: Pattern-Driven Code Generation for GIS Dashboard Development Using Knowledge-Augmented LLMs, Context-Aware Visual Prompting, and the React Framework

Oak Ridge National Laboratory(橡树岭国家实验室)

Haowen Xu, Xiao-Ying Yu

AI总结:

针对环境研究中GIS仪表盘开发的重复资源密集问题,提出知识增强型代码生成框架,结合专用知识库、上下文感知视觉提示和React框架,自动将UI草图转为可扩展Web应用,减少手动工作量。

摘要:

为环境研究中查询和可视化GIS数据开发基于Web的GIS应用(通常称为CyberGIS仪表盘),往往需要重复且资源密集的工作。虽然生成式AI为代码生成提供了自动化潜力,但由于在整合领域知识、软件工程原则和UI设计最佳实践方面存在挑战,它在复杂科学应用中表现不佳。本文介绍了一个知识增强型代码生成框架,该框架从专用知识库中检索软件工程最佳实践、领域专业知识和先进技术栈,以增强生成式预训练Transformer(GPT)用于前端开发。该框架可从用户在PowerPoint或Adobe Illustrator等工具中绘制的UI线框自动创建基于GIS的Web应用(如仪表盘、界面)。一种新颖的上下文感知视觉提示方法(用Python实现)从这些线框中提取布局和界面特征,以指导代码生成。我们的方法借鉴思维链(CoT)提示和检索增强生成(RAG),利用大型语言模型(LLM)整合结构化推理、软件工程原则和领域知识来生成前端代码。案例研究表明,该框架能够从用户绘制的线框生成一个模块化、可维护的Web平台,托管多个用于可视化环境和能源数据(如时间序列、shapefile、栅格)的仪表盘。通过采用知识驱动的方法,该框架使用模型-视图-视图模型(MVVM)等设计模式和React等框架生成可扩展、行业标准的前端代码,显著减少了设计和编码的手动工作量,开创了开发智慧城市软件的自动化高效方法。

英文摘要:

Developing web-based GIS applications, commonly known as CyberGIS dashboards, for querying and visualizing GIS data in environmental research often demands repetitive and resource-intensive efforts. While Generative AI offers automation potential for code generation, it struggles with complex scientific applications due to challenges in integrating domain knowledge, software engineering principles, and UI design best practices. This paper introduces a knowledge-augmented code generation framework that retrieves software engineering best practices, domain expertise, and advanced technology stacks from a specialized knowledge base to enhance Generative Pre-trained Transformers (GPT) for front-end development. The framework automates the creation of GIS-based web applications (e.g., dashboards, interfaces) from user-defined UI wireframes sketched in tools like PowerPoint or Adobe Illustrator. A novel Context-Aware Visual Prompting method, implemented in Python, extracts layouts and interface features from these wireframes to guide code generation. Our approach leverages Large Language Models (LLMs) to generate front-end code by integrating structured reasoning, software engineering principles, and domain knowledge, drawing inspiration from Chain-of-Thought (CoT) prompting and Retrieval-Augmented Generation (RAG). A case study demonstrates the framework's capability to generate a modular, maintainable web platform hosting multiple dashboards for visualizing environmental and energy data (e.g., time-series, shapefiles, rasters) from user-sketched wireframes. By employing a knowledge-driven approach, the framework produces scalable, industry-standard front-end code using design patterns such as Model-View-ViewModel (MVVM) and frameworks like React. This significantly reduces manual effort in design and coding, pioneering an automated and efficient method for developing smart city software.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑