Compare commits

..

No commits in common. "master" and "first_ai_post" have entirely different histories.

5 changed files with 34 additions and 185 deletions

View File

@ -1,8 +1,5 @@
name: Build and Push Image name: Build and Push Image
on: on: [ push ]
push:
branches:
- master
jobs: jobs:
build: build:
@ -43,19 +40,3 @@ jobs:
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

View File

@ -1,24 +0,0 @@
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

View File

@ -1,13 +0,0 @@
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

View File

@ -1,13 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: blog-service
namespace: blog
spec:
type: NodePort
selector:
app: blog
ports:
- port: 80
targetPort: 8000
nodePort: 30009

View File

@ -1,82 +0,0 @@
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
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.
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.
Anyways, without further ado, I present to you the first, pipeline written, AI content for this blog
---
# When to Use AI: Navigating the Right Scenarios
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.
## The Spreadsheet Dilemma: Where AI Can help, and where it hurts
**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 Helps:**
* **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.
**Where AI Struggles:**
* **Precision Over Ambiguity:** Calculations requiring exact values (e.g., average durations) are better handled by deterministic algorithms rather than AIs probabilistic approach.
**Traditional Methods Are Easier for Deterministic Problems:**
* **Formula-Based Logic:** Building precise formulas for workload analysis relies on clear, unambiguous rules. AI cant replace the need for human oversight in such cases.
## When AI Shines: Contextual and Unstructured Tasks
**Scenario:** Automating customer support with chatbots or analyzing social media sentiment.
**Why AI Works Here:**
* **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.
**Why Traditional Methods Don't:**
* **There is no easily discernable pattern:** If the pattern doesn't exist in a deterministic sense there will be little someone can do without complex regex and 'whack a mole' style programming.
## Hybrid Approaches: The Future of Efficiency
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 formulas 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 isnt a one-size-fits-all solution. Match the right approach to the task at hand—whether its 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.
🚀