Accidentally Awesome Labs Case AAL–005
Cover · 01
01 / 08

Trade intelligence2026

Harmony AI Client project

Classify products. Govern the AI.

AI-assisted tariff classification—from a public text/image trial to bulk catalogs, model evaluation and controlled retraining.

Product
Consumer + operator/admin
Platform
Web app · API
Scope
Product UX · full-stack · AI
Status
Private client project
Harmony AI public classifier with a detailed industrial microcontroller description, image input, US destination and reporting-depth controls. Exhibit A
W 1280 × H 960 · @2× CASE NO. AAL–005
Industrial microcontroller classification workspace (demo data)

Harmony AIThe brief

The problem

Serving a prediction is only one path. The platform also needs reusable model routing, persistent catalog state and safe tariff-data changes.

What got built

  1. Shared FastAPI core for ML, LLM and decision-model pipelines
  2. Cached provider clients, encrypted credentials and purpose-specific model resolution
  3. Catalog persistence, in-process batches and labeled-data evaluation
  4. Transactional tariff ingestion, change journals and scoped cache invalidation

Harmony AIHard part 1 of 2

A useful answer, not just a code.

Obstacle

A tariff code alone does not explain the decision or shipment cost.

Fix

Turn text or images into readable codes, hierarchy and confidence. Keep shipment-cost previews and optional retail estimates clearly illustrative.

Text + image no-account classification and planning previews

Harmony AIHard part 2 of 2

Inspect decisions. Control what changes.

Obstacle

Changes to models or tariff data can invalidate answers across an entire catalog.

Fix

Compare classifiers on shared input with traces. Retrain from opt-in events outside requests; require manual, evidence-gated promotion by default. Apply tariff changes in journaled per-country transactions, queue stale rows and permit rollback only after snapshot and recency checks.

Release gates fresh no-regression evidence + guarded rollback

Harmony AIBlueprint

Shared inference. Explicit policies. Separate job lifecycles.

Stack

Interface
React 18 · TypeScript · Vite · Radix UI · TanStack Query
API + state
Python 3.12 · FastAPI · SQLAlchemy · SQLite
Inference
FastText · LLM providers · Choice scorers · scikit-learn
Operations
APScheduler · MLflow · Nginx · Docker Compose
Harmony AI architecture Anonymous Harmony and authenticated operators use a React app behind Nginx and FastAPI. A shared classification core calls configured LLM and Choice providers and local light students. SQLite holds operator data, configuration and public quota/lead metadata. Background jobs handle tariff updates and retraining; optional MLflow records operator traces and evaluations, not public classification traffic. Harmony AI anonymous trial Operator UI React · TypeScript Nginx API reverse proxy FastAPI policy · auth SQLite state · configuration Classification shared pipeline core Model providers LLM · Choice scorers Local students FastText · light ML Background jobs APScheduler · retrain Tariff sources configured adapters MLflow (opt-in) traces · evaluations
  1. Interfaces
    • Harmony AIanonymous trial
    • Operator UIReact · TypeScript
  2. Application
    • NginxAPI reverse proxy
    • FastAPIpolicy · auth
  3. Models
    • Classificationshared pipeline core
    • Model providersLLM · Choice scorers
    • Local studentsFastText · light ML
  4. State
    • SQLitestate · configuration
  5. Operations
    • Background jobsAPScheduler · retrain
    • Tariff sourcesconfigured adapters
  6. Signals
    • MLflow (opt-in)traces · evaluations
Not to scale DWG. AAL–005

Harmony AIReceipts

Engineering behind the interface.

  1. 1 core shared by anonymous and authenticated requests
  2. 7 pipelines governed by global and country policy
  3. 4 LLM provider types, resolved per purpose
  4. Journaled per-country tariff apply and guarded revert

Harmony AIMethod

Build the control plane, not just the demo.

Typed APIs, purpose-specific model resolution and shared classification stages form the request path. Catalog batches stay in-process; tariff jobs and student retraining stay outside interactive inference. Opt-in traces and evaluation snapshots provide operator evidence. CI defines backend, component and browser checks. Screens use synthetic data, not production outcomes.

Agents

  • Claude
  1. spec
  2. plan
  3. build
  4. verify
  5. ship

Every change clears

  • Backend checks
  • Typecheck + build
  • Component checks
  • Browser flows
  • Promotion gate
Process
CASE NO. AAL–005

Harmony AIEnd of file

End of file.

Capabilities on file

  • System architecture
  • Backend engineering
  • AI orchestration
  • Data pipelines
  • Model evaluation
  • Operational safeguards
Next case
CASE NO. AAL–001
GenomarkerCase AAL–001 Science that shows its work. Open case file