DAVIDE MODOLO

NLP • Transformers • LLMs • MLOps • Machine Learning • Deep Learning • Computer Vision

AI & Machine Learning Engineer with a Master's degree in Artificial Intelligence Systems. Currently building production NLP pipelines and agentic AI systems at OpenCity Labs, fine-tuning Transformer models, designing hybrid RAG architectures, and integrating LLMs into real products. On the MLOps side, I containerize services with Docker and set up CI/CD pipelines to get models into production.
Open to new opportunities.

Professional Experience

AI & Machine Learning Engineer, R&D

OpenCity Labs (Startup) | Remote | August 2025 - Present

• Single-handedly engineered an NLP pipeline for RAG ingestion with PII anonymization via a fine-tuned Transformer-based NER model and an in-memory reversible dictionary, processing 50k+ daily inputs.
• Built a spaCy detection + LLM fallback guard to fix a cross-lingual model failure in a RAG pipeline: despite explicit English instructions, Italian-only retrieved context caused the model to default to Italian in 35-40% of non-Italian queries, eliminating the error. Released to 10+ clients.
• Developed an open-source agentic AI system. Designed hybrid RAG architecture (vector + full-text reciprocal rank fusion) to solve domain-specific retrieval failures: pure embedding search missed legal acronyms and regulatory references, while keyword search failed on semantic ones. Built MCP-based tool-calling infrastructure with human-in-the-loop approval, reducing targeted workflows from days to hours.
• Dockerized all services with GitLab CI pipelines automating testing and Docker image builds for consistent, reliable deployments.

Python Transformers NLP LLM RAG FastAPI Docker SurrealDB AWS EC2 Prometheus Grafana

Intern / AI Engineer

Eurecat Technology Center | Barcelona, Spain | April 2024 - June 2024

• Implemented a token-level uncertainty estimation framework for planning tasks by analyzing log-probabilities, benchmarking performance across proprietary (GPT-4o) and locally quantized models (Llama 3.1 via llama.cpp).
• Developed a RAG system utilizing gte-large embeddings to retrieve context-aware user preferences, significantly reducing model hallucination in recurrent decision-making scenarios.
• Prototyped a multimodal agent integrating LLaVA for visual reasoning tasks and validated the uncertainty reconstruction approach across multiple simulated environments.

Python PyTorch Hugging Face OpenAI API LLMs RAG llama.cpp Ollama Multimodal AI

Educational Background

Master's Degree in Artificial Intelligence Systems

University of Trento | Trento, Italy | September 2021 - March 2025

Thesis: Exploring the Use of LLMs for Agent Planning: Strengths and Weaknesses - investigated how large language models perform on planning and decision-making tasks, identifying capabilities and failure modes. Developed a rigorous uncertainty quantification methodology based on token log-probabilities and conformal prediction, generating heatmap visualizations across 36 test cases (3 LLM versions, 4 map sizes, 2 tasks) to characterize spatial reasoning quality across the entire state space.
Relevant Courses: Machine Learning, Deep Learning, Natural Language Understanding, Automated Planning, Law & Ethics in AI, Fundamentals of AI, Signal Processing, AI for Finance, High Performance Computing.

Thesis Report Code Machine Learning Deep Learning NLP Automated Planning LLMs HPC PyTorch

Bachelor's Degree in Computer Science

University of Trento | Trento, Italy | September 2017 - June 2021

Thesis: Healthy Plus - Redesign and evolution of an Android application for monitoring healthy lifestyles.
Core Topics: Algorithms & Data Structures, Software Engineering, Database Systems, Operating Systems, Computer Architectures, Distributed Networks.

Java Android SQL Software Engineering Data Structures Operating Systems Computer Networks

University Projects

COVID-19 Lung Ultrasound Images Classification

Medical Imaging Diagnostic

• Built a multi-stage deep learning pipeline to classify Lung Ultrasound frames into 4 severity scores (0-3) using a fine-tuned ResNet18 on ~47k frames from 11 patients, with patient-based train/test splitting to prevent data leakage.
• Added a binary confidence classifier that detects uncertain predictions by analyzing softmax output patterns, and a t-SNE-based image similarity retrieval module that finds visually similar training images when the primary classifier is not confident.
• Designed an aggressive augmentation pipeline (affine transforms, brightness scaling, Gaussian blur, horizontal flips) to combat overfitting on the limited medical dataset.

Slides Report Code PyTorch Computer Vision Medical AI

Joint Intent Detection and Slot Filling

Natural Language Understanding

• Implemented 5 neural architectures from scratch in PyTorch for multi-task joint intent classification and slot filling on ATIS and SNIPS datasets: baseline LSTM, bidirectional LSTM, encoder-decoder, and fine-tuned BERT and ERNIE 2.0.
• Custom encoder-decoder achieved the best overall results (94.95% slot F1, 96.42% intent accuracy on ATIS), outperforming pretrained transformers which suffered from a vocabulary mismatch when custom slot-label tokens were added to their tokenizer.
• Each model trained 5 times with different random seeds and reported with mean ± standard deviation; used early stopping and custom LR scheduling (halve every 3 epochs without improvement).

Report Code PyTorch BERT NLP Deep Learning

Domain Adaptation / Transfer Learning

Deep Learning · Team Project

• Built a full unsupervised domain adaptation pipeline in PyTorch based on the HoMM paper, matching 3rd and 4th-order statistical moments between source and target feature distributions to capture shape differences (skewness and kurtosis) that simpler methods like MMD and CORAL miss.
• Used ResNet34 pretrained on ImageNet with a modified tanh activation layer, balancing three loss terms: cross-entropy (source supervision), HoMM discrepancy (domain alignment), and discriminative clustering with moving-average centroids (target pseudo-labels).
• Achieved +11.53% gain over the source-only baseline on the Adaptiope dataset (20 object classes across product_images and real_life domains).

Code PyTorch ResNet34 Transfer Learning

Autonomous Delivery BDI Agent

Autonomous Software Agents · Team Project

• Developed an autonomous software agent in Node.js for a grid-based parcel delivery game using a Belief-Desire-Intention architecture with intention revision and plan caching.
• Integrated a PDDL online solver (planning.domains API) for declarative path planning, replacing an earlier A* approach that required hand-coded edge cases for each map configuration.
• Built two multi-agent coordination strategies: angular map slicing with basic communication, and intention sharing with conflict resolution via mutual scoring.

Slides Report Code JavaScript Node.js PDDL Multi-Agent

Parallel Closest Pair of Points

High Performance Computing · Team Project

• Implemented parallel solutions to the closest pair of points problem in up to 5 dimensions using C and MPI, with both brute-force (O(n²)) and divide-and-conquer (O(n log n)) algorithms under a master-worker model.
• The brute-force approach scaled near-linearly to ~28× speedup on 80 cores (embarrassingly parallel), while divide-and-conquer plateaued at ~7.3× due to cross-boundary strip-exchange communication overhead, a tradeoff between asymptotic complexity and parallel scalability.
• Handled the INT_MAX MPI buffer limit with automatic multi-tranche serialization of variable-size Point structs via MPI_Pack/MPI_Unpack; benchmarked up to 250 million points across 1-80 cores on an HPC cluster.

Slides Report Code C MPI Parallel Computing

Interactive Projects

All models run entirely in your browser. No data is sent to any server.

Digit Classifier

CNN trained on MNIST, running in your browser via TensorFlow.js

Loading model...

A small CNN trained on the full MNIST dataset (60,000 training images, 10,000 test) for 10 epochs, converted to TensorFlow.js format. Your canvas drawing is downscaled to 28×28, normalized, and fed through the network in a single forward pass via WebGL. The keypad shows the confidence score for each digit.

Sentiment Analysis

In-browser sentiment scoring with a pre-trained neural network

Loading sentiment model...
Sentiment Score:
-
-

A convolutional text classifier running on ml5.js, trained on the IMDB Movie Reviews corpus (25,000 labeled samples). It scores text from 0.0 (strongly negative) to 1.0 (strongly positive) by detecting sentiment patterns in your input, entirely client-side.

LLM Playground

Uncertainty visualization for multiple-choice questions using a locally-run LLM

Not loaded

Runs LaMini-Flan-T5-77M, a 77M-parameter encoder-decoder Transformer quantized to 4-bit (~100 MB), entirely in your browser via ONNX Runtime Web. Rather than just returning the model's top answer, it captures the raw output probabilities for each option and renders them as a bar chart, showing how confident (or uncertain) the model is across all choices.

Contact Information

LinkedIn

Professional network & career

View Profile

GitHub

Code repositories & open source projects

View Code