AI Lab

D
H
M
S
CONVOCATORIA CERRADA

Performance comparison of Large Language Models (LLMs) in code generation and application of best practices in frontend web development

By: Diana Guaiña

This study evaluated the performance of four LLMs (DeepSeek R1, GPT-4o1 Preview, Claude 3.7 Sonnet and Gemini 2.0) in frontend code generation by applying design patterns such as Factory Method, Observer and Strategy. The methodology used zero-shot prompts with three attempts per request, evaluating correct implementation criteria, common errors and response times. The analysis showed that, although the models achieve success rates above 85%, the findings underscore the importance of combining automation through AI with sound software engineering principles. The proper application of design patterns as a compendium of best practices is crucial to ensure maintainable, scalable and efficient code.