Ujamaa XGB Model
Model Description
The Ujamaa XGB Model is part of the Soulprint Archetype Framework, built to predict the Ujamaa score (0.0–1.0) of text.
Ujamaa embodies collaborative power and collective uplift, rooted in teamwork, shared responsibility, and mutual aid.
- Archetype Adjective: Collaborative
- Catchphrase: Nobody left behind.
- Perspective: Shared power is true power.
- Symbolic Inspirations: Ella Baker, Black women behind the scenes
Intended Uses
- Assess narrative alignment with Ujamaa’s collaborative qualities
- Support AI agents in cultural grounding
- Enhance story-based AI and reflective tools
Training & Evaluation
- Algorithm: XGBoo
Ujamaa XGB Model
Overview
The Ujamaa XGB Model is part of the Soulprint Archetype Framework, designed to estimate a continuous "Ujamaa score" (0.0–1.0) from text.
Ujamaa represents the archetype of collaborative strength and collective uplift—rooted in principles of cooperation, mutual aid, and shared responsibility.
This model was trained using XGBoost regression on sentence embeddings generated with all-mpnet-base-v2
. The outputs represent how strongly a piece of text reflects Ujamaa’s collaborative essence.
- Archetype Adjective: Collaborative
- Catchphrase: Nobody left behind.
- Perspective: Shared power is true power.
- Symbolic Inspirations: Ella Baker, Black women behind the scenes:contentReference[oaicite:0]{index=0}
Training & Evaluation
The model was trained with 5-fold cross-validation to ensure generalization.
Fold Performance
- 📂 Fold 1: MSE = 0.0277, R² = 0.6063
- 📂 Fold 2: MSE = 0.0271, R² = 0.6416
- 📂 Fold 3: MSE = 0.0264, R² = 0.6116
- 📂 Fold 4: MSE = 0.0273, R² = 0.6351
- 📂 Fold 5: MSE = 0.0289, R² = 0.6100
Cross-Validation Summary
- 📊 Mean MSE: 0.0275 ± 0.0008
- 📊 Mean R²: 0.6209 ± 0.0145
✅ Final model retrained on full dataset and saved as Ujamaa_xgb_model.json
Usage
You can load the model directly from Hugging Face Hub (replace with your repo ID once pushed):
import xgboost as xgb
from sentence_transformers import SentenceTransformer
from huggingface_hub import hf_hub_download
# -----------------------------
# 1. Download model from Hugging Face Hub
# -----------------------------
REPO_ID = "mjpsm/Ujamaa-xgb-model"
FILENAME = "Ujamaa_xgb_model.json"
model_path = hf_hub_download(repo_id=REPO_ID, filename=FILENAME)
# -----------------------------
# 2. Load model + embedder
# -----------------------------
model = xgb.XGBRegressor()
model.load_model(model_path)
embedder = SentenceTransformer("all-mpnet-base-v2")
# -----------------------------
# 3. Example prediction
# -----------------------------
text = "We organized food drives together, making sure every family had what they needed."
embedding = embedder.encode([text])
score = model.predict(embedding)[0]
print("Predicted Ujamaa Score:", round(float(score), 3))
Intended Use
Primary Use Case: Evaluate how strongly text aligns with the Ujamaa archetype (collaboration, teamwork, mutual uplift).
Applications:
Narrative analysis in community and cultural contexts
AI-driven reflection tools for cooperative leadership
Enhancing RAG agents and story-based AI with archetypal grounding
Limitations
The model reflects patterns learned from synthetic + curated data and may not generalize perfectly to all real-world contexts.
Scores are continuous signals (0.0–1.0), not binary labels. Thresholds should be set depending on application.
Archetype interpretations are cultural and symbolic, not universal truth markers.
Space using mjpsm/Ujamaa-xgb-model 1
Evaluation results
- mean_squared_error on Soulprint Ujamaa Datasetself-reported0.028
- r2_score on Soulprint Ujamaa Datasetself-reported0.621