GenAI textbook

GenAI textbook

Types and Mechanisms of Censorship in Generative AI Systems

Content restriction in generative AI manifests as explicit or implicit censorship. Explicit censorship uses predefined rules to block content like hate speech or illegal material, employing keyword blacklists, pattern-matching, or classifiers (Gillespie 2018). DeepSeek’s models, aligned with Chinese regulations, use real-time filters to block politically sensitive content, such as

Detecting, Evaluating, and Reducing Hallucinations

Detecting hallucinations involves distinguishing accurate outputs from those that deviate from factual or contextual grounding. One approach is consistency checking, where LLM outputs are evaluated against external knowledge bases to identify discrepancies. Manakul et al. (2023) propose SelfCheckGPT, a zero-resource method that uses the model’s internal consistency to detect

Conceptual Contrasts Between Parroting and Hallucination in Language Models

Advancements in artificial intelligence (AI), particularly in natural language processing (NLP), highlight critical distinctions between parroting and hallucination in language models. Parroting refers to AI reproducing or mimicking patterns and phrases from training data without demonstrating understanding or creativity. Hallucination involves generating factually incorrect, implausible, or fabricated outputs, often diverging

The Environmental Costs of Artificial Intelligence: A Growing Concern

The rapid integration of Artificial Intelligence (AI) into global economies has driven transformative advancements in sectors such as healthcare and agriculture. However, this technological revolution incurs significant environmental costs, particularly through substantial energy consumption and greenhouse gas (GHG) emissions. The carbon footprint of AI, stemming from energy-intensive processes like hardware

Cost Optimisation Strategies: Token Usage Optimisation, Batch Processing, and Prompt Compression Algorithms

Contemporary researchers face unprecedented financial barriers when engaging with state-of-the-art language models, particularly through API-based services where costs are directly proportional to token consumption and computational resource utilisation. The challenge is compounded by increasing complexity of research tasks requiring extensive prompt engineering, iterative model interactions, and large-scale data processing operations.

Costs of Generative AI Applications: Hardware Costs and Resource Requirements from the Issuer's Perspective

The emergence of large language models (LLMs) and generative AI applications has ushered in a new era of artificial intelligence capabilities, fundamentally altering the landscape of computational requirements and associated costs. Generative AI systems, built upon transformer architectures and trained on vast datasets, have demonstrated remarkable scalability and adaptability across

Retrieval-Augmented Generation (RAG): Architecture, Mechanisms, and Core Advantages

Retrieval-Augmented Generation (RAG) represents a paradigm shift in natural language processing (NLP), integrating large language models (LLMs) with dynamic information retrieval systems to produce responses that are both contextually enriched and factually grounded (Lewis et al. 2020). At its core, the RAG architecture couples a conventional generative model—one that

Comparing leading large language models: architectures, performance and specialised capabilities

Most contemporary LLMs employ a decoder‑only transformer architecture, which processes sequences in parallel via self‑attention. However, scaling dense transformers linearly in size increases computation and cost. Mixture‑of‑experts (MoE) approaches address this by activating only a subset of parameters per token. In the Switch Transformer, MoE routing

Small Language Models (SLMs) and Knowledge Distillation

Small Language Models (SLMs) are compact neural networks designed to perform natural language processing (NLP) tasks with significantly fewer parameters and lower computational requirements than their larger counterparts. SLMs aim to deliver robust performance in resource-constrained environments, such as mobile devices or edge computing systems, where efficiency is paramount. The

Why Size Matters: The Impact of Model Scale on Performance and Capabilities in Large Language Models

A defining characteristic of LLMs is their scale, measured by the number of parameters, which has grown exponentially in recent years. Models such as GPT-3, with 175 billion parameters, and its successors have demonstrated remarkable capabilities, raising questions about the relationship between model size and performance (Brown et al. 2020)

Generative Artificial Intelligence: Just Hype or Reality?

Having explored the technical foundations, architectures, and modalities of generative AI, a critical question remains regarding its real-world impact and long-term viability. The unprecedented technological progress has been met with equally unprecedented public and investor attention, leading to a debate about whether the current boom is a sustainable reality or