AI Concept Demos

See AI concepts in action β€” no API keys, no signup. All demos run locally in your browser.

Demo 01

πŸ”€ LLM Tokenizer

Type any text and see how a language model breaks it into tokens. Each colour represents a different token. LLMs don't read words β€” they read tokens.

0Tokens
0Characters
0Chars/Token
0Words

πŸ’‘ Key insight: Notice how punctuation, spaces, and special characters often become their own tokens. Words like "tokenize" might be split into "token" + "ize". This is why GPT-4's context window of 128K tokens β‰  128K words.

Demo 02

πŸ’¬ Prompt Engineering Techniques

See how different prompting strategies affect the quality and format of AI responses β€” using the same underlying question.

Prompt
Classify this review as Positive, Negative, or Neutral: "The battery life is excellent but the camera quality disappointed me."
AI Response
Mixed / Neutral The review contains both positive sentiment (excellent battery life) and negative sentiment (disappointing camera quality), making it a Mixed review overall.
Zero-shot: No examples given. The model uses its training knowledge to understand the task. Works well for common tasks but can be inconsistent in format.
Prompt
// 3 examples provided first Review: "This phone is incredible!" Sentiment: Positive Review: "Terrible build quality, broke in a week." Sentiment: Negative Review: "It's okay, nothing special." Sentiment: Neutral Review: "The battery life is excellent but the camera quality disappointed me." Sentiment:
AI Response
Mixed
Few-shot: Providing 3 examples teaches the model the exact output format. The response is now much more concise and consistent β€” a single word matching the pattern.
Prompt
A store sells apples for $0.50 each and oranges for $0.75 each. Maria bought 4 apples and 3 oranges. She paid with a $5 bill. How much change did she receive? Let's think step by step.
AI Response
Step 1: Cost of apples 4 apples Γ— $0.50 = $2.00 Step 2: Cost of oranges 3 oranges Γ— $0.75 = $2.25 Step 3: Total cost $2.00 + $2.25 = $4.25 Step 4: Change received $5.00 βˆ’ $4.25 = $0.75 Maria received 75 cents in change.
Chain-of-Thought (CoT): "Let's think step by step" triggers explicit reasoning. This dramatically improves accuracy on math and logic tasks by forcing the model to show its work before giving a final answer.
Prompt (with System)
SYSTEM: You are a senior software engineer specialising in Python. Explain concepts concisely with code examples. Always mention performance implications. USER: What is a Python list comprehension?
AI Response
A list comprehension builds a new list from an iterable in a single readable line: squares = [x**2 for x in range(10)] Equivalent to a for-loop but ~35% faster due to CPython's optimised LIST_APPEND opcode. Add a filter with an if clause: evens = [x for x in range(20) if x % 2 == 0] ⚑ Performance: Faster than map()+lambda for simple transforms. For large datasets (>100K items), consider a generator expression (x**2 for x in ...) to avoid materialising the full list in memory.
System Prompt: Sets the AI's persona, expertise, and response style before the conversation starts. The same question yields a very different answer β€” technical, code-heavy, with performance notes β€” because the system prompt shaped the behaviour.
Demo 03

πŸ€– Model Capability Comparison

Benchmark scores and key capabilities across leading AI models in 2026.

Note: Scores are normalised approximations from public benchmarks (MMLU, HumanEval, MATH, GPQA). "Context" is the maximum token window. Models improve rapidly β€” always check vendor documentation for current figures.

Demo 04

🎨 How Diffusion Models Work

Diffusion models generate images by learning to reverse a noise process. The forward pass gradually adds Gaussian noise until the image is pure static. The model learns to reverse this β€” going from noise back to the original.

Click Animate to see denoising

Forward Process

Gradually add Gaussian noise over T steps (typically 1000). Creates training pairs of (noisy, clean) images.

Reverse Process

A neural network (U-Net) learns to predict and remove the noise added at each step.

Score Matching

The model learns the "score" β€” the gradient of the data distribution β€” enabling high-quality generation.

DDPM vs DDIM

DDIM is a faster sampler (50 steps instead of 1000) using deterministic sampling without quality loss.

Demo 05

πŸ“š RAG Pipeline β€” Retrieval-Augmented Generation

RAG solves LLM hallucination by retrieving real documents before generating an answer. Try the simulated pipeline below.

πŸ”
Query Embedding
Convert your question into a vector using an embedding model
πŸ—„οΈ
Vector Search
Find the most similar document chunks in the vector database
πŸ“„
Context Retrieval
Top 3 relevant chunks are retrieved and ranked by similarity
🧠
LLM Generation
Prompt = question + retrieved context β†’ LLM generates grounded answer
βœ…
Grounded Response
Answer with citations, no hallucination

πŸ’‘ Why RAG matters: Without RAG, LLMs can only answer from what they learned during training (knowledge cutoff). With RAG, they can answer from live databases, internal docs, or any external knowledge source β€” and cite their sources.