FoundationStep 7 of 8
psychology

Modern AI, LLMs & Generative Systems

September 11, 2026 · 14 min read

Transformers, ChatGPT, prompt engineering, RAG, and how today's AI products actually work under the hood.

The generative AI revolution

Generative AI creates new content — text, code, images, audio — rather than only classifying or predicting numbers. ChatGPT (2022) brought this to mainstream awareness.

Large Language Models (LLMs) predict the next token (word piece) in a sequence, trained on vast text from books, websites, and curated datasets.

Transformers & attention

The transformer architecture (2017) replaced sequential processing with self-attention: each word weighs relevance of all other words in context. This enables parallel training on GPUs and captures long-range meaning.

Models like GPT-4, Claude, Llama, and Gemini are transformer-based LLMs scaled to hundreds of billions of parameters.

Parameters, tokens, and context windows

  • check_circleParameters — learned weights defining model behavior. More parameters generally mean more capacity (and cost).
  • check_circleTokens — pieces of text (~4 chars in English). You're billed per token on APIs.
  • check_circleContext window — how much text the model sees at once (4K to 200K+ tokens). Long context enables analyzing full documents.
  • check_circleTemperature — randomness in outputs. Low = deterministic; high = creative.

Prompt engineering

Prompting is how you instruct LLMs. Clear roles ("You are a Rwanda tax advisor"), examples (few-shot), and output formats (JSON, bullet lists) dramatically improve results.

System prompts set behavior; user prompts carry tasks. Chain-of-thought ("think step by step") helps reasoning tasks.

RAG — Retrieval Augmented Generation

LLMs don't know your private data unless you give it to them. RAG retrieves relevant documents from your knowledge base, injects them into the prompt, and generates grounded answers — reducing hallucinations.

This pattern powers internal company chatbots, support assistants, and legal research tools.

Multimodal & agents

  • check_circleMultimodal models — understand images + text (GPT-4V, Gemini). Upload a menu photo, get translations.
  • check_circleAI agents — LLMs that call tools (search, APIs, code execution) in loops to complete multi-step tasks.
  • check_circleFine-tuning vs prompting — customize behavior with examples without full retraining.
  • check_circleOpen vs closed models — OpenAI/Anthropic APIs vs open weights (Llama, Mistral) you can host yourself.

Risks every builder should know

  • check_circleHallucinations — confident but false statements
  • check_circleBias — reflects training data prejudices
  • check_circleData leakage — sending secrets to third-party APIs
  • check_circleCopyright & licensing — generated content legal gray areas
  • check_circleOver-reliance — automating decisions that need human judgment

Ready to implement AI in your business?

We help businesses in Kigali and worldwide turn AI ideas into secure websites, apps, and custom software. Book a free consultation or message us on WhatsApp.