Compare commits
33
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e7f996306f | ||
|
|
22c521293f | ||
|
|
74f8c8607b | ||
|
|
8c342d994e | ||
|
|
bcc41ed4c3 | ||
|
|
fc48d9a4fd | ||
|
|
191805461d | ||
|
|
c2142f7f63 | ||
|
|
9c92d19943 | ||
|
|
aead9151c0 | ||
|
|
14636a4d3b | ||
|
|
d6d6f1893e | ||
|
|
abf6f3feda | ||
|
|
7a4d06bbef | ||
|
|
efad73a1a4 | ||
|
|
50af2eccb3 | ||
|
|
e9a7daf5b3 | ||
|
|
eac2f648c0 | ||
|
|
79d53d3462 | ||
|
|
6dd6e92d93 | ||
|
|
3db9f63246 | ||
|
|
6552ba503b | ||
|
|
202c787f19 | ||
|
|
61324ff499 | ||
|
|
859c40c55c | ||
|
|
92dd043b35 | ||
|
|
761265a467 | ||
|
|
da1bfd4779 | ||
|
|
1f4b7100bc | ||
|
|
3ed8f91303 | ||
|
|
49167ee308 | ||
|
|
b9210910f5 | ||
|
|
040d90ce73 |
@@ -1,42 +1,61 @@
|
||||
name: Build and Push Image
|
||||
on: [ push ]
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build and push image
|
||||
runs-on: ubuntu-latest
|
||||
container: catthehacker/ubuntu:act-latest
|
||||
if: gitea.ref == 'refs/heads/master'
|
||||
build:
|
||||
name: Build and push image
|
||||
runs-on: ubuntu-latest
|
||||
container: catthehacker/ubuntu:act-latest
|
||||
if: gitea.ref == 'refs/heads/master'
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Create Kubeconfig
|
||||
run: |
|
||||
mkdir $HOME/.kube
|
||||
echo "${{ secrets.KUBEC_CONFIG_BUILDX }}" > $HOME/.kube/config
|
||||
- name: Create Kubeconfig
|
||||
run: |
|
||||
mkdir $HOME/.kube
|
||||
echo "${{ secrets.KUBEC_CONFIG_BUILDX }}" > $HOME/.kube/config
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
driver: kubernetes
|
||||
driver-opts: |
|
||||
namespace=gitea-runner
|
||||
qemu.install=true
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
driver: kubernetes
|
||||
driver-opts: |
|
||||
namespace=gitea-runner
|
||||
qemu.install=true
|
||||
|
||||
- name: Login to Docker Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.aridgwayweb.com
|
||||
username: armistace
|
||||
password: ${{ secrets.REG_PASSWORD }}
|
||||
- name: Login to Docker Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.aridgwayweb.com
|
||||
username: armistace
|
||||
password: ${{ secrets.REG_PASSWORD }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: |
|
||||
git.aridgwayweb.com/armistace/blog:latest
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: |
|
||||
git.aridgwayweb.com/armistace/blog:latest
|
||||
|
||||
- name: Deploy
|
||||
run: |
|
||||
echo "Installing Kubectl"
|
||||
apt-get update
|
||||
apt-get install -y apt-transport-https ca-certificates curl gnupg
|
||||
curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.33/deb/Release.key | gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
|
||||
chmod 644 /etc/apt/keyrings/kubernetes-apt-keyring.gpg
|
||||
echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.33/deb/ /' | tee /etc/apt/sources.list.d/kubernetes.list
|
||||
chmod 644 /etc/apt/sources.list.d/kubernetes.list
|
||||
apt-get update
|
||||
apt-get install kubectl
|
||||
kubectl delete namespace blog
|
||||
kubectl create namespace blog
|
||||
kubectl create secret docker-registry regcred --docker-server=${{ vars.DOCKER_SERVER }} --docker-username=${{ vars.DOCKER_USERNAME }} --docker-password='${{ secrets.DOCKER_PASSWORD }}' --docker-email=${{ vars.DOCKER_EMAIL }} --namespace=blog
|
||||
kubectl apply -f kube/blog_pod.yaml && kubectl apply -f kube/blog_deployment.yaml && kubectl apply -f kube/blog_service.yaml
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: blog-deployment
|
||||
labels:
|
||||
app: blog
|
||||
namespace: blog
|
||||
spec:
|
||||
replicas: 3
|
||||
selector:
|
||||
matchLabels:
|
||||
app: blog
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: blog
|
||||
spec:
|
||||
containers:
|
||||
- name: blog
|
||||
image: git.aridgwayweb.com/armistace/blog:latest
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
imagePullSecrets:
|
||||
- name: regcred
|
||||
@@ -0,0 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: blog
|
||||
namespace: blog
|
||||
spec:
|
||||
containers:
|
||||
- name: blog
|
||||
image: git.aridgwayweb.com/armistace/blog:latest
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
imagePullSecrets:
|
||||
- name: regcred
|
||||
@@ -0,0 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: blog-service
|
||||
namespace: blog
|
||||
spec:
|
||||
type: NodePort
|
||||
selector:
|
||||
app: blog
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 8000
|
||||
nodePort: 30009
|
||||
@@ -1,5 +1,16 @@
|
||||
Title: When to use AI
|
||||
Date: 2025-06-05 20:00
|
||||
Modified: 2025-06-06 08:00
|
||||
Category: AI, Data
|
||||
Tags: ai, python
|
||||
Slug: when-to-use-ai
|
||||
Authors: Andrew Ridgway
|
||||
Summary: Should we be using AI for ALL THE THINGS!?
|
||||
|
||||
|
||||
# Human Introduction
|
||||
Well.. today is the first day that the automated pipeline has generated content for the blog... still a bit of work to do including
|
||||
|
||||
1. establishing a permanent vectordb solution (chromadb? pg_vector?)
|
||||
2. Notification to Matrix that something has happened
|
||||
3. Updating Trilium so that the note is marked as blog_written=true
|
||||
@@ -12,48 +23,53 @@ Anyways, without further ado, I present to you the first, pipeline written, AI c
|
||||
|
||||
---
|
||||
|
||||
# When to Use AI: Navigating the Right Moments for Machine Learning and Beyond
|
||||
# When to Use AI: Navigating the Right Scenarios
|
||||
|
||||
In today's tech landscape, the question "When should we use AI?" is as common as it is critical. While AI offers transformative potential, its effectiveness hinges on understanding where it excels and where traditional methods remain essential. Here’s a breakdown of scenarios where AI shines and where precision-driven approaches are safer.
|
||||
Okay, so I've been getting this question a lot lately: "When should we use AI?" or even more frustratingly, "Why can't AI do this?" It's like asking when to use a hammer versus a screwdriver. Sometimes AI is the perfect tool, other times it's better left in the toolbox. Let me break down some scenarios where AI shines and where it might not be the best bet.
|
||||
|
||||
### AI’s Sweet Spot: Where Humans Fail
|
||||
## The Spreadsheet Dilemma: Where AI Fails
|
||||
|
||||
1. **Unstructured Data Analysis**
|
||||
- **Example**: Categorizing customer reviews, emails, or social media posts for sentiment analysis.
|
||||
- **Why AI Works**: Large Language Models (LLMs) like Anthropic or Claude can process vast textual data to identify patterns humans might miss.
|
||||
2. **Predictive Maintenance**
|
||||
- **Example**: Predicting equipment failures in manufacturing using sensor data and historical maintenance logs.
|
||||
- **Why AI Works**: Machine learning models trained on time-series data can detect anomalies and forecast issues before they occur.
|
||||
3. **Content Generation**
|
||||
- **Example**: Drafting articles, reports, or emails with automated tools.
|
||||
- **Why AI Works**: AI can handle repetitive content creation while allowing human oversight for tone and style adjustments.
|
||||
**Scenario:** Mapping work types to categories in a spreadsheet with thousands of entries, like distinguishing between "Painting," "Repainting," "Deck Painting," or "Stucco Repainting."
|
||||
|
||||
### Where AI Falls Short: Precision Over Flexibility
|
||||
**Why AI Struggles Here:**
|
||||
|
||||
1. **Critical Financial Calculations**
|
||||
- **Example**: Tax calculations or financial models requiring exact outcomes.
|
||||
- **Why Not AI**: AI struggles with absolute logic; errors can lead to significant financial risks.
|
||||
2. **Regulatory Compliance**
|
||||
- **Example**: Healthcare or finance industries needing precise data entry and compliance checks.
|
||||
- **Why Not AI**: AI might misinterpret rules, leading to legal issues.
|
||||
3. **Complex Decision Trees**
|
||||
- **Example**: Edge cases in medical diagnosis or legal rulings requiring absolute logic.
|
||||
- **Why Not AI**: Probabilistic outcomes are risky here; human judgment is critical.
|
||||
* **Fuzzy Matching & Contextual Understanding:** AI excels at interpreting relationships between words (e.g., recognizing "Deck Painting" as a subset of "Painting"). However, traditional methods with regex or string manipulation fail here because they lack the nuanced judgment needed to handle ambiguity.
|
||||
* **Precision Over Ambiguity:** Calculations requiring exact values (e.g., average durations) are better handled by deterministic algorithms rather than AI’s probabilistic approach.
|
||||
|
||||
### Hybrid Approaches for Success
|
||||
**Traditional Methods Win Here:**
|
||||
|
||||
- **Data Collection & Initial Analysis**: Use AI to gather insights from unstructured data.
|
||||
- **Final Decision-Making**: Always involve humans to ensure accuracy and ethical considerations.
|
||||
* **Formula-Based Logic:** Building precise formulas for workload analysis relies on clear, unambiguous rules. AI can’t replace the need for human oversight in such cases.
|
||||
|
||||
**Case Study: My Spreadsheet Experience**
|
||||
## When AI Shines: Contextual and Unstructured Tasks
|
||||
|
||||
I analyzed thousands of work orders, mapping them into two categories via an LLM. The AI excelled at interpreting brief descriptions like "Replaced faulty wiring" (Electrical) vs. "Fixed AC unit" (Plumbing). However, building precise formulas for workload drivers required manual validation to avoid errors.
|
||||
**Scenario:** Automating customer support with chatbots or analyzing social media sentiment.
|
||||
|
||||
### Conclusion: Balancing AI and Traditional Methods
|
||||
**Why AI Works Here:**
|
||||
|
||||
AI is ideal for tasks involving natural language understanding, prediction, or handling large datasets. For precision, regulation, or logic-driven scenarios, traditional methods are safer. The key is combining both approaches smartly:
|
||||
* **Natural Language Processing (NLP):** AI understands context, tone, and intent in unstructured data, making it ideal for tasks like chatbot responses or content analysis.
|
||||
* **Pattern Recognition:** AI identifies trends or anomalies in large datasets that humans might miss, such as predictive maintenance in industrial settings.
|
||||
|
||||
- **Use AI** for unstructured data analysis and automation.
|
||||
- **Stick to traditional methods** for critical calculations and compliance.
|
||||
## Hybrid Approaches: The Future of Efficiency
|
||||
|
||||
By leveraging AI’s strengths while maintaining human oversight, you achieve efficient, accurate solutions tailored to your needs.
|
||||
While traditional methods remain superior for precise calculations, AI can assist in setting up initial parameters or generating insights. For example:
|
||||
|
||||
* **AI Proposes Formulas:** An LLM suggests a workload calculation formula based on historical data.
|
||||
* **Human Checks Validity:** A human ensures the formula’s accuracy before deployment.
|
||||
|
||||
## Key Takeaways
|
||||
|
||||
1. **Use AI** for tasks involving:
|
||||
* Unstructured data (e.g., text, images).
|
||||
* Contextual understanding and interpretation.
|
||||
* Pattern recognition and trend analysis.
|
||||
2. **Stick to Traditional Methods** for:
|
||||
* Precise calculations with deterministic logic.
|
||||
* Tasks requiring error-free accuracy (e.g., financial modeling).
|
||||
|
||||
## Conclusion
|
||||
|
||||
AI is a powerful tool but isn’t a one-size-fits-all solution. Match the right approach to the task at hand—whether it’s interpreting natural language or crunching numbers. The key is knowing when AI complements human expertise rather than replaces it.
|
||||
|
||||
**Final Tip:** Always consider the trade-offs between precision and context. For tasks where nuance matters, AI is your ally; for rigid logic, trust traditional methods.
|
||||
|
||||
🚀
|
||||
Reference in New Issue
Block a user