
Sergio Berrospi Vergara
Verified Expert in Engineering
Data Scientist and Developer
Lima, Callao Region, Peru
Toptal member since June 2, 2026
Sergio is a senior data scientist with 6+ years of experience building end-to-end machine learning systems for business impact. He has delivered production recommender systems generating USD 27 million in incremental revenue, segmentation and propensity models lifting marketing ROI by 25%, and LLM-powered Text-to-SQL agents for complex data querying. He works across Python, SQL, Databricks, GCP, and TypeScript, and excels at translating analytical findings into measurable business outcomes.
Portfolio
Experience
- Microsoft Power BI - 7 years
- SQL - 7 years
- Python 3 - 7 years
- Data Science - 6 years
- Machine Learning (ML) APIs - 5 years
- Amazon Web Services (AWS) - 3 years
- LLM Integration - 3 years
- AI Agents - 2 years
Preferred Environment
Python, SQL, Google Cloud, Amazon Web Services (AWS), Databricks, MLflow, Microsoft Power BI, Git, Scikit-learn, Vertex AI
The most amazing...
...solution I've developed is a recommender system (Market Basket Analysis and ALS) that generated USD 27 million in incremental revenue.
Work Experience
AI Data Trainer
Scale AI
- Fine-tuned LLMs for Google, OpenAI, and Meta via RLHF, improving model alignment with human intent across diverse task categories.
- Designed prompt engineering strategies and validated model outputs across thousands of examples to improve dataset quality and downstream model performance.
- Developed systematic evaluation criteria to assess response quality, safety, and accuracy across multiple domains for tier-1 AI labs.
Senior Data Scientist
Halo Media
- Designed and built an end-to-end semantic search system for health survey data using GPT-based embeddings, Databricks Vector Search (HNSW), and a custom vocabulary search approach.
- Built an evaluation framework for a Text-to-SQL LLM agent, integrating custom scorers with MLflow for experiment tracking and performance monitoring, improving agent accuracy from 20% to 90%.
- Developed a multi-strategy retrieval pipeline comparing clustering, RAG, few-shot prompting, and vocabulary-based approaches, providing empirical data to guide architectural decisions for the AI agent.
- Built end-to-end ML pipelines in Python and TypeScript using the Mastra framework, covering ingestion, semantic indexing, model evaluation, deployment, and monitoring.
Machine Learning Engineer
Anyone AI
- Built a credit risk classification model trained on 350,000+ transactions, achieving 0.75 ROC AUC using XGBoost and LightGBM with full feature engineering pipeline.
- Developed a multimodal product classification system for an eCommerce recommendation engine, combining image and text features to improve product categorization.
- Designed and deployed Python/FastAPI microservices containerized with Docker and hosted on AWS with Redis caching for low-latency inference.
Senior Data Scientist
Alicorp
- Built a production recommender system from scratch using Market Basket Analysis and ALS collaborative filtering, generating USD 27 million in incremental revenue, equivalent to 25% of the entire product category's annual revenue.
- Designed and deployed a churn prediction model from scratch using XGBoost and LightGBM, enabling proactive retention campaigns and directly reducing customer attrition.
- Built end-to-end customer segmentation models from scratch (K-means, K-prototypes, RFM clustering) that increased engagement by 20% and reduced marketing costs by 30%.
- Automated the creation of promotions and discounts by building optimization algorithms for campaign management, lifting marketing ROI by 25% across multiple product categories.
- Built analytics dashboards from scratch in Amazon QuickSight and later migrated them to Power BI, cutting data processing time by 50% and improving operational efficiency by 40%.
- Designed and executed A/B tests and cohort analyses to measure the incremental impact of marketing initiatives, delivering 15+ projects with a 95% on-time rate across marketing, commercial, and trade teams.
Experience
Agent Project
The system combines query decomposition, prompt-engineered SQL generation, and RAG retrieval to handle ambiguous survey terminology. I also built the full evaluation framework, integrating custom scorers with MLflow, taking agent accuracy from 20% to 90%. The project spans Python and TypeScript, uses the Mastra agent framework for orchestration, and serves as the product's core intelligence layer.
Recommender System
The system generated USD 27 million in incremental revenue (25% of the product category's annual revenue). I also built the customer segmentation models (K-means, K-prototypes, RFM) and automation algorithms for promotions and discounts that supported the broader personalization strategy.
AIPE, a MultiRAG System for Peruvian Elections
https://github.com/SergioBerrospi/AIPEI designed the full ingestion pipeline, diarization workflow, vector indexing, and retrieval logic. The project demonstrates applied RAG architecture with heterogeneous sources: unstructured video transcripts, semi-structured government documents, and real-time web content. It was built in Python using open-source LLM tooling.
Education
Bachelor's Degree in industrial Engineering
National University of Engineering - Lima, Peru
Certifications
Specialization in Machine Learning Engineering
Anyone AI
Machine Learning with Python – From Linear Models to Deep Learning (MicroMasters)
MITx / edX
Fundamentals of Statistics (MicroMasters)
MITx / edX
Probability – The Science of Uncertainty and Data (MicroMasters)
MITx / edX
Excel to MySQL: Analytic Techniques for Business Specialization
Duke University | via Coursera
Analyzing and Visualizing Data with Power BI
Microsoft / edX
Skills
Libraries/APIs
Scikit-learn, PySpark, Pandas, REST APIs, XGBoost, YouTube API
Tools
Microsoft Power BI, Amazon QuickSight, BigQuery, Docker Compose, Git, Amazon SageMaker, Pytest
Languages
Python 3, SQL, Python, TypeScript
Storage
PostgreSQL, Google Cloud, Databases, Redshift, Redis
Frameworks
Streamlit, LightGBM
Platforms
Docker, Databricks, Amazon Web Services (AWS), Vertex AI
Paradigms
Microservices
Other
Machine Learning (ML) APIs, Data Science, LLM Integration, A/B Testing, K-means Clustering, Machine Learning, Linear Regression, FastAPI, AI Agents, Statistics, Bayesian Statistics, MLflow, Reinforcement Learning from Human Feedback (RLHF), Data Labeling, Mastra, OpenAI GPT-4 API, Vector Search, RAG Systems, Agentic RAG Systems, RAG Architecture, ALS, Market Basket Analysis, Speaker Diarization, LangChain, Natural Language Processing (NLP), Supabase, Deep Learning, Probability Theory, Data Analytics, Data Visualization, English
How to Work with Toptal
Toptal matches you directly with global industry experts from our network in hours—not weeks or months.
Share your needs
Choose your talent
Start your risk-free talent trial
Top talent is in high demand.
Start hiring