Optimizing Retrieval-Augmented Generation-Assisted User Interface Generation: A Comparative Study on Data Standardization for Brand Visual Consistency †
Abstract
1. Introduction
2. Related Work
2.1. Data Structure and Applications of RAG
2.2. Brand Visual Consistency
2.3. Style Verification
3. Materials and Methods
3.1. Experimental Setup
- No-RAG (baseline): No external knowledge documents are provided. The model generates UI code based solely on the prompt.
- Plain text: Brand style descriptions are generated by a GPT model based on screenshots of the official website. The content is neither manually revised nor structured with explicit attribute mappings.
- Structured CSS: Brand styles are categorized by UI components and organized into JSON-formatted structured data using CSS properties, as shown in Table 1.
- Structured NL guide: Brand style descriptions are written in natural language. For example: “The button background color is rgb(255, 0, 0), the font size is 14 px, and the border radius is 8 px.” These descriptions are stored in JSON format.
3.2. CSS Recall Rate
- background-color;
- border-radius;
- color;
- font-weight;
- font-family;
- font-size;
- text-align.
3.3. Interview-Based Evaluation
- Similarity ranking: The participants ranked the four generated versions based on their perceived similarity to the brand style. All versions were presented under blind conditions to prevent potential bias.
- Semi-structured interview [14]: After completing the ranking task, each participant participated in a semi-structured interview lasting approximately 15–20 min. The interview aimed to explore their evaluation criteria, key considerations, and areas of disagreement. Example questions included the following.
- “Which version do you think best aligns with the brand style? Why?”
- “Were you hesitant when ranking the middle two versions? What were the differences between them?”
- “What design elements do you primarily focus on when evaluating style consistency?”
4. Results
4.1. Weighted Recall of CSS Styles
4.2. Interview Results
- Designer A: “I quickly assess the brand style based on the color scheme of the homepage.”
- Designer B: “Starbucks always uses sans-serif fonts for major headings. This is one of my key indicators.”
- Engineer A: “Color is the primary factor, followed by the layout style.”
- Engineer B: “The footer should not differ too much from the official website, so I always check the footer style.”
4.3. Integrated Analysis and Preliminary Observations
5. Limitations
- Limited CSS property selection: We only examined a subset of representative static CSS properties, such as color, font size, border radius, and spacing, without covering layout details, animations, or interactive styles.
- Static analysis only: The evaluation was based solely on static code analysis and does not include dynamic behaviors such as hover states, click animations, or transitions, which may overlook style inconsistencies in user interactions.
- Small sample size for subjective evaluation: The subjective ranking involved only four participants with design or front-end backgrounds, which may limit the generalizability of the findings.
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Abbreviations
| RAG | Retrieval-Augmented Generation |
| UI | User Interface |
| LLMs | Large Language Models |
| LCNC | Low-Code/No-Code |
| CSS | Cascading Style Sheets |
| JSON | JavaScript Object Notation |
References
- Paliwal, G.; Donvir, A.; Gujar, P.; Panyam, S. LCNC Meets GenAI: A New Era in Product Development. In Proceedings of the 2024 IEEE Eighth Ecuador Technical Chapters Meeting (ETCM), Cuenca, Ecuador, 15–18 October 2024; pp. 1–9. [Google Scholar] [CrossRef]
- Laurençon, H.; Tronchon, L.; Sanh, V. Unlocking the conversion of web screenshots into html code with the websight dataset. arXiv 2024, arXiv:2403.09029. [Google Scholar] [CrossRef]
- Srinath, R.; Siva Prasath, K.R.; Vinith, W.; Srinivasan, L. STC (Sketch To Code)-An Enhanced Html & CSS Autocode Generator from Handwritten Text and Image Using Deep Learning. In Proceedings of the 2024 2nd International Conference on Networking and Communications (ICNWC), Chennai, India, 2–4 April 2024; pp. 1–6. [Google Scholar] [CrossRef]
- Xu, Y.; Bo, L.; Sun, X.; Li, B.; Jiang, J.; Zhou, W. image2emmet: Automatic code generation from web user interface image. J. Softw. Evol. Process 2021, 33, e2369. [Google Scholar] [CrossRef]
- Wu, J.; Schoop, E.; Leung, A.; Barik, T.; Bigham, J.P.; Nichols, J. Uicoder: Finetuning large language models to generate user interface code through automated feedback. arXiv 2024, arXiv:2406.07739. [Google Scholar] [CrossRef]
- Patel, B.; Gagrani, P.; Sheth, S.; Thakur, K.; Varahan, P.; Shim, S. StarryStudioAI: Automating UI Design with Code-Based Generative AI and RAG. In Proceedings of the 2025 IEEE 15th Annual Computing and Communication Workshop and Conference (CCWC), Las Vegas, NV, USA, 6–8 January 2025; pp. 00937–00944. [Google Scholar] [CrossRef]
- Tan, J.; Dou, Z.; Wang, W.; Wang, M.; Chen, W.; Wen, J.-R. HtmlRAG: HTML is Better Than plain text for Modeling Retrieved Knowledge in RAG Systems. In Proceedings of the ACM on Web Conference 2025, Sydney, NSW, Australia, 28 April 2025–2 May 2025; pp. 1733–1746. [Google Scholar] [CrossRef]
- Blair-Early, A.; Zender, M. User Interface Design Principles for Interaction Design. Des. Issues 2008, 24, 85–107. [Google Scholar] [CrossRef]
- Schlatter, T.; Levinson, D. Visual Usability: Principles and Practices for Designing Digital Applications; Morgan Kaufmann: Waltham, MA, USA, 2013; pp. 3–32. [Google Scholar] [CrossRef]
- Viswanathan, S.; Peters, J.C. Automating UI guidelines verification by leveraging pattern based UI and model based development. In Proceedings of the CHI ‘10 Extended Abstracts on Human Factors in Computing Systems, Atlanta, GA, USA, 10–15 April 2010; pp. 4733–4742. [Google Scholar] [CrossRef]
- Haruta, S.; Asahina, H.; Sasase, I. Visual Similarity-Based Phishing Detection Scheme Using Image and CSS with Target Website Finder. In Proceedings of the GLOBECOM 2017—2017 IEEE Global Communications Conference, Singapore, 4–8 December 2017; pp. 1–6. [Google Scholar] [CrossRef]
- Bolt.New (v1 Agent). Available online: https://bolt.new/ (accessed on 2 June 2025).
- Starbucks Careers. Available online: https://careers.starbucks.com/ (accessed on 2 June 2025).
- Kallio, H.; Pietilä, A.-M.; Johnson, M.; Kangasniemi, M. Systematic methodological review: Developing a framework for a qualitative semi-structured interview guide. J. Adv. Nurs. 2016, 72, 2954–2965. [Google Scholar] [CrossRef] [PubMed]

| UI Component | Attribute | Value |
|---|---|---|
| background-color | rgb(255, 0, 0) | |
| button | font-size | 14 px |
| border-radius | 8 px |
| Data Format | Weighted Recall |
|---|---|
| No-RAG | 0.29 |
| Plain text | 0.31 |
| Structured CSS | 0.48 |
| Structured NL guide | 0.75 |
| Participant | Subjective Ranking (from Highest to Lowest) |
|---|---|
| Designer A | Plain Text > Structured CSS > Structured NL Guide > No-RAG |
| Designer B | Structured CSS > Plain Text > Structured NL Guide > No-RAG |
| Engineer A | Structured NL Guide > Structured CSS > Plain Text > No-RAG |
| Engineer B | Structured CSS > Structured NL Guide > Plain Text > No-RAG |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Hsieh, Y.-H.; Wang, H.-H. Optimizing Retrieval-Augmented Generation-Assisted User Interface Generation: A Comparative Study on Data Standardization for Brand Visual Consistency. Eng. Proc. 2025, 120, 37. https://doi.org/10.3390/engproc2025120037
Hsieh Y-H, Wang H-H. Optimizing Retrieval-Augmented Generation-Assisted User Interface Generation: A Comparative Study on Data Standardization for Brand Visual Consistency. Engineering Proceedings. 2025; 120(1):37. https://doi.org/10.3390/engproc2025120037
Chicago/Turabian StyleHsieh, Yun-Hsuan, and Hung-Hsiang Wang. 2025. "Optimizing Retrieval-Augmented Generation-Assisted User Interface Generation: A Comparative Study on Data Standardization for Brand Visual Consistency" Engineering Proceedings 120, no. 1: 37. https://doi.org/10.3390/engproc2025120037
APA StyleHsieh, Y.-H., & Wang, H.-H. (2025). Optimizing Retrieval-Augmented Generation-Assisted User Interface Generation: A Comparative Study on Data Standardization for Brand Visual Consistency. Engineering Proceedings, 120(1), 37. https://doi.org/10.3390/engproc2025120037

