Personal project · January to February 2025

LLM Based Sentiment Analysis

Software Developer

A personal experiment using Gemini and Mistral to produce annotated review data for testing AnnotationQuality.

Data for AnnotationQuality

The purpose was to generate annotation data and experiment with model and prompt variations for AnnotationQuality. The annotated reviews were used as test data for the annotation agreement toolkit.

The scripts read existing Amazon reviews from CSV and process them in batches. Gemini and Mistral each receive two prompt variants asking for a sentiment score from 1 (negative) to 5 (positive); the model annotations are exported to CSV.

Batch annotation

The pipeline sends review batches through model API wrappers and writes the resulting annotations to CSV. Error handling and rate limit management support the processing of repeated requests.

Python and pandas handle the review data, while provider wrappers separate the Gemini and Mistral integrations.