How achrafarbounper/thinktuning works
ThinkTuning is a multilingual French/English sentiment-analysis product with a React dashboard and FastAPI backend. Its main workflow is to submit text for classification or train a model; the documented pipeline also labels unlabeled data, filters by confidence, then fine-tunes an LLM. Manual review closes an active-learning loop back into training. The backend additionally exposes an AI agent and MCP integrations. Some capabilities are documented but their implementation was not sampled, so those links are cited to the README rather than presented as inspected source calls.
Main entry points: pipeline.py Pipeline routes · pipeline_runner.py Pipeline runner · application Prediction and training · core.py Agent runtime
Components 23
Web dashboard
- Dashboard shell
frontend/src/App.tsx - Product pages
frontend/src/pages - API client
frontend/src/api/sentimentApiClient.ts - Pipeline page
frontend/src/pages/PipelinePage.tsx - Job tracker
frontend/src/components/PipelineJobTracker.tsx
API and application
- Versioned API
backend/app/api/routes/v1 - Pipeline routes
backend/app/api/routes/pipeline.py - Pipeline runner
backend/app/application/pipeline_runner.py - Domain job models
backend/app/domain/entities/models.py - Job persistence
backend/app/infrastructure/persistence/job_store.py
ML workflows
- Prediction and training
backend/app/application - ML adapters
backend/app/infrastructure/ml - EDA augmentation
backend/app/infrastructure/ml/augmentation/eda.py - Confidence labeling
backend/label_dataset.py - LLM fine-tuning
backend/finetune_llm.py - Active learning review
backend/active_learning.py - Reviewed-data merge
backend/merge_reviewed_data.py
Agent and MCP
- Agent runtime
backend/app/agent/core.py - Agent tools
backend/app/infrastructure/tools - MCP server
backend/app/infrastructure/mcp/mcp_server_sse.py
Other components
- User
- Model providers
- Human reviewer
Connections 24
- User → Dashboard shell: uses
- Dashboard shell → Product pages: navigates
frontend/src/App.tsx - Product pages → API client: requests
frontend/src/api/sentimentApiClient.ts - Pipeline page → API client: starts and tracks
frontend/src/pages/PipelinePage.tsx - Pipeline page → Job tracker: renders
frontend/src/pages/PipelinePage.tsx - API client → Versioned API: calls
frontend/src/api/sentimentApiClient.ts - Versioned API → Pipeline routes: routes pipeline
backend/app/api/routes/v1/pipeline.py - Pipeline routes → Pipeline runner: starts and cancels
backend/app/api/routes/pipeline.py - Pipeline routes → Job persistence: reads and lists
backend/app/api/routes/pipeline.py - Pipeline routes → Domain job models: validates and returns
backend/app/api/routes/pipeline.py - Pipeline runner → Job persistence: updates jobs
backend/app/application/pipeline_runner.py - Pipeline runner → Confidence labeling: labels and filters
backend/app/application/pipeline_runner.py - Pipeline runner → LLM fine-tuning: runs subprocess
backend/app/application/pipeline_runner.py - Confidence labeling → ML adapters: uses classifier
- Prediction and training → ML adapters: executes ML
backend/app/application/classifier_registry.py - Prediction and training → EDA augmentation: augments training data
- User → Prediction and training: submits text or training
- Active learning review → Human reviewer: selects uncertain samples
- Human reviewer → Reviewed-data merge: provides corrections
- Reviewed-data merge → Prediction and training: feeds retraining
- User → Agent runtime: asks assistant
- Agent runtime → Agent tools: invokes tools
- User → MCP server: connects MCP client
- Agent runtime → Model providers: uses language model