Skip to content

Instantly share code, notes, and snippets.

@donbr
donbr / aim-ai-engineering-cheatsheet.md
Created May 8, 2025 17:52
AI Makerspace - AI Engineering Cheatsheet

AI Makerspace - AI Engineering Cheatsheet

This document provides a comprehensive analysis of the AI Engineering course material, which demonstrates a simple workflow for building, evaluating, and improving AI systems with Retrieval Augmented Generation (RAG), agents, and evaluation. The analysis examines the implementation details, architecture, and progressive improvement pattern that characterizes modern AI application development.

Core Component Groups

graph TD
    A[Data Infrastructure] --> B[Retrieval Systems]
    B --> C[Generation & Reasoning]
@donbr
donbr / llm-model-schema-awareness-a.md
Last active May 5, 2025 06:52
llm-model-schema-awareness.md

You are an AI researcher with expertise in large language models and structured data formats. Your task is to produce a comprehensive literature survey and experimental plan investigating the following question:

“How do contemporary transformer‐based LLMs (as of May 2025) differentiate—if at all—between generating freeform natural language and instantiating a structured schema (e.g., JSON, XML, SQL)? What mechanisms (training data patterns, positional encodings, constrained decoding, function‐calling APIs) contribute to their ability to produce schema‑compliant outputs, and where do failure modes most often occur?”

Please include:

  1. Literature Review (10–15 papers):
    • Key benchmarks (SoEval, JSONSchemaBench, etc.) and their findings.
    • Papers on constrained decoding (e.g., CFG‑guided generation, grammatical scaffolding).
  • Studies on function‑calling interfaces (OpenAI function calling, Guidance, XGrammar).

Making Compelling Code Walkthrough Videos

1. Keep Videos Short and Focused

  • Requirement: Videos must be under 5 minutes.

2. Speak Naturally—Don’t Read Aloud

  • Avoid reading notebook content verbatim.
  • Be candid about what didn't work as expected
  • Tip: Summarize key insights in your own words.
@donbr
donbr / ai-innovations-in-2025.md
Last active May 3, 2025 02:27
AI Innovations in 2025: LLM Standards, Agentic Systems, and Advanced Reasoning

AI Innovations in 2025: LLM Standards, Agentic Systems, and Advanced Reasoning

  • The impact of the llms.txt standard on developer workflows.
  • Technical and ethical challenges in adopting agentic systems.
  • The influence of AI safety frameworks like NIST's on future AI development.
  • Promising areas and recent breakthroughs in advanced reasoning models.
  • Real-world integration of LangChain/LangSmith with llms.txt.
  • The broader industry impact of these AI technologies in sectors such as healthcare, finance, and education.

Source Report: https://chatgpt.com/s/dr_68157dbaf944819185d8bf95fee71e1d

@donbr
donbr / unsloth-grpo-simple.md
Created May 2, 2025 20:02
unsloth-grpo-simple.md

Group Reinforcement Policy Optimization (GRPO) with Unsloth

This document provides a comprehensive overview of the AI Makerspace Unsloth GRPO Training notebook, which demonstrates how to implement a simplified version of the DeepSeek-R1 training process.

1. Overview of GRPO Training Process

Group Reinforcement Policy Optimization (GRPO) is an innovative approach to training language models that focuses on rewarding desired behaviors rather than providing explicit examples. The process involves:

  1. Group Sampling: For a single prompt/state, the policy generates multiple outputs (a "group" of possible answers).
  2. Reward Scoring: Each output is evaluated by reward functions to determine its quality.
@donbr
donbr / a-unsloth-grpo-training.md
Last active May 3, 2025 04:17
GRPO Training Using Unsloth

GRPO Fine tuning Using Unsloth

Now I'll create the two requested artifacts: a sequence diagram and a markdown file describing the end-to-end flow.

I've created two detailed artifacts that describe the GRPO training pipeline implemented in the notebook:

  1. Sequence Diagram: The first artifact is a comprehensive sequence diagram showing the interactions between various libraries and components in the GRPO pipeline. It illustrates the flow from installation through model loading, data preparation, reward function setup, training configuration, the training process itself, and finally inference.

  2. End-to-End Flow Documentation: The second artifact is a detailed markdown document explaining each step of the process with code examples. It covers:

  • The core libraries used (Unsloth, TRL, Transformers, etc.)
@donbr
donbr / grpo-unsloth-overview.md
Created May 1, 2025 23:14
Group Reinforcement Policy Optimization (GRPO) with Unsloth

Group Reinforcement Policy Optimization (GRPO) with Unsloth

This document provides a comprehensive overview of the AI Makerspace Unsloth GRPO Training notebook, which demonstrates how to implement a simplified version of the DeepSeek-R1 training process.

1. Overview of GRPO Training Process

Group Reinforcement Policy Optimization (GRPO) is an innovative approach to training language models that focuses on rewarding desired behaviors rather than providing explicit examples. The process involves:

  1. Group Sampling: For a single prompt/state, the policy generates multiple outputs (a "group" of possible answers).
  2. Reward Scoring: Each output is evaluated by reward functions to determine its quality.
@donbr
donbr / langgraph-pitch-deck-generation.md
Created May 1, 2025 22:19
LangGraph Open Deep Research for Pitch Deck Generation

LangGraph Open Deep Research for Pitch Deck Generation

Reflection on Current Files

The open_deep_research application is designed to generate structured research reports by leveraging LangGraph, a graph-based workflow, to plan, research, and compile sections of a report. Here’s a quick breakdown of the files and their relevance to pitch deck creation:

  • graph.py: This defines the workflow using LangGraph’s StateGraph. It orchestrates the process of generating a report plan, gathering human feedback, researching sections via web searches, writing sections, and compiling a final report. Key nodes include:
    • generate_report_plan: Creates a structured plan with sections based on the topic, using web searches for context.
    • human_feedback: Allows for iterative refinement of the plan.
    • build_section_with_web_research: A subgraph that generates queries, searches the web, writes sections, and evaluates quality.
  • write_final_sections and compile_final_report: Handle non-researched s
@donbr
donbr / embedding-fine-tuning-walkthrough-v2.md
Last active April 30, 2025 00:42
Fine-tuning Embeddings for RAG v2: A Hands-on Walkthrough (2025 Edition)

Fine-tuning Embeddings for RAG: A Hands-on Walkthrough (2025 Edition)

Introduction

Welcome to this walkthrough on fine-tuning embedding models to enhance Retrieval-Augmented Generation (RAG) systems. This guide will walk you through the steps to fine-tune an embedding model on domain-specific data, evaluate its performance, and implement it into a RAG pipeline.

The core idea behind fine-tuning embeddings is simple:

Move the embeddings for questions relating to a document closer together with that document

@donbr
donbr / embedding-fine-tuning-walkthrough.md
Last active April 29, 2025 04:56
Fine-tuning Embeddings for RAG: A Hands-on Walkthrough

Fine-tuning Embeddings for RAG: A Hands-on Walkthrough (2025 Edition)

Introduction

Welcome to this walkthrough on fine-tuning embedding models to enhance Retrieval-Augmented Generation (RAG) systems. This guide will walk you through the steps to fine-tune an embedding model on domain-specific data, evaluate its performance, and implement it into a RAG pipeline.

The core idea behind fine-tuning embeddings is simple:

Move the embeddings for questions relating to a document closer together with that document