AI Book Tutorial menu

AI Book Tutorial

The AI Book is a free online book about the AI tools everyone is talking about in 2026: what they really are, how they work inside, how to build with them, and how to use them safely at work.

It is written in simple English for students, freelancers, developers and small business owners. There is no hype here. We explain what models like ChatGPT, Gemini and Claude are good at, where they fail, and what you can actually build with them.

Why Read This Book?

AI is now part of almost every job. A shopkeeper in Karachi uses it to reply to WhatsApp customers, a student uses it to understand a hard topic, and a developer uses it to write and test code. People who understand how it works use it better, spend less money on it and make fewer mistakes.

What the Book Covers

  • How LLMs work: tokens, context windows, embeddings, transformers and attention, and training vs fine-tuning vs prompting
  • Building with AI: calling AI APIs from Python and Node.js, JSON output, RAG, vector databases, function calling, MCP and testing your AI app
  • AI at work: AI coding assistants, AI for freelancers and small businesses in Pakistan, and careers
  • Safety and the future: privacy, hallucinations, prompt injection, responsible use and where AI is heading
  • A final quiz on the whole book

A Small Taste

Computers compare meaning by turning text into lists of numbers called vectors. Here is the maths behind "these two things are similar", which you will meet again in Part 1:

Example

python
import numpy as np

tea = np.array([0.9, 0.2])
coffee = np.array([0.8, 0.3])
similarity = np.dot(tea, coffee) / (np.linalg.norm(tea) * np.linalg.norm(coffee))
print(round(similarity, 3))
Output
0.99

A value close to 1 means "very similar". This simple idea powers search, recommendations and RAG.

Exercise

Which of these is the main topic of Part 2 of this book?

What to Read Before and After

New to AI? Start with the AI Tutorial and the Gen AI Tutorial. To write better instructions, read the Prompt Engineering Tutorial. After this book, build a full chat app in the Chatbots Tutorial, go deeper with the AI Agents Tutorial, or learn the foundations in the Machine Learning Tutorial.

Want to learn with a teacher? The Workownix AI course covers AI tools, prompting and practical AI projects step by step, online or at our institute in Orangi Town, Karachi.

Test yourself with AI Book MCQs

31 questions with answers from the whole tutorial.

Start the MCQs »

Learn AI Book with a teacher

Join the AI & Prompt Engineering course at Workownix, online or in Orangi Town, Karachi, and get a certificate.

See the course Ask on WhatsApp