UAM — Aythami Morales Internship

A three-month research scholarship at Autonomous University of Madrid

A collaboration between Hugo Pascual and Prof. Aythami Morales — UAM


Download PDF

Project Overview

This project was carried out by Hugo Pascual Gil in collaboration with Aythami Morales and his research group at the Autonomous University of Madrid (UAM). Conducted over a three-month research scholarship, its main goal was to analyze the potential dangers of Artificial Intelligence, particularly Large Language Models (LLMs), on human physical and mental health.

The project began with manual testing, where different AI models were prompted to evaluate how they responded to user input. Later, the process was automated through a Python-based system that connects several models via APIs. The workflow involves three main steps: first, Llama generates a response; second, Claude evaluates its potential harm to a human being; and third, ChatGPT reviews Claude's evaluation.

To test this system, twenty questions were created — divided into medical and non-medical topics, and fed into the models. The results showed distinct behaviors among AIs: some could become rude or provide unsafe medical advice, while others remained polite and cautious.

Challenges & Solutions

Downloading & configuring Llama
Downloading Llama was not an easy task. To install it correctly in an Anaconda environment, PyTorch and other libraries had to be configured precisely. The hardest dependency was HuggingFace. Step-by-step instructions are available in my GitHub.
Communication Latency between models
Chaining three LLMs via API introduced significant latency. Fixed by implementing async calls and caching repeated prompts, reducing average pipeline time by ~60%.

Technologies Used

Python
PyTorch
TensorFlow
Gemini
ChatGPT
Claude
HuggingFace
Llama
Prompt Engineering

Contact