# rahulrayy/can-llms-make-tabular-ml-better architecture

> Architecture diagram of the GitHub repository rahulrayy/can-llms-make-tabular-ml-better, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rahulrayy/can-llms-make-tabular-ml-better
- Repository: https://github.com/rahulrayy/can-llms-make-tabular-ml-better

## Overview

This repository is a notebook-based experiment comparing raw-feature, LLM-feature, and combined tabular classifiers. Its workflow samples and preprocesses Adult Income and HMEQ data, generates cached LLM descriptions, converts those descriptions into structured and embedding features, then evaluates XGBoost variants with nested cross-validation and statistical tests. The README also identifies PCA sensitivity analysis, SHAP analysis, and prompt ablation as experiment capabilities. Only the README is available as evidence; the notebook’s internal implementation and exact call structure could not be verified, so the graph shows documented relationships only.

Main entry points: [`Can_LLMs_Make_Tabular_ML_Better.ipynb`](https://github.com/rahulrayy/can-llms-make-tabular-ml-better/blob/main/Can_LLMs_Make_Tabular_ML_Better.ipynb) (Nested cross-validation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data preparation"]
  node_datasets["Adult and HMEQ data"]
  node_sampling["Stratified sampling"]
  node_preprocessing["Categorical encoding"]
end

subgraph group_enrichment["LLM enrichment"]
  node_llm_generation["Prompted feature generation"]
  node_groq{{"Groq LLaMA API"}}
  node_cache[("Google Drive cache")]
  node_parsing["Structured output parsing"]
  node_embeddings["Text embeddings"]
  node_sentence_transformer{{"MiniLM encoder"}}
end

subgraph group_evaluation["Model evaluation"]
  node_feature_matrix["Feature matrix variants"]
  node_nested_cv["Nested cross-validation"]
  node_pca["Fold-local PCA"]
  node_optuna["Optuna tuning"]
  node_xgboost["XGBoost classifiers"]
end

subgraph group_analysis["Experiment analysis"]
  node_statistics["Statistical comparison"]
  node_shap["SHAP analysis"]
  node_prompt_ablation["Prompt ablation"]
end

node_researcher(("Researcher"))

node_researcher -->|"runs experiment"| node_sampling
node_datasets -->|"samples rows"| node_sampling
node_sampling -->|"prepares rows"| node_preprocessing
node_preprocessing -->|"formats readable rows"| node_llm_generation
node_llm_generation -->|"sends prompts"| node_groq
node_llm_generation -->|"caches responses"| node_cache
node_groq -->|"returns descriptions"| node_llm_generation
node_llm_generation -->|"parses output"| node_parsing
node_parsing -->|"encodes notes"| node_embeddings
node_embeddings -->|"encodes text"| node_sentence_transformer
node_preprocessing -->|"provides raw features"| node_feature_matrix
node_parsing -->|"provides structured features"| node_feature_matrix
node_embeddings -->|"provides vectors"| node_feature_matrix
node_feature_matrix -->|"evaluates variants"| node_nested_cv
node_nested_cv -->|"fits within folds"| node_pca
node_nested_cv -->|"tunes parameters"| node_optuna
node_nested_cv -->|"evaluates models"| node_xgboost
node_nested_cv -->|"compares scores"| node_statistics
node_nested_cv -.->|"supports analysis"| node_shap
node_llm_generation -.->|"varies prompt framing"| node_prompt_ablation

click node_datasets "https://github.com/rahulrayy/can-llms-make-tabular-ml-better/blob/main/Can_LLMs_Make_Tabular_ML_Better.ipynb"
click node_sampling "https://github.com/rahulrayy/can-llms-make-tabular-ml-better/blob/main/Can_LLMs_Make_Tabular_ML_Better.ipynb"
click node_preprocessing "https://github.com/rahulrayy/can-llms-make-tabular-ml-better/blob/main/Can_LLMs_Make_Tabular_ML_Better.ipynb"
click node_llm_generation "https://github.com/rahulrayy/can-llms-make-tabular-ml-better/blob/main/Can_LLMs_Make_Tabular_ML_Better.ipynb"
click node_parsing "https://github.com/rahulrayy/can-llms-make-tabular-ml-better/blob/main/Can_LLMs_Make_Tabular_ML_Better.ipynb"
click node_embeddings "https://github.com/rahulrayy/can-llms-make-tabular-ml-better/blob/main/Can_LLMs_Make_Tabular_ML_Better.ipynb"
click node_feature_matrix "https://github.com/rahulrayy/can-llms-make-tabular-ml-better/blob/main/Can_LLMs_Make_Tabular_ML_Better.ipynb"
click node_nested_cv "https://github.com/rahulrayy/can-llms-make-tabular-ml-better/blob/main/Can_LLMs_Make_Tabular_ML_Better.ipynb"
click node_pca "https://github.com/rahulrayy/can-llms-make-tabular-ml-better/blob/main/Can_LLMs_Make_Tabular_ML_Better.ipynb"
click node_optuna "https://github.com/rahulrayy/can-llms-make-tabular-ml-better/blob/main/Can_LLMs_Make_Tabular_ML_Better.ipynb"
click node_xgboost "https://github.com/rahulrayy/can-llms-make-tabular-ml-better/blob/main/Can_LLMs_Make_Tabular_ML_Better.ipynb"
click node_statistics "https://github.com/rahulrayy/can-llms-make-tabular-ml-better/blob/main/Can_LLMs_Make_Tabular_ML_Better.ipynb"
click node_shap "https://github.com/rahulrayy/can-llms-make-tabular-ml-better/blob/main/Can_LLMs_Make_Tabular_ML_Better.ipynb"
click node_prompt_ablation "https://github.com/rahulrayy/can-llms-make-tabular-ml-better/blob/main/Can_LLMs_Make_Tabular_ML_Better.ipynb"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_datasets,node_sampling,node_preprocessing toneBlue
class node_llm_generation,node_groq,node_cache,node_parsing,node_embeddings,node_sentence_transformer toneAmber
class node_feature_matrix,node_nested_cv,node_pca,node_optuna,node_xgboost toneMint
class node_statistics,node_shap,node_prompt_ablation toneRose
class node_researcher toneIndigo
```

## Components

### Data preparation

- [Adult and HMEQ data](https://github.com/rahulrayy/can-llms-make-tabular-ml-better/blob/main/Can_LLMs_Make_Tabular_ML_Better.ipynb): `Can_LLMs_Make_Tabular_ML_Better.ipynb`
- [Stratified sampling](https://github.com/rahulrayy/can-llms-make-tabular-ml-better/blob/main/Can_LLMs_Make_Tabular_ML_Better.ipynb): `Can_LLMs_Make_Tabular_ML_Better.ipynb`
- [Categorical encoding](https://github.com/rahulrayy/can-llms-make-tabular-ml-better/blob/main/Can_LLMs_Make_Tabular_ML_Better.ipynb): `Can_LLMs_Make_Tabular_ML_Better.ipynb`

### LLM enrichment

- [Prompted feature generation](https://github.com/rahulrayy/can-llms-make-tabular-ml-better/blob/main/Can_LLMs_Make_Tabular_ML_Better.ipynb): `Can_LLMs_Make_Tabular_ML_Better.ipynb`
- **Groq LLaMA API**
- **Google Drive cache**
- [Structured output parsing](https://github.com/rahulrayy/can-llms-make-tabular-ml-better/blob/main/Can_LLMs_Make_Tabular_ML_Better.ipynb): `Can_LLMs_Make_Tabular_ML_Better.ipynb`
- [Text embeddings](https://github.com/rahulrayy/can-llms-make-tabular-ml-better/blob/main/Can_LLMs_Make_Tabular_ML_Better.ipynb): `Can_LLMs_Make_Tabular_ML_Better.ipynb`
- **MiniLM encoder**

### Model evaluation

- [Feature matrix variants](https://github.com/rahulrayy/can-llms-make-tabular-ml-better/blob/main/Can_LLMs_Make_Tabular_ML_Better.ipynb): `Can_LLMs_Make_Tabular_ML_Better.ipynb`
- [Nested cross-validation](https://github.com/rahulrayy/can-llms-make-tabular-ml-better/blob/main/Can_LLMs_Make_Tabular_ML_Better.ipynb): `Can_LLMs_Make_Tabular_ML_Better.ipynb`
- [Fold-local PCA](https://github.com/rahulrayy/can-llms-make-tabular-ml-better/blob/main/Can_LLMs_Make_Tabular_ML_Better.ipynb): `Can_LLMs_Make_Tabular_ML_Better.ipynb`
- [Optuna tuning](https://github.com/rahulrayy/can-llms-make-tabular-ml-better/blob/main/Can_LLMs_Make_Tabular_ML_Better.ipynb): `Can_LLMs_Make_Tabular_ML_Better.ipynb`
- [XGBoost classifiers](https://github.com/rahulrayy/can-llms-make-tabular-ml-better/blob/main/Can_LLMs_Make_Tabular_ML_Better.ipynb): `Can_LLMs_Make_Tabular_ML_Better.ipynb`

### Experiment analysis

- [Statistical comparison](https://github.com/rahulrayy/can-llms-make-tabular-ml-better/blob/main/Can_LLMs_Make_Tabular_ML_Better.ipynb): `Can_LLMs_Make_Tabular_ML_Better.ipynb`
- [SHAP analysis](https://github.com/rahulrayy/can-llms-make-tabular-ml-better/blob/main/Can_LLMs_Make_Tabular_ML_Better.ipynb): `Can_LLMs_Make_Tabular_ML_Better.ipynb`
- [Prompt ablation](https://github.com/rahulrayy/can-llms-make-tabular-ml-better/blob/main/Can_LLMs_Make_Tabular_ML_Better.ipynb): `Can_LLMs_Make_Tabular_ML_Better.ipynb`

### Other components

- **Researcher**

## Connections

- Researcher → Stratified sampling: runs experiment (evidence: `README.md`)
- Adult and HMEQ data → Stratified sampling: samples rows (evidence: `README.md`)
- Stratified sampling → Categorical encoding: prepares rows (evidence: `README.md`)
- Categorical encoding → Prompted feature generation: formats readable rows (evidence: `README.md`)
- Prompted feature generation → Groq LLaMA API: sends prompts (evidence: `README.md`)
- Prompted feature generation → Google Drive cache: caches responses (evidence: `README.md`)
- Groq LLaMA API → Prompted feature generation: returns descriptions (evidence: `README.md`)
- Prompted feature generation → Structured output parsing: parses output (evidence: `README.md`)
- Structured output parsing → Text embeddings: encodes notes (evidence: `README.md`)
- Text embeddings → MiniLM encoder: encodes text (evidence: `README.md`)
- Categorical encoding → Feature matrix variants: provides raw features (evidence: `README.md`)
- Structured output parsing → Feature matrix variants: provides structured features (evidence: `README.md`)
- Text embeddings → Feature matrix variants: provides vectors (evidence: `README.md`)
- Feature matrix variants → Nested cross-validation: evaluates variants (evidence: `README.md`)
- Nested cross-validation → Fold-local PCA: fits within folds (evidence: `README.md`)
- Nested cross-validation → Optuna tuning: tunes parameters (evidence: `README.md`)
- Nested cross-validation → XGBoost classifiers: evaluates models (evidence: `README.md`)
- Nested cross-validation → Statistical comparison: compares scores (evidence: `README.md`)
- Nested cross-validation → SHAP analysis: supports analysis
- Prompted feature generation → Prompt ablation: varies prompt framing
