# rafaelbastos44/tcc architecture

> Architecture diagram of the GitHub repository rafaelbastos44/tcc, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-07-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rafaelbastos44/tcc
- Repository: https://github.com/rafaelbastos44/tcc

## Overview

##### Project type and purpose
- This is a research‐oriented text‐classification pipeline, not a web or full‐stack application.
- Purpose: compare zero‐shot LLM approaches (both API and local) versus supervised methods (scikit‐learn, neural nets) across binary, multiclass, and multilabel classification tasks, measuring performance, time, and cost.

##### File structure
- Top level: README.md, requirements.txt, .gitignore, and a single “text_classification” folder.
- text_classification/data: raw and preprocessed datasets.
- text_classification/LLMs: zero‐shot pipelines subdivided into api_llms (openai, gemini) and local_llms (deepseek, gemma, llama).
- text_classification/neural_nets: BERT grid-search & training, LSTM, modernBERT experiments.
- text_classification/sklearn_models_revised: scikit-learn experiments, models, and results.
- text_classification/analysis & comparison.ipynb: final comparative analysis across methods.

##### README for additional insights
- Confirms the goal: build a well‐structured pipeline to identify best classification approach for different contexts.
- Data from open platforms; metrics include performance, latency, and cost.

##### Elements
- Clear labels: “Data Ingestion,” “API LLM Pipeline,” “Local LLM Pipeline,” etc.
– Rectangles for compute modules (pipelines)

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Data Layer"
        Data["Data Ingestion & Preprocessing"]:::data
    end

    subgraph "API LLM Pipeline"
        OpenAI["OpenAI"]:::api
        OpenAI --> OpenAIRes["OpenAI Results"]:::result
        Gemini["Gemini"]:::api
        Gemini --> GeminiRes["Gemini Results"]:::result
    end

    subgraph "Local LLM Pipeline"
        Deepseek["Deepseek"]:::pipeline
        Deepseek --> DeepseekRes["Deepseek Results"]:::result
        Gemma["Gemma"]:::pipeline
        Gemma --> GemmaRes["Gemma Results"]:::result
        Llama["Llama"]:::pipeline
        Llama --> LlamaRes["Llama Results"]:::result
    end

    subgraph "Neural Network Pipeline"
        BERTGS["BERT GridSearch"]:::pipeline
        BERTGS --> BERTGSRes["BERT GridSearch Results"]:::result
        BERTTrain["BERT Training"]:::pipeline
        BERTTrain --> BERTTrainRes["BERT Training Results"]:::result
        LSTM["LSTM"]:::pipeline
        LSTM --> LSTMRes["LSTM Results"]:::result
        mBERTGS["modernBERT GridSearch"]:::pipeline
        mBERTGS --> mBERTGSRes["modernBERT GridSearch Results"]:::result
        mBERTTrain["modernBERT Training"]:::pipeline
        mBERTTrain --> mBERTTrainRes["modernBERT Training Results"]:::result
    end

    subgraph "Supervised Pipeline"
        Sklearn["scikit-learn"]:::pipeline
        Sklearn --> SklearnAnalysis["Supervised Analysis Notebook"]:::doc
    end

    subgraph "Results Aggregation"
        Results[(Central Results Store)]:::result
    end

    Analysis["Analysis & Comparison"]:::analysis
    FinalNotebook["Final Comparison Notebook"]:::doc

    ExternalOpenAI(("OpenAI API")):::external
    ExternalGemini(("Gemini API")):::external
    GPUCluster(["GPU Cluster"]):::external

    %% Data flows
    Data --> OpenAI
    Data --> Gemini
    Data --> Deepseek
    Data --> Gemma
    Data --> Llama
    Data --> BERTGS
    Data --> BERTTrain
    Data --> LSTM
    Data --> mBERTGS
    Data --> mBERTTrain
    Data --> Sklearn

    %% External calls
    OpenAI -->|"API Call"| ExternalOpenAI
    Gemini -->|"API Call"| ExternalGemini
    Deepseek -->|"Local Runtime"| GPUCluster
    Gemma -->|"Local Runtime"| GPUCluster
    Llama -->|"Local Runtime"| GPUCluster
    BERTGS -->|"Training"| GPUCluster
    BERTTrain -->|"Training"| GPUCluster
    LSTM -->|"Training"| GPUCluster
    mBERTGS -->|"Training"| GPUCluster
    mBERTTrain -->|"Training"| GPUCluster

    %% Results aggregation
    OpenAIRes --> Results
    GeminiRes --> Results
    DeepseekRes --> Results
    GemmaRes --> Results
    LlamaRes --> Results
    BERTGSRes --> Results
    BERTTrainRes --> Results
    LSTMRes --> Results
    mBERTGSRes --> Results
    mBERTTrainRes --> Results
    SklearnAnalysis --> Results

    %% Analysis flow
    Results --> Analysis
    Analysis --> FinalNotebook

    %% Click Events
    click Data "https://github.com/rafaelbastos44/tcc/tree/main/text_classification/data"
    click OpenAI "https://github.com/rafaelbastos44/tcc/tree/main/text_classification/LLMs/api_llms/openai"
    click Gemini "https://github.com/rafaelbastos44/tcc/tree/main/text_classification/LLMs/api_llms/gemini"
    click Deepseek "https://github.com/rafaelbastos44/tcc/tree/main/text_classification/LLMs/local_llms/deepseek"
    click Gemma "https://github.com/rafaelbastos44/tcc/tree/main/text_classification/LLMs/local_llms/gemma"
    click Llama "https://github.com/rafaelbastos44/tcc/tree/main/text_classification/LLMs/local_llms/llama"
    click BERTGS "https://github.com/rafaelbastos44/tcc/tree/main/text_classification/neural_nets/BERT_gridsearch"
    click BERTTrain "https://github.com/rafaelbastos44/tcc/tree/main/text_classification/neural_nets/BERT_train"
    click LSTM "https://github.com/rafaelbastos44/tcc/tree/main/text_classification/neural_nets/LSTM_FINAL"
    click mBERTGS "https://github.com/rafaelbastos44/tcc/tree/main/text_classification/neural_nets/modernBERT_gridsearch"
    click mBERTTrain "https://github.com/rafaelbastos44/tcc/tree/main/text_classification/neural_nets/modernBERT_train"
    click Sklearn "https://github.com/rafaelbastos44/tcc/tree/main/text_classification/sklearn_models_revised"
    click OpenAIRes "https://github.com/rafaelbastos44/tcc/tree/main/text_classification/LLMs/api_llms/openai/results"
    click GeminiRes "https://github.com/rafaelbastos44/tcc/tree/main/text_classification/LLMs/api_llms/gemini/results"
    click DeepseekRes "https://github.com/rafaelbastos44/tcc/tree/main/text_classification/LLMs/local_llms/deepseek/results"
    click GemmaRes "https://github.com/rafaelbastos44/tcc/tree/main/text_classification/LLMs/local_llms/gemma/results"
    click LlamaRes "https://github.com/rafaelbastos44/tcc/tree/main/text_classification/LLMs/local_llms/llama/results"
    click BERTGSRes "https://github.com/rafaelbastos44/tcc/tree/main/text_classification/neural_nets/BERT_gridsearch/results"
    click BERTTrainRes "https://github.com/rafaelbastos44/tcc/tree/main/text_classification/neural_nets/BERT_train/results"
    click LSTMRes "https://github.com/rafaelbastos44/tcc/tree/main/text_classification/neural_nets/LSTM_FINAL/results"
    click mBERTGSRes "https://github.com/rafaelbastos44/tcc/tree/main/text_classification/neural_nets/modernBERT_gridsearch/results"
    click mBERTTrainRes "https://github.com/rafaelbastos44/tcc/tree/main/text_classification/neural_nets/modernBERT_train/results"
    click SklearnAnalysis "https://github.com/rafaelbastos44/tcc/blob/main/text_classification/sklearn_models_revised/analysis.ipynb"
    click FinalNotebook "https://github.com/rafaelbastos44/tcc/blob/main/text_classification/comparison.ipynb"

    %% Styles
    classDef data fill:#FFE599,stroke:#D3B165;
    classDef api fill:#B4C7E7,stroke:#6D9EEB;
    classDef pipeline fill:#D9EAD3,stroke:#82B366;
    classDef result fill:#F9CB9C,stroke:#E69138;
    classDef analysis fill:#C9DAF8,stroke:#6D9EEB;
    classDef external fill:#EAD1DC,stroke:#C27BA0,stroke-dasharray: 5 5;
    classDef doc fill:#FFF2CC,stroke:#D6B656;
```
