Shaf Lab

  1. 1 Transformers

    How language models turn a sequence into the next token, and the attention machinery behind that step.

  2. 2 Tokenization and embeddings

    How text becomes IDs and vectors, and why that choice shows up later in search, cost, and quality.

  3. 3 Prompt engineering

    How to steer a model with instructions, examples, step-by-step reasoning, and hard output constraints.

  4. 4 Retrieval-augmented generation

    Look up relevant passages, place them in the prompt, and answer from that evidence instead of memory.

    Coming soon
  5. 5 Vector databases and search

    Store embeddings, retrieve near neighbors, and combine keyword search with semantic search.

    Coming soon
  6. 6 Tool calling and MCP

    Let a model propose structured tool calls, and use a shared protocol so apps and tools can connect.

    Coming soon
  7. 7 Agents

    A model that chooses its own sequence of actions in a loop, with limits and human approval where it matters.

    Coming soon
  8. 8 Memory and multi-agent systems

    Keep long-running work inside the context window, and split work across specialized agents.

    Coming soon
  9. 9 Fine-tuning

    Adapt an existing model to a skill, format, or domain without trying to teach it a shelf of facts.

    Coming soon
  10. 10 Alignment and distillation

    Shape model behavior from preferences, and train a smaller model to imitate a larger one.

    Coming soon
  11. 11 Compression and serving

    Cut memory with quantization, reuse work with a KV cache, and keep a GPU busy under load.

    Coming soon
  12. 12 Evaluation and production

    Grade outputs, measure error, defend against prompt injection, and trace real requests.

    Coming soon