PII-Aware Sentiment & Topic Pipeline

An end-to-end NLP system that classifies product feedback by sentiment and topic, redacts PII before any transformer sees the text, and corrects for sarcasm — a failure mode transformer sentiment models systematically miss. Same InferencePipeline instance powers both the REST API and the UI; no logic forks between surfaces. Architecture flowchart LR T["Raw feedback text"] --> R["Redaction(8 PII categories)"] R --> P["Preprocessing(lowercase, URL/mention strip)"] P --> S["Sentiment(RoBERTa 3-class)"] P --> TC["Topic(keyword classifier)"] S --> SA["Sarcasm Adjustment(regex + heuristics)"] SA --> RES["Structured resultsentiment + topic + confidences+ redaction_summary + latency"] TC --> RES RES --> API["FastAPIPOST /predict"] RES --> UI["Streamlit UI"] Each stage is an independently testable component and can be swapped at runtime via constructor injection. replace_* methods on InferencePipeline allow hot-swapping any stage without rebuilding — useful for A/B comparisons and evaluation harnesses. ...

May 17, 2025

CompFly AI

Context At CompFly AI, I work as an Applied AI Engineer across AI agent evaluation, model validation, runtime security, and agent workflow development. My work centers on a core product question: how do we measure whether an AI security system behaves deterministically before release? In agentic systems, reliability is not just about a single model response. It depends on how the system behaves across tools, memory, multi-step workflows, runtime protections, and adversarial scenarios. ...

December 1, 2025