Packet To Sniff

Learn how AI reads, retrieves and breaks.

Plain-language lessons on tokens, context windows, retrieval-augmented generation, machine learning methods and the security problems they create. With labs you run yourself, browser tools, and a tutor that shows where every answer came from.

What a model receives from that headline

[29387, 1495, 20837, 31523, 11, 171243, 326, 29617, 13]

Tokens
9
Characters
41

Counted with the o200k_base tokenizer. Try your own text

What you can do here

Read16 articles
Explanations that start with a direct answer, then show the mechanism.
Build3 labs
Step-by-step exercises on your own machine, from a tiny RAG system to Wireshark.
Try8 tools
Token counter, chunking playground, subnet calculator and more. All run in your browser.
AskAI tutor
Questions answered from this site's material, with the retrieved sources shown.

Learning paths

All paths

Ordered lessons with a reason for each step. Pick one and follow it through.

  1. Artificial intelligenceBeginner

    How language models read text

    Tokens, context windows and embeddings: what a model actually receives.

    4 articles

  2. Artificial intelligenceIntermediate

    Build and evaluate RAG systems

    Chunking, retrieval, grounded prompts, evaluation and security for answering from your own documents.

    5 articles and 1 lab

  3. Artificial intelligenceBeginner

    Machine learning methods that hold up

    Data splits, overfitting, cross-validation, the right metrics and data leakage.

    5 articles and 1 lab

  4. SecurityBeginner

    Network and web security basics

    Transport protocols, packet captures and the browser protections every site should enable.

    2 articles and 1 lab

A study tutor that shows its sources

Ask a question and the tutor first searches this site's articles and labs. It answers only from the passages it finds, cites them, and says so when the material does not cover your question.

Next to every answer you can see the retrieved passages, their scores and how many tokens they used. The tutor is also a working example of the ideas in the RAG path.

Real retrieval for one question, computed when this page was built

Why do models miss facts in the middle of a long prompt?

  1. [1]Why long context windows still miss things > Short answer16.91
  2. [2]Why long context windows still miss things > The lost-in-the-middle finding15.11
  3. [3]Why long context windows still miss things > FAQ13.53

3 passages, 366 tokens of context. Scores are BM25 keyword relevance.

Recent articles

All articles

Two subjects, one overlap

AI systems are software on networks, and they bring new ways to fail. Where the two meet, you get AI security.

Artificial intelligence

How machine learning is done properly, how language models read text, and how retrieval-augmented generation (RAG) systems are built and evaluated.

Cybersecurity

Networking and security fundamentals, and the new attack surface that AI systems add: prompt injection, poisoned documents and data leakage.

  • Token counter

    Count tokens with a real tokenizer and see how much of a context window your text fills.

  • Chunking playground

    Split your own text with different RAG chunking strategies and compare the pieces.

  • Prompt injection checker

    See which common injection patterns a simple filter spots, and learn why filters are not enough.

  • IPv4 subnet calculator

    Network, broadcast, host range and mask for any IPv4 address in CIDR notation.

  • Security headers analyzer

    Paste a site's response headers and get a checklist of missing or weak protections.