Skip to content

Instantly share code, notes, and snippets.

@wesen
Created March 8, 2024 22:04
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wesen/a5ddc0c022286bd706e0d085651c7a85 to your computer and use it in GitHub Desktop.
Save wesen/a5ddc0c022286bd706e0d085651c7a85 to your computer and use it in GitHub Desktop.
AI programming slides

Programming with AI


Fundamentals

  • Autoregressive
  • Context size

Autoregression

  • Make the model generate the step that will guide it in the future
  • Example:
    • Don't "code -> unit tests"
    • Code -> explanation -> edge cases -> unit test names -> unit tests implementations

Autoregression

  • Translating from one language to the other doesn't need much reasoning
  • Widen your understand of what "translation" means
    • chrome request -> openapi
    • openapi -> shell script
    • shell script -> man page
    • man page + openapi + shell script -> go tool
    • openapi -> HTML dashboard
    • openapi -> websocket/grpc protocol
    • grpc protocol + dashboard -> live dashboard
    • openapi + go tool -> report generator
    • report generator -> windows desktop app
    • windows desktop app -> reference video (transcript, functionality)
  • Example:

DSLs

If translation is the best, why not invent our own languages?

  • "Create a YAML based DSL to handle X"
    • Iterate like a professional developer
  • "Write a README/reference/HOWTO/examples for DSL X"
  • "Implement an interpreter for X"
  • "Write the DSL representation for X"
  • Leverage declarative programming

AI Engineer Skills

Main skill:

  • divergent and creative thinking
    • what can I ask the machine to do?
    • what can I do that supports programmers. Often it's not writing code.
  • breadth of knowledge
    • which tools / languages / patterns / approaches can I use with the least friction
      • serverless
      • DSLs
      • declarative
    • understand how to build a useful context to solve the problem
    • know what a good and a bad DSL is
  • keep track of your ideas
    • app spaghetti

Context

  • Even with big context windows, small precise context wins.
  • Concise clear text with a lot of code
    • Best for the machine, best for humans
  • Generate HOWTOs when you are doing something by hand
  • Use dynamic commands to build context
    • prompto
  • Context for a task is usually incrementally built


Tricks

  • Use YAML
  • Syntax usually counts less than words
  • Use table driven unit tests
  • Simulate group discussions to undo the RLHF

Paradigm changes

  • What does it mean for a team workflow?
  • Documentation, unit tests are free and easily updated
  • Prototypes are free
  • Brainstorm sessions now come with prototype code or full working code
  • Consistent structure and formatting

Vision

  • Ad-hoc custom opensource tools instead of big player tools
  • Custom agents for tasks, akin to code guidelines
  • Libraries will provide their own agents / context prompts
@TouristShaun
Copy link

i'm annoyed at myself that i had to miss this, looks like it went off swimmingly. hope Europe is everything you were expecting and then some!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment