Practical Artificial Intelligence Development With Racket

Practical Artificial Intelligence Development With Racket

Mark Watson
Buy on Leanpub

Table of Contents

Practical Artificial Intelligence Development With Racket

  • Preface
    • Requests from the Author
    • License for Book Manuscript: Creative Commons
    • Book Example Programs
    • Racket, Scheme, and Common Lisp
    • Personal Artificial Intelligence Journey: or, Life as a Lisp Developer
    • Acknowledgements
  • A Quick Racket Tutorial
    • Installing Packages
    • Installing Local Packages In Place
    • Mapping Over Lists
    • Hash Tables
    • Racket Structure Types
    • Simple HTTP GET and POST Operations
    • Using Racket ~/.racketrc Initialization File
    • Tutorial Wrap Up
  • Datastores
    • Accessing Public RDF Knowledge Graphs - a DBPedia Example
    • SQlite
    • Optional Practice Problems
  • Implementing a Simple RDF Datastore With Partial SPARQL Support in Racket
    • 1. Core RDF Data Structures and Basic Operations
    • 2. Query Parsing and Execution
    • 3. Helper Functions and Utilities
    • Conclusion
    • Optional Practice Problems
  • Web Scraping
    • Getting Started Web Scraping
    • Implementation of a Racket Web Scraping Library
    • Optional Practice Problems
  • Interfacing with External Programs: A Lightpanda Browser Client
    • The Problem: JavaScript-Rendered Web Content
    • Project Structure
    • Configuration
    • Running External Programs with subprocess
    • HTML Parsing: Extracting Links
    • The Main API Function
    • Helper Functions
    • Usage Examples
    • Key Racket Takeaways
    • Optional Practice Problems
  • Building a MicroGPT in Racket
    • Introduction
    • Demystifying the Core Components
    • Conclusion
    • Complete Source Code Listing for microgpt.rkt
    • Wrap Up
    • Optional Practice Problems
  • Using the Google Gemini, OpenAI, Anthropic, Mistral, and Local Hugging Face Large Language Model APIs in Racket
    • The Cambrian Explosion in Language Technology: A Historical Trajectory
    • Commercial and Open Weight LLMs
    • Introduction to the Applications of LLMs
    • Using the OpenAI APIs in Racket
    • Using Google Gemini APIs in Racket
    • Using the Anthropic APIs in Racket
    • Using a Local Hugging Face Llama2-13b-orca Model with Llama.cpp Server
    • Using a Local Mistral-7B Model with Ollama.ai
    • Examples Using William J. Bowman’s Racket Language LLM
    • Optional Practice Problems
  • Ollama Tools/Function Calling in Racket
    • How Tool Calling Works
    • A Racket Tools Library
    • Complete Example Using the Tools Library and Example Tools
    • Summary
    • Optional Practice Problems
  • A Racket Coding Agent
    • The Agentic Loop
    • Module Architecture
    • The Shared Interrupt Flag
    • The Provider-Agnostic Agentic Loop
    • The Fireworks AI Client
    • The Ollama Client
    • The Tool Registry
    • The Approval and Diff System
    • Web Search Integration
    • The Main REPL
    • Running the Agent
    • Interpreting the Output
    • Wrap Up
    • Optional Practice Problems
  • Retrieval Augmented Generation of Text Using Embeddings
    • Example Implementation
    • Retrieval Augmented Generation Wrap Up
    • Optional Practice Problems
  • Deep Learning in Racket with Malt: From XOR to a Two-Tower Recommendation System
    • Why neural networks and why XOR first?
    • The Malt mental model
    • Every malt function used in this chapter, defined
    • Example 1: XOR, the smallest non-linear problem
    • Example 2: Two hidden layers learn a curved boundary
    • Example 3: A jointly learned two-tower recommender
    • Interlude: the bug that made the model learn nothing
    • Malt survival guide (hard-won)
    • Files in this directory
  • Category-Theory Deep Learning in Racket
    • Why category theory for machine learning
    • The mathematics of the five perspectives
    • The data
    • Implementation
    • Running the code
    • Interpreting the results
    • Summary
  • Natural Language Processing
    • NLP Wrap Up
    • Optional Practice Problems
  • Knowledge Graph Navigator
    • Entity Types Handled by KGN
    • KGN Implementation
    • Knowledge Graph Navigator Wrap Up
    • Optional Practice Problems
  • Implementing OPS5 in Racket: A Forward-Chaining Production System
    • Production Systems and Forward Chaining
    • The Rete Algorithm
    • Conflict Resolution
    • The OPS5 Language
    • The Example Programs
    • The Racket Conversion: One File of Pure Code
    • The Top-Level Commands as Macros
    • Compiling a Production into the Network
    • The Network Interpreter
    • Working Memory
    • The Recognize-Act Loop
    • Running the RHS
    • Running the Code
    • Interpreting the Results
    • Wrap Up
    • Optional Practice Problems
  • Logic Programming with Racklog: Two Classic Problems Revisited
    • Forward Chaining vs. Backward Chaining
    • Problem One: Analyzing a Card Hand
    • Problem Two: The Monkey and the Bananas
    • Wrapping Up
    • Exercises
  • Conclusions
Practical Artificial Intelligence Development With Racket/overview

Practical Artificial Intelligence Development With Racket

course_overview

count_chapters
begin_reading
download
p_implied_book_part_name

Practical Artificial Intelligence Development With Racket18 chapters

Begin ›
  1. Preface

  2. A Quick Racket Tutorial

  3. Datastores

  4. Implementing a Simple RDF Datastore With Partial SPARQL Support in Racket

  5. Web Scraping

  6. Interfacing with External Programs: A Lightpanda Browser Client

  7. Building a MicroGPT in Racket

  8. Using the Google Gemini, OpenAI, Anthropic, Mistral, and Local Hugging Face Large Language Model APIs in Racket

  9. Ollama Tools/Function Calling in Racket

  10. A Racket Coding Agent

  11. Retrieval Augmented Generation of Text Using Embeddings

  12. Deep Learning in Racket with Malt: From XOR to a Two-Tower Recommendation System

  13. Category-Theory Deep Learning in Racket

  14. Natural Language Processing

  15. Knowledge Graph Navigator

  16. Implementing OPS5 in Racket: A Forward-Chaining Production System

  17. Logic Programming with Racklog: Two Classic Problems Revisited

  18. Conclusions