What's changed: Initial version
1.5Programming & AI fundamentals
Covers programming-language paradigms and data formats (XML/JSON), machine learning (supervised / unsupervised / reinforcement learning) and deep learning, CNNs used in image recognition, generative AI and LLMs (large language models), and natural language processing for handling human language computationally.
To close out Chapter 1, we cover the basics of data formats used to exchange data between systems in practice, and the fundamentals of the AI techniques that have rapidly grown in presence across the IT industry. AP's Ver.7.2 syllabus explicitly treats machine learning, deep learning, generative AI, and LLMs as distinct topics, testing whether you can correctly understand how they work and avoid overhype or misconceptions.
1.5.1Programming languages and data formats
- Programming-language paradigms include procedural (executing steps in sequence), object-oriented (bundling data and behavior into objects), and functional (expressing computation as the application of mathematical functions). The choice depends on the use case and design philosophy.
- XML is a markup language expressing hierarchical structure with tags, supporting rigorous schema definition (XML Schema) and used for data exchange between enterprises. JSON is a lightweight key-value data format that is the dominant choice for Web API data exchange, being more concise and human-readable than XML.
1.5.2Machine learning and deep learning
- Machine learning automatically learns patterns and rules from data. It is broadly divided into supervised learning (learning from labeled data for classification/regression), unsupervised learning (discovering structure in unlabeled data, e.g., clustering), and reinforcement learning (optimizing a policy via rewards from trial and error).
- Deep learning is a branch of machine learning that uses multi-layered neural networks. Stacking layers lets it automatically extract complex features from raw data without hand-engineered feature design—a key difference from traditional machine learning.
- A CNN (Convolutional Neural Network) is a deep-learning model that extracts local features (edges, textures, etc.) using filters in convolutional layers, and compresses information hierarchically via pooling layers. It excels at image recognition and classification.
Most-tested pairings: "supervised = labeled data (classification/regression)", "unsupervised = unlabeled data (clustering)", "reinforcement learning = optimizing a policy via rewards", "deep learning = multi-layer neural network", and "CNN = strong at image recognition (convolution + pooling)". Generative AI/LLMs are tested on the mechanism and limitations covered in the next paragraph.
1.5.3Generative AI and LLMs
- Generative AI is an umbrella term for AI techniques that generate new content—text, images, audio, and more—based on patterns learned from training data. An LLM (large language model) is a language model trained on massive text corpora, built on the Transformer architecture, capable of text generation, summarization, translation, and dialogue.
- Because an LLM generates text that is statistically "plausible," it carries the risk of hallucination—confidently generating content that is factually incorrect. In business use, reinforcing outputs with fact-checking and reference to grounding data (e.g., RAG) is important.
1.5.4Natural language processing
- Natural language processing (NLP) is the field of analyzing and generating human language computationally. Foundational techniques include morphological analysis, which splits text into minimal units such as words, and distributed representation (embeddings), which represents words or sentences as numeric vectors; an LLM is one advanced outgrowth of NLP.
Consider a manufacturer introducing, at the same time, a system that automatically detects defective products from factory images and a chatbot that automates internal inquiry handling. CNN suits defect detection—convolutional layers capture local features (scratches, chips, color unevenness) in product images, pooling layers compress the information, and the model learns "what a defect looks like" through supervised learning using labeled data of normal vs. defective products. For the inquiry chatbot, an LLM-based system grounded in internal documents is well suited, but deploying it as-is risks confidently answering with content not actually in company policy—a hallucination. The mitigation is to incorporate RAG (retrieval-augmented generation), which searches for internal documents relevant to the question and has the LLM generate its answer grounded in that retrieved material, raising the factual reliability of the output—a design decision that must be made deliberately. Furthermore, in the data exchange between these AI models, using a lightweight JSON format for API responses when notifying other systems of defect-detection results, versus XML when integrating with a core system that requires strict schema validation, is also a practical judgment call: choosing the data format that fits the use case.
| Learning type | Data characteristic | Representative task |
|---|---|---|
| Supervised learning | Labeled data | Classification/regression (e.g., defect detection) |
| Unsupervised learning | Unlabeled data | Clustering, anomaly detection |
| Reinforcement learning | Trial and error with reward signals | Policy optimization (game AI, control, etc.) |
Trap: "Generative AI (an LLM) always returns factually accurate answers" is wrong—an LLM generates statistically plausible text and always carries the risk of hallucination (confidently generating content that is factually wrong), so important business decisions require grounding in reference data and human verification. Also wrong: "unsupervised learning requires labeled data"—unsupervised learning discovers patterns from unlabeled data (labels are required for supervised learning, not unsupervised).
1.5.5Section summary
- JSON is lightweight and dominant for Web APIs; XML suits rigorous schema validation. Choose based on the use case
- Distinguish supervised/unsupervised/reinforcement learning by label presence; deep learning uses multi-layer NNs; CNNs excel at image recognition
- LLMs/generative AI generate statistically plausible text and carry hallucination risk, mitigated by grounding techniques such as RAG
Sign in to track progress — Log in.
Quick check
(just a quick review)Q1. You want to automatically discover groups of customers with similar characteristics from a large set of customer data that has no correct-answer labels. Which learning type is most appropriate?
Q2. An LLM-based internal chatbot answering from company documents sometimes confidently states content that is not actually in company policy. What is the most appropriate countermeasure for this phenomenon?
Q3. Which data format has become the mainstream choice for exchanging data between systems via Web APIs in recent years, owing to its lightweight and concise notation?

