AI Starter · From zero to your first small app
A hands-on AI starter for ordinary people — no calculus, no coding background required. Five steps: understand what AI is, learn a little Python, script away repetitive work, version your code with Git, then call a large model to build a small tool you use daily. Thirty days, 30–60 minutes a day, hands-on all the way.
The five-step route
Structured on the widely used concept → tools → practice → project sequence. Steps build on each other, but if you stall, switch steps and circle back.
Load the three-tier glossary into your head; know what AI can and cannot do, so buzzwords never mislead you.
Set up the environment and run your first program: variables, functions, classes, libraries — four words that carry you far.
Hand repetitive work to scripts: batch renaming, spreadsheets, data runs. Write once, run forever.
Versions, backups and rollbacks for your code: never fear a bad edit, never lose work in a team.
Call a large-model API, write prompts properly, and ship a small tool you use every day.
Glossary map (three tiers)
Use it as a dictionary, not a memory test: look terms up as you work and rescan weekly. When most terms look familiar, you are in.
Tier 1 · Essentials
Get fluent in the language first — once these click, nothing later has a barrier.A grammar for talking to computers. Python dominates AI. You can start without it, but a little goes a long way.
The mainstream AI language: rich libraries, English-like syntax, huge community. The default first choice.
A box that holds data / a reusable little tool / a template bundling data with actions. The skeleton of programming.
Ready-made toolkits from others — use them as-is. pip install is how you add one.
Software you write code in — VS Code, Jupyter Notebook. One VS Code is enough to start.
The window where you talk to your computer by typing commands — running scripts, installing libraries. Only a handful of commands matter.
An isolated sandbox per project, so tools from different projects never clash.
A service counter between systems: you send a request, it returns a result. Calling a large model means calling its API.
The lightweight text format AI data travels in — looks like a labeled dictionary.
Version control plus cloud backup for code. Git tracks local versions; GitHub / CNB host them remotely for collaboration.
Tier 2 · Core AI concepts
Understand what it is learning — skip memorising definitions; grasp the relationships in plain words.Three nesting dolls: AI is machines acting smart; machine learning finds patterns in data by itself; deep learning is the neural-network branch that excels at images, speech and text.
A neural network is a computation structure loosely modelled on neurons; a model is the trained product: data in, predictions out.
Training is teaching it (costly, slow, data-hungry); inference is using it (fast, cheap). When you call AI day to day, that is inference.
A dataset is the data you feed (train/validation/test splits); features are useful signals; labels are the answer key used to correct the model.
Overfitting: memorised the homework, fails the exam. Underfitting: never learned the homework. Avoid both.
Loss measures how wrong the prediction is; gradient descent walks downhill along the steepest slope to tune parameters. Training is squeezing loss down.
Different rulers for different jobs: recall matters when missing a case is costly; precision matters when false alarms are costly.
The core architecture of modern large models: attention weighs which words relate to which, capturing context.
Pre-training learns general ability from massive data (the vendor's heavy lifting); fine-tuning adapts it to your task with modest data.
Language models with huge parameter counts that understand and generate text. Treat them as a learned assistant that sometimes bluffs.
What you say to the AI. Prompt quality drives output quality — the highest-leverage skill for beginners.
The smallest billing/length unit of text (roughly half an English word or one Chinese character). API pricing and limits count tokens.
The model consults your documents before answering — an open-book exam that tames hallucination and stale knowledge.
Embeddings turn text or images into number lists (vectors) so machines can measure similarity; multimodal models handle text, images, audio and video together.
Tier 3 · Engineering in practice
Words you meet when models become products — recognise them now, look them up when needed.Graphics cards and their parallel computing platform — tens to hundreds of times faster for training. Beginners can rent cloud APIs instead of buying hardware.
Model-building toolkits: PyTorch, TensorFlow, scikit-learn, Hugging Face Transformers. Start by using them off the shelf.
The model warehouse of AI: huge numbers of pre-trained models and datasets ready to download.
Budget-friendly adaptation tricks: tune only a small slice of parameters, saving memory and time.
Slimming a model: lower precision for smaller size and faster inference, usually at minor quality cost.
Moving a trained model onto servers or phones so others can use it — the step from demo to product.
Packaging an app with its environment so it runs anywhere — the cure for 'it works on my machine'.
AI systems that plan steps, call tools and complete multi-stage tasks — from Q&A to 'get it done'.
Databases built to store vectors and search by similarity — the core component of RAG.
Making model development, deployment and monitoring a repeatable pipeline — AI from one-off to sustainable.
Concepts: what AI actually is
Read the map before entering the tunnel — never let buzzwords lead you- · Explain how AI, ML, deep learning and large models nest together
- · Tell training (teaching) apart from inference (using)
- · Know the three hard limits: it bluffs, it ignores your business, it needs human review
1. Four words, one nesting doll
The umbrella term for machines behaving intelligently. It is a goal, not a single technology.
Machine learning is the mainstream path to AI: instead of hand-written rules, machines find patterns in data. Deep learning is a branch using deep neural networks, strong at images, speech and text. Large language models are one kind of deep learning — huge parameter counts that understand natural language. The news mixes these words casually; in reality they nest.
2. Training vs inference: teaching and using
| Dimension | Training | Inference |
|---|---|---|
| Plain words | Teaching it: lots of data, repeated correction | Using it: the finished model handles new data |
| Who does it | Model vendors (the heavy lift) | You and I, every time we call AI |
| Cost | Expensive, slow, compute-hungry | Cheap, fast, pay per use |
Beginners only need inference: every time you call a large-model API, you are running inference. How the model was trained — know the story, skip the math.
3. Three ingredients, three hard limits
- 1.Data: the textbook you feed it. Bad data, bad model — garbage in, garbage out.
- 2.Model: the learned artifact. Pick for the task, not the hype.
- 3.Compute: the horsepower for training and inference. Beginners rent cloud APIs rather than buying GPUs.
- ·It can bluff confidently (hallucination): human-review every key conclusion, number and citation.
- ·It knows nothing about your business by default: feed it rules through prompts and documents.
- ·It is a probability engine, not a database: exact data belongs in databases; use it for understanding, summarising and generating.
4. How to use the glossary
The three-tier glossary below is for looking up, not memorising. Use it as a reference while doing the later lessons; rescan it weekly. When most terms look familiar, you are in.
Self-check 1: are deep learning and large models siblings?
No. Large models are one kind of deep learning; deep learning is a branch of ML; ML is a path to AI — nested, not parallel.
Self-check 2: asking AI questions on your phone — training or inference?
Inference. Training is the vendor's costly teaching process; everyday use is inference.
Self-check 3: AI gave you market figures with sources — send straight to a customer?
No. AI invents sources and figures (hallucination). Verify every item before anything goes out.
- □ Explain the AI ⊃ ML ⊃ deep learning ⊃ large-model nesting to a colleague until they can repeat it back.
- □ List three weekly tasks at work that are repetitive and rule-based — raw material for Lesson 3.
- □ Pick five glossary terms and write one plain-language line for each in your own words.
Python basics: your first running code
Four words — variables, functions, classes, libraries — carry you far- · Install Python and VS Code, run your first program
- · Understand variables, functions, classes and libraries
- · Install third-party toolkits with pip install
1. Why Python
- ·Syntax reads like English — the friendliest mainstream AI language for beginners.
- ·The largest library ecosystem: files, spreadsheets, scraping, AI calls — all off the shelf.
- ·The default language of the AI world: tutorials, samples and colleagues' code are usually Python.
2. Four words are the skeleton
Name a piece of data and reuse it anywhere. price = 100 puts 100 into a box named price.
Bundle an action under a name, then call it in one line: input in, result out.
When boxes and tools always travel together, a class packs them into one unit. Reading them is enough at first; writing them comes naturally later.
No need to reinvent the wheel. pip install requests adds the 'talk to the web' toolkit and you just use it.
3. Run it: three tiny programs
# hello.py
name = input("What is your name? ")
print(f"Hello, {name}! Welcome to the world of AI.")def c_to_f(c):
"""Convert Celsius to Fahrenheit"""
return c * 9 / 5 + 32
for c in [0, 25, 37, 100]:
print(c, "C =", c_to_f(c), "F")# First install the library: pip install requests
import requests
resp = requests.get("https://api.github.com/", timeout=10)
print(resp.status_code) # 200 means OK4. Common sticking points
| Symptom | Cause | Fix |
|---|---|---|
| command not found: python | Python missing or not on PATH | Reinstall with 'Add to PATH' checked, or try python3 |
| ModuleNotFoundError | Library not installed | pip install the library, then rerun |
| IndentationError | Mixed spaces and tabs | Use four spaces consistently |
Self-check 1: what does pip install actually install?
A library/package — someone else's ready-made toolkit that you can call from your code.
Self-check 2: variables vs functions in one line?
A variable stores data; a function does work — boxes hold things, tools take input and return output.
Self-check 3: an error message you don't understand — first move?
Copy the exact error into a search (or paste it to an AI for an explanation) — never guess-edit blindly.
- □ Install Python 3 and VS Code, run hello.py, and have one successful chat with it.
- □ Rewrite the converter the other way (F to C) and verify 32℉ = 0℃.
- □ Install a library you like (requests recommended) and get one official example running.
Automation: hand over the repetitive work
A script is a recipe — write once, run forever- · Judge which tasks deserve a script
- · Write scripts for batch renaming and spreadsheet crunching
- · Build the safety habit: backup, dry-run, stay away from system folders
1. What a script is: a recipe for your computer
A script is an ordered list of commands in a plain text file, runnable again and again — a recipe the computer follows step by step. Four traits: plain text, interpreted (no compilation), automating repetition, and gluing tools together.
2. Script 1: batch renaming (with dry-run)
from pathlib import Path
folder = Path("./photos") # target folder (practice on a copy first)
DRY_RUN = True # True = preview only; set False to apply
for f in sorted(folder.glob("*.txt")):
new = f.with_name(f.name.replace("old_prefix", "new_prefix"))
print(f"{f.name} -> {new.name}")
if not DRY_RUN:
f.rename(new)
print("Done. DRY_RUN=True only previews.")Two good habits in one script: the DRY_RUN switch previews before touching anything, and the scope is locked to one folder — never system directories.
3. Script 2: crunching a spreadsheet
import csv
total, n = 0.0, 0
with open("sales.csv", newline="", encoding="utf-8") as f:
for row in csv.DictReader(f):
total += float(row["amount"])
n += 1
print(f"{n} rows, total {total:.2f}, average {total / n:.2f}")4. Level up: let the script run itself
Run it correctly by hand three-plus times before automating.
crontab / launchd on Mac, Task Scheduler on Windows — run it at dawn, out of everyone's way.
Print what it did, how many succeeded, how many failed — so failures are debuggable.
On error, log it and stop — never fail silently and pretend success.
Self-check 1: which task deserves a script?
Anything repeated three-plus times with clear rules. One-off chores are cheaper done by hand.
Self-check 2: what is the DRY_RUN switch for?
Preview without changing anything. Confirm the plan, then disable it for real execution — the guard against data damage.
Self-check 3: the one thing a scheduled script must not lack?
Logs. Nobody watches it run, so errors must leave a trail — silent breakage is the worst breakage.
- □ Take one repetitive task from Lesson 1 and script it with DRY_RUN — preview, then execute.
- □ Write a CSV column-total script and run it on a real spreadsheet from your work.
- □ Add a run log to your script: date, items processed, success/failure counts.
Git: versioned code, fearless rollbacks
Think save points in a game: save anytime, load anytime- · Save your code with the init / add / commit trio
- · Read history and roll back to the last good version
- · Push to GitHub / CNB for cloud backup; secrets never enter the repo
1. Why Git
Without version control our folders become script_v1.py, script_v2_fixed.py, script_v2_FINAL.py, FINAL_really.py. Git replaces that mess with save points: each meaningful change gets a labelled snapshot you can revisit anytime.
- ·Rollback: one command back to the last good version.
- ·Backup: push to GitHub / CNB so a dead laptop never eats your code.
- ·Collaboration: who changed what is on the record.
2. The trio: init / add / commit
mkdir my-ai-tools && cd my-ai-tools
git init # create the repo (.git folder)
git status # see what changed
git add . # stage the changes
git commit -m "first script: batch rename" # save a snapshot with a message
git log --oneline # read the history| Command | Plain words | When |
|---|---|---|
| git init | Start a repo | Day one of a project |
| git add . | Stage the changes | Before committing |
| git commit -m "message" | Save a snapshot | After each small step |
| git log --oneline | Read the history | When hunting an old version |
| git checkout <rev> -- <file> | Restore one file | To undo just one file |
| git push / git pull | Upload / download the cloud copy | End of day / start of day |
3. Cloud backup + one iron rule
# Create an empty repo on GitHub / CNB first, then:
git remote add origin git@github.com:YOUR_NAME/my-ai-tools.git
git push -u origin main # first push
git push # push at the end of each day
git pull # pull before you start.env
__pycache__/
*.log
.DS_StoreSelf-check 1: how is commit different from saving a file?
Saving overwrites the current file; commit stores a labelled snapshot of the whole project that you can revisit at any time.
Self-check 2: you broke the code — fastest self-rescue?
git log --oneline to find the last good snapshot, then checkout to restore. That only works if you committed along the way.
Self-check 3: why must .env live in .gitignore?
Because it holds secrets. Committing it — especially publicly — hangs your keys on the internet for scrapers to steal.
- □ Gather your scripts into one folder, git init, and make a properly labelled first commit.
- □ Create a remote on GitHub or CNB, push, and confirm the files show up in the web UI.
- □ Write a .gitignore (including .env), drop a fake key into .env, and verify it never gets committed.
Calling a large-model API: AI works for you
Prompts are leverage; keys are vault keys- · Get a model-service key and make your first API call
- · Write the prompt sandwich: role + task + constraints + output format
- · Understand token pricing and key safety, keeping cost under control
1. What calling an API means
An API is a service counter between systems: your script sends a request (a key for identity, a prompt for the job) and the model returns the result. Same as chatting on a web page, except code replaces the page — so you can batch it, schedule it and wire it into your own tools.
2. Your first call
export MODEL_KEY="your-key" # environment only, never in code
curl https://api.deepseek.com/v1/chat/completions \
-H "Authorization: Bearer $MODEL_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "deepseek-chat",
"messages": [{"role": "user", "content": "Explain what an API is in one sentence"}]}'import os
import requests
def ask_ai(prompt: str) -> str:
resp = requests.post(
"https://api.deepseek.com/v1/chat/completions",
headers={"Authorization": f"Bearer {os.environ['MODEL_KEY']}"},
json={"model": "deepseek-chat",
"messages": [{"role": "user", "content": prompt}]},
timeout=60,
)
resp.raise_for_status()
return resp.json()["choices"][0]["message"]["content"]
print(ask_ai("Explain what an API is in one sentence"))3. The prompt sandwich
'You are a foreign-trade assistant at a pharma company' — identity and context.
'Translate this inquiry and list the customer's demands' — state the job.
'Never invent figures; mark uncertain items as to-verify' — draw the fences.
'Return a table: demand / urgency / next step' — ready to use.
Show one input→output sample; quality jumps a level.
4. Cost and safety
| Item | Practice |
|---|---|
| Billing | Token-based (input and output both count). Estimate size before batch runs. |
| Rate limits | Space batch calls 1–2 seconds apart — polite and account-safe. |
| Keys | Environment variables or .env (gitignored). Never in code, chats or screenshots. |
| Data | Never feed customer or contract data to external models before checking company policy. |
Self-check 1: may an API key be hardcoded in a script?
Never. Hardcoded keys travel with the code and get stolen once committed. Use environment variables or .env.
Self-check 2: the four layers of the prompt sandwich?
Role, task, constraints, output format (optionally plus a worked example).
Self-check 3: why space out batch API calls?
Respecting rate limits keeps your account safe, and spacing calls makes long jobs steadier.
- □ Register a model service, get a key, and land your first curl call.
- □ Add the ask_ai function to your toolkit repo, with the key via environment variables.
- □ Ask the same question once with a one-line prompt and once with the sandwich; compare the gap.
Build your own small app
Small, real, for yourself — three principles for project one- · Pick one beginner-friendly project and start
- · Understand RAG (open-book exam) and agents (tool-equipped assistants) in plain words
- · Put the project in Git with a usage note, making it a lasting tool
1. Three beginner-friendly projects
Pro: Turns company documents into a question-answering helper — instant practical value
Con: Document formats take work; early quality depends on tidy sources
Fit: Roles drowning in documents
Pro: Raw notes in, structured summary out — half an hour saved daily
Con: Prompts need iteration; output format must be pinned down
Fit: Roles that report daily
Pro: Auto-sorts inquiries, mail and sheets; rock-solid when rules are clear
Con: You must define the categories first
Fit: Roles processing large text lists
2. RAG in plain words: the open-book exam
Large models have a knowledge cutoff and know nothing internal. RAG is simple: look things up before answering. Split documents into chunks, store them as vectors, retrieve the few most relevant chunks for each question, and paste them into the prompt. An open-book exam cuts hallucination dramatically.
Split documents into a few-hundred-character chunks by paragraph or heading.
Turn each chunk into a vector; keep them in a vector store (or a local file at first).
Vectorise the question and fetch the most similar chunks.
'Answer from the following sources; say so if they don't cover it' — answer grounded.
3. Agents in plain words: a helper with tools
Q&A AI is an adviser; give it tools (search, file reading, API calls) so it plans steps, acts and checks results, and it becomes an agent: from 'you ask, it answers' to 'you delegate, it delivers'. Beginners should stabilise single calls before multi-step orchestration.
4. Finishing: make it survive week one
- 1.It runs: use it yourself for five workdays before calling it done.
- 2.It is in Git: push it, with clear commit messages.
- 3.One page of usage notes — future you and your colleagues will thank you.
- 4.Run logs: what it processed, what failed — traceable.
- 5.Iterate: list three annoyances, fix one at a time.
Self-check 1: which weakness does RAG fix?
Stale knowledge and hallucination: grounding answers in your retrieved documents.
Self-check 2: why must the first project be small?
A small project finishes in a week; the momentum and lessons carry you to project two. Big projects usually die unfinished.
Self-check 3: which agent actions must keep a human in the loop?
Every write or outbound action: sending mail, changing data, publishing, spending money. AI advises; humans send.
- □ Pick one project and write a one-line spec: input, output, purpose.
- □ Simulate RAG by hand once: three documents, manually pick relevant chunks, feed them to the AI.
- □ Push the project to Git and write a README: how to run, where the key lives, which logs to check.
The 30-day plan
30–60 minutes a day. Missed a day? Skip it and continue — consistency beats intensity.
Concepts and setup
| Day 1 | Read the route + glossary tier 1; write plain lines for five terms |
| Day 2 | Read Lesson 1 + glossary tier 2; draw the nesting diagram yourself |
| Day 3 | Scan glossary tier 3; list three repetitive tasks at work |
| Day 4 | Install Python 3 + VS Code; get hello.py running |
| Day 5 | Variables and functions: adapt the temperature converter |
| Day 6 | Install requests; land one web request |
| Day 7 | Weekly review: teach the week's concepts to a colleague |
Python basics
| Day 8 | Lists and dicts: load ten customer names and manipulate them |
| Day 9 | File I/O: script the line count of a txt file |
| Day 10 | CSV I/O: get sum_csv.py running |
| Day 11 | Classes: read someone's class code (writing optional) |
| Day 12 | Error drills: cause three errors and learn to look them up |
| Day 13 | Combined exercise: count files in a folder with a script |
| Day 14 | Weekly review: organise your personal script folder |
Automation + Git
| Day 15 | Batch-rename script with DRY_RUN on a copied folder |
| Day 16 | Script the second task from your repetitive list |
| Day 17 | Add run logs (date / counts / pass-fail) |
| Day 18 | Install Git; git init + first commit |
| Day 19 | Write .gitignore; create a remote on GitHub/CNB and push |
| Day 20 | Rollback drill: break a file on purpose, then restore it |
| Day 21 | Weekly review: all scripts committed with clear messages |
AI hands-on + mini project
| Day 22 | Register a model service, get a key, land the first curl call |
| Day 23 | Wrap the call as ask_ai; commit it to Git |
| Day 24 | Prompt sandwich drill: one question, two prompts, compare |
| Day 25 | Understand token billing; estimate one batch run's cost |
| Day 26 | Manual RAG: three docs, hand-picked chunks, compare answers |
| Day 27 | Start the mini project: one-line spec + input/output |
| Day 28 | First working version (usable beats perfect) |
| Day 29 | Write a one-page README and push |
| Day 30 | Graduation review: write down the next 30 days' goal |
Common pitfalls
Not at entry level. Using tools, writing prompts and calling APIs already create value; math is for deeper study later. Start doing, fill gaps as you meet them.
It knows nothing by default. Your rules, definitions and taboos must be fed through prompts and documents — it knows what you feed it.
It confabulates confidently — numbers, sources, names. Motto: AI drafts, humans verify; the more public the output, the stricter the review.
Convenient until scraped and abused. Keys live in environment variables or a .env (gitignored); if leaked, revoke and reissue at once.
Respect site terms, throttle requests, keep intervals. Slow beats banned: if rate-limited, stop for the day and resume later.
Big projects die unfinished. Project one exists to complete the loop: small, real, for yourself. After three small tools, big projects find you.
Nobody does. Looking things up, pasting errors to an AI, adapting examples — ten times more valuable than memorising. Daily use cements what matters.
FAQ
Can a complete beginner really learn this?
Yes. The only prerequisite is using a computer and typing. The path is use first (concepts, prompts, API calls), understand later (Python, scripts). Hands-on throughout: skip what confuses you, return when practice makes it clear.
Do I need a fast computer or a GPU?
No. A normal computer plus cloud model APIs is plenty; compute is the provider's problem. Hardware matters only when you train your own models — at least a year away.
Python first or AI concepts first?
Concepts first for half a day to a day (Lesson 1) to get the map, then dive in. Endless theory bores; endless syntax evaporates; alternating works best.
Are free resources enough, or should I pay for a class?
Free resources are more than enough for beginners (everything below is free or free to audit). Finish the 30 days first; pay later only if you hit a wall — what you buy is coaching, not knowledge.
What can I actually do after this?
Three things: automate your repetitive work; build a small tool you use daily; use AI products (writing, research, analysis) a level deeper than peers. All three add value in any role.
Will AI replace me?
The realistic version: people who use AI replace people who don't. This series makes you the former — knowing its limits and actually putting it to work.
Video & free resource library
All free or free to audit. External links follow the platforms' current pages; links rot, good content doesn't — learning to pick well with search is a skill itself.
Free AI literacy series: short videos plus tiny exercises, beginner-friendly and globally popular. Pairs with Lesson 1.
https://www.elementsofai.com/ ↗The classic plain-language walkthrough of what AI can do and how projects land. Pairs with Lessons 1 and 6.
https://www.coursera.org/learn/ai-for-everyone ↗A big-tech intro to practical daily use and prompting. Pairs with Lesson 5.
https://www.coursera.org/learn/google-ai-essentials ↗Pick a high-view, recently updated series and follow along. Links rot; good series don't — learning to choose well is a skill itself. Pairs with Lesson 2.
https://search.bilibili.com/all?keyword=Python%20%E9%9B%B6%E5%9F%BA%E7%A1%80 ↗Official and from zero — the first place to check for syntax. Pairs with Lesson 2.
https://docs.python.org/zh-cn/3/tutorial/ ↗A free English book on automating dull work with Python — all office scenarios. Pairs with Lesson 3.
https://automatetheboringstuff.com/ ↗The free canonical Git book — the intro chapters cover beginners; the rest is reference. Pairs with Lesson 4.
https://git-scm.com/book/zh/v2 ↗Hands-on micro-lessons in the browser, no setup required — great self-testing. Pairs with Lessons 5 and 6.
https://www.kaggle.com/learn ↗The workhorse editor — install the Python extension and go. Used from Lesson 2 onward.
https://code.visualstudio.com/ ↗Remote repositories for backup, collaboration and showcasing your work. Pairs with Lesson 4.
https://github.com/ ↗