DAVIDE MODOLO

AI • Machine Learning • Deep Learning

AI & Machine Learning Engineer with a Master's degree in Artificial Intelligence Systems. Currently building production NLP and agentic AI systems at OpenCity Labs: fine-tuned NER models, RAG pipelines, and MCP tool-calling deployed on AWS. Services containerized with Docker, shipped through GitLab CI.
Open to new opportunities.

What drives me: shipping models, not demos. I want to own models end to end — data, fine-tuning, evaluation, serving, monitoring — and I care most about systems that know when they're unsure, keep humans in the loop, and treat privacy as a design constraint. My goal is to work on machine learning models at scale, across language, vision, and prediction.

Professional Experience

AI & Machine Learning Engineer, R&D

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

• Developed and fine-tuned a spaCy multilingual NER model (xx_ent_wiki_sm) for PII detection, benchmarked on real queries: error analysis diagnosed false positives (e.g., sentence-initial verbs tagged as entities) and improved precision on names, locations, and organizations. Deployed in-process in the production service handling Italian citizen messages.
• Engineered the pipeline behind the production chatbot: 50k+ public-administration pages are read every day into the knowledge base, each scanned by the NER model and regex rules to build a allowed-list of entities that must stay intact (e.g., the mayor's name on public pages). Citizen messages go through the same NER + regex layer: anything outside the allowed-list is anonymized — a citizen typing their own name gets it obfuscated, while a question about the mayor keeps the name, so messages stay meaningful. Chatbot hosted on AWS EC2, LLMs provided via AWS Bedrock.
• Fixed a cross-lingual failure in the production chatbot, where Italian-only retrieved context caused 35% of non-Italian queries to be answered in Italian: added answer-language mismatch detection with LLM translation fallback (AWS Bedrock), cutting the failure rate to ~1%. The fix was released to 10+ clients.
• Co-designed an open-source agentic AI platform for municipal officers: an orchestrator coordinates specialized subagents via MCP tool-calling, with human-in-the-loop approval on proposed actions, reducing targeted workflows from days to hours. Designed its hybrid RAG retrieval (vector search + full-text, fused with reciprocal rank fusion) to fix domain-specific failures where pure embeddings missed legal acronyms and keyword search missed semantic matches.
• Centralized AI automation flows scattered across repositories into the open-source Windmill orchestration framework (issue reviews, MR reviews, sales analytics), including agentic loops with sandboxed coding agents that run code and open MRs; some flows are exposed as MCP tools callable by our agent. Dockerized all services with GitLab CI automating tests and image builds.

Python FastAPI Docker AWS EC2 AWS Bedrock Windmill GitLab CI NER Model Chatbot AI Orchestrator

Machine Learning Research Intern

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

• Implemented KnowNo, an uncertainty alignment framework for LLM planners (Google's "Robots That Ask For Help" paper): token-level log-probability analysis across GPT-4o and locally quantized Llama 3.1 (llama.cpp), delivered as a reusable Python package.
• Developed an uncertainty-driven action-selection loop for an elderly-care robotic assistant: when multiple actions pass the calibrated threshold, the planner re-prompts with only the most probable options or asks the user, trading autonomy for safety; outcomes are stored via RAG (gte-large embeddings) to inform future decisions.
• Extended the framework beyond text: tested LLaVA on photos of real-life scenes to bring visual input into uncertainty estimation, validating the approach across ~10 simulated environments.

Python PyTorch Hugging Face GPT-4o Llama 3.1 (llama.cpp) RAG Uncertainty Quantification LLaVA KnowNo Paper

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. Implemented an 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 and compared 4 neural architectures against an LSTM baseline in PyTorch for multi-task joint intent classification and slot filling on the ATIS and SNIPS datasets: a bidirectional LSTM and a custom encoder-decoder built from scratch, plus the fine-tuned transformers BERT and ERNIE 2.0.
• Custom encoder-decoder achieved the best overall results: 94.95% slot F1 and 96.42% intent accuracy on ATIS — improving both ATIS baselines by at least +2 points — and +13% slot F1 over the SNIPS baseline. Pretrained transformers underperformed due to 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

Playground

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.

LLM Delivery Agent

A minimal, simplified excerpt from my thesis: a 77M-parameter LLM controls an agent on a 5×5 grid to pick up and deliver a parcel.

Load the model to begin.
Agent Parcel Delivery Zone

A stripped-down, minimal demo of one small slice of my thesis. Uses the same LaMini-Flan-T5-77M model as the LLM Playground (shared session). The agent navigates a 5×5 grid to pick up a parcel and deliver it to the delivery zone. Each visited cell shows the model's action confidence as a percentage. Click any cell to place the parcel, then press Start for auto-play or Step for manual control. Click a visited cell to inspect the full probability distribution.

Contact Information

LinkedIn

Professional network & career

View Profile

GitHub

Code repositories & open source projects

View Code