Compare commits

..
Author SHA1 Message Date
armistace e7f996306f Human edit and update 2025-06-06 12:30:42 +10:00
Blog Creator 22c521293f 'Clarify AI usage scenarios effectively.' 2025-06-06 02:28:07 +00:00
Blog Creator 74f8c8607b 'Add clarity on AI limitations.' 2025-06-06 01:57:04 +00:00
armistace 8c342d994e fix conflicts 2025-06-06 11:32:25 +10:00
Blog Creator bcc41ed4c3 '```
git commit -m "AI: Know when to use it"
```

**Explanation of the commit message:**

*   **Concise:** It's short and to the point, adhering to the common 5-word limit.
*   **Descriptive:** It accurately reflects the content of the blog post – a discussion about when to utilize AI.
*   **Action-oriented:**  Implies a need for thoughtful consideration.
'
2025-06-06 11:30:38 +10:00
Blog Creator fc48d9a4fd '```
feat: Add blog post on AI usage scenarios
```'
2025-06-06 11:30:03 +10:00
Blog Creator 191805461d '```
feat: Add blog post on AI usage scenarios
```'
2025-06-06 11:29:09 +10:00
Blog Creator c2142f7f63 '```
git commit -m "AI: Know when to use it"
```

**Explanation of the commit message:**

*   **Concise:** It's short and to the point, adhering to the common 5-word limit.
*   **Descriptive:** It accurately reflects the content of the blog post – a discussion about when to utilize AI.
*   **Action-oriented:**  Implies a need for thoughtful consideration.
'
2025-06-06 11:28:17 +10:00
Blog Creator 9c92d19943 '```
feat: Add blog post on AI usage scenarios
```'
2025-06-06 11:27:23 +10:00
armistace aead9151c0 Update src/content/when_to_use_ai.md 2025-06-06 11:26:13 +10:00
armistace 14636a4d3b update so pelican can use - must remember 2025-06-06 11:26:12 +10:00
armistace d6d6f1893e stray w 2025-06-06 11:25:43 +10:00
armistace abf6f3feda fix push settings 2025-06-06 11:25:43 +10:00
armistace 7a4d06bbef cleanup of kube stuff 2025-06-06 11:25:43 +10:00
armistace efad73a1a4 wrap the password 2025-06-06 11:25:43 +10:00
armistace 50af2eccb3 kube pipeline manual step and kubectl yaml 2025-06-06 11:25:43 +10:00
armistace e9a7daf5b3 Change workflow push to master only 2025-06-06 11:25:43 +10:00
armistace eac2f648c0 Update src/content/when_to_use_ai.md
Build and Push Image / Build and push image (push) Successful in 7m30s
2025-06-06 10:29:51 +10:00
armistace 79d53d3462 update so pelican can use - must remember
Build and Push Image / Build and push image (push) Successful in 7m23s
2025-06-06 10:17:13 +10:00
armistace 6dd6e92d93 Merge pull request 'stray -' (#11) from kube_deployment into master
Build and Push Image / Build and push image (push) Successful in 7m41s
Reviewed-on: #11
2025-06-06 10:00:37 +10:00
armistace 3db9f63246 stray w 2025-06-06 09:59:47 +10:00
armistace 6552ba503b Merge pull request 'fix push settings' (#10) from kube_deployment into master
Build and Push Image / Build and push image (push) Failing after 6m1s
Reviewed-on: #10
2025-06-06 09:53:14 +10:00
armistace 202c787f19 fix push settings 2025-06-06 09:52:38 +10:00
armistace 61324ff499 Merge pull request 'kube_deployment' (#9) from kube_deployment into master
Build and Push Image / Build and push image (push) Failing after 9m24s
Reviewed-on: #9
2025-06-06 09:32:18 +10:00
armistace 859c40c55c cleanup of kube stuff 2025-06-06 09:31:43 +10:00
armistace 92dd043b35 wrap the password 2025-06-06 09:29:24 +10:00
armistace 761265a467 kube pipeline manual step and kubectl yaml 2025-06-06 09:25:31 +10:00
armistace da1bfd4779 Change workflow push to master only
Build and Push Image / Build and push image (push) Successful in 10m7s
2025-06-04 20:10:41 +10:00
5 changed files with 150 additions and 100 deletions
+53 -34
View File
@@ -1,42 +1,61 @@
name: Build and Push Image name: Build and Push Image
on: [ push ] on:
push:
branches:
- master
jobs: jobs:
build: build:
name: Build and push image name: Build and push image
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: catthehacker/ubuntu:act-latest container: catthehacker/ubuntu:act-latest
if: gitea.ref == 'refs/heads/master' if: gitea.ref == 'refs/heads/master'
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Create Kubeconfig - name: Create Kubeconfig
run: | run: |
mkdir $HOME/.kube mkdir $HOME/.kube
echo "${{ secrets.KUBEC_CONFIG_BUILDX }}" > $HOME/.kube/config echo "${{ secrets.KUBEC_CONFIG_BUILDX }}" > $HOME/.kube/config
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
with: with:
driver: kubernetes driver: kubernetes
driver-opts: | driver-opts: |
namespace=gitea-runner namespace=gitea-runner
qemu.install=true qemu.install=true
- name: Login to Docker Registry - name: Login to Docker Registry
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: git.aridgwayweb.com registry: git.aridgwayweb.com
username: armistace username: armistace
password: ${{ secrets.REG_PASSWORD }} password: ${{ secrets.REG_PASSWORD }}
- name: Build and push - name: Build and push
uses: docker/build-push-action@v5 uses: docker/build-push-action@v5
with: with:
context: . context: .
push: true push: true
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
tags: | tags: |
git.aridgwayweb.com/armistace/blog:latest 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
+24
View File
@@ -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
+13
View File
@@ -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
+13
View File
@@ -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
+47 -66
View File
@@ -1,94 +1,75 @@
# When to use AI 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!?
## The Great AI Debate: When to Trust the Machine vs. When to Stick to Your Brain
As a journalist, software developer, and DevOps expert, I’ve spent years navigating the murky waters of AI’s “what if” scenarios. The question that keeps coming up professionally is: *“When to use AI?”* And the answer, like many things in life, is *“It depends.”* But when I’m not using my brain, I’m using my shudders. Let’s dive into the scenarios where AI isn’s the best choice—and where it *is* the best choice. # 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
## When AI is Not the Best Choice 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
### 1. **The Fuzzy Logic Dilemma** BUT it can take a note from trilium, generate drafts with mulitple agents, and then use RAG to have an editor go over those drafts.
AI is great at handling *fuzzy logic*—like when you’re trying to figure out if a work order is “urgent” or “not urgent” based on vague descriptions. But when you’re trying to map a work type to a specific work request, AI is *not* the best choice. Imagine this: You have a dataset of work orders, each with a type (e.g., “installation,” “repair,” “maintenance”) and a duration in days. You’re trying to group these into two categories: *“high-priority”* and *“low-priority.”* The problem? The work types and work requests are *tangentially related*. I'm particularly proud of the randomness I've applied to temperature, top_p and top_k for the different draft agents. This means that each pass is giving me quite different "creativity" (as much as that can be applied to an algorithm that is essentially munging letters together that have a high probability of being together) It has created some really interesting variation for the editor to work with and getting some really interesting results.
> *“I was given a list of work types that could be grouped into 1 of 2 categories exclusively.”* Anyways, without further ado, I present to you the first, pipeline written, AI content for this blog
> *“The problem was… the ‘work types’ and work requests were at best tangentially related.”*
So I had to manually read each work type and map it to a work request. It was a *shudder-inducing* task. AI, on the other hand, would have *automated* that. But it would also have *misunderstood* the relationship between the two. ---
### 2. **The Math and Logic Job** # When to Use AI: Navigating the Right Scenarios
AI is great at math and logic. If you need to calculate the total time spent on a process, or create a formula that accounts for variables like labor hours, weather, or equipment downtime, AI can handle it. For example, I once built a spreadsheet that calculated potential savings in a process. The formulas were precise, and the logic was sound. 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.
> *“Traditional programming methods work on maths and logic that is sound and offers no chance for interpretation.”* ## The Spreadsheet Dilemma: Where AI Fails
So even if AI could suggest the numbers, I’d never trust it to actually run the calculation. It’s like trusting a robot to drive a car when it’s not built for that. **Scenario:** Mapping work types to categories in a spreadsheet with thousands of entries, like distinguishing between "Painting," "Repainting," "Deck Painting," or "Stucco Repainting."
## When AI is the Best Choice **Why AI Struggles Here:**
### 1. **Finding Connections** * **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.
AI excels at identifying patterns and relationships within large datasets. This is invaluable for tasks like customer segmentation, fraud detection, and predictive maintenance. **Traditional Methods Win Here:**
### 2. **Automating Repetitive Tasks** * **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.
Many tasks are simply too repetitive and time-consuming for humans to perform efficiently. AI-powered automation can free up valuable time and resources. ## When AI Shines: Contextual and Unstructured Tasks
### 3. **Suggesting Numbers or Constants** **Scenario:** Automating customer support with chatbots or analyzing social media sentiment.
While AI shouldn't be trusted to run calculations, it can be helpful in suggesting potential numbers or constants to use in those calculations. **Why AI Works Here:**
## The Human vs. AI Divide * **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.
AI is good at *finding connections* and *handling ambiguity*, but it’s *not good at precision*. When you need to ensure that a calculation is accurate, or that a mapping is flawless, AI is not the best choice. And that’s where humans shine. We’re good at *seeing* the connection between two things, even if it’s not obvious. We’re good at *precision* and *accuracy*. ## Hybrid Approaches: The Future of Efficiency
> *“I was given a list of work types that could be grouped into 1 of 2 categories exclusively.”* While traditional methods remain superior for precise calculations, AI can assist in setting up initial parameters or generating insights. For example:
> *“The problem was… the ‘work types’ and work requests were at best tangentially related.”*
So I had to manually read each work type and map it to a work request. It was a *shudder-inducing* task. * **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.
## The Final Thought ## Key Takeaways
So, in summary: 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).
* **AI is not the best choice** when you need precision, accuracy, or a human touch. ## Conclusion
* **AI is the best choice** when you need to handle ambiguity, find connections, or automate repetitive tasks.
And that’s why I’m a journalist, a developer, and a DevOps expert. I know when to trust the machine and when to rely on my brain. 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.
> *“When in doubt, just do 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.
## Editable Structure for Easy Customization 🚀
### 📝 Title When to use AI
### 🧠 Introduction
* Briefly explain the question and the tone.
### 🧩 Sections
1. **When AI is Not the Best Choice**
* Subpoints:
* Fuzzy logic dilemmas
* Manual mapping tasks
* Precision vs. AI’s “fuzzy” logic
2. **When AI is the Best Choice**
* Subpoints:
* Math and logic tasks
* Automation of repetitive tasks
* Suggesting numbers or constants
3. **The Human vs. AI Divide**
* Highlight the importance of human judgment in critical tasks
4. **Final Thought**
* Encourage readers to think critically about when to use AI
### 📝 Conclusion
* Wrap up the key points and reinforce the message.
## Tips for Editing
* Replace the example about the spreadsheet with your own scenario.
* Add a personal anecdote or a relatable example.
* Use humor to keep the tone light and engaging.
* Add a call to action: “Next time you’re stuck, ask yourself: ‘Is this a task for AI or a task for me?’”