1 of 68

Welcome to day 4 of 6.S093!

How to ship almost anything with AI

Sundai Club Team

January, 2025

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

2 of 68

Part 0: Hackers

Sundai Club Team

January, 2025

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

3 of 68

  • Get together every sunday
  • Build AI MVP apps
  • Launch them into users’ hands by end of day

4 of 68

Our Mission

1.⁠ ⁠⁠⁠Grow the best hackers

  • learn to build fast with AI, together
  • ship based apps that gain $$$

2.⁠ Spread hacker mindset

  • teach the skills we learn at MIT and beyond

5 of 68

What is a hacker?

def hacker_vs_engineer():

  • → fast
  • → uses structure
  • → flexible, prototypes
  • → meticulous
  • → builds structure
  • → stable, robust
  • /ˌenjəˈnir/
  • /ˈhakər/

6 of 68

What does hacker look like?

7 of 68

What does a sundai hacker look like?

8 of 68

What does a sundai hacker do?

9 of 68

2. Our Culture

10 of 68

def sunday():

/ˈsənˌdā,ˈsəndē/

2. Our Culture

11 of 68

def sunday():

/ˈsənˌdā,ˈsəndē/

2. Our Culture

  • 1. rest day

12 of 68

def sunday():

/ˈsənˌdā,ˈsəndē/

2. Our Culture

  • 1. rest day
  • 2. devotion day

13 of 68

def examples(‘sunday’):

2. Our Culture

14 of 68

def examples(‘sunday’):

  • → take time for yourself
  • 1. rest

2. Our Culture

15 of 68

def examples(‘sunday’):

  • → take time for yourself
  • → meet people you love
  • 1. rest

2. Our Culture

16 of 68

def examples(‘sunday’):

  • → take time for yourself
  • → meet people you love
  • → frolic, have fun
  • 1. rest

2. Our Culture

17 of 68

def examples(‘sunday’):

  • → take time for yourself
  • → meet people you love
  • → frolic, have fun
  • → take your mind away
  • from ‘structured’ work
  • 1. rest

2. Our Culture

18 of 68

def examples(‘sunday’):

  • → take time for yourself
  • → meet people you love
  • → frolic, have fun
  • → take your mind away
  • from ‘structured’ work
  • → experiment
  • 1. rest

2. Our Culture

19 of 68

def examples(‘sunday’):

  • 1. rest

  • → take time for yourself
  • → meet people you love
  • → frolic, have fun
  • → take your mind away
  • from ‘structured’ work
  • → experiment
  • → do something different, learn

2. Our Culture

20 of 68

def examples(‘sunday’):

  • 1. rest

  • → take time for yourself
  • → meet people you love
  • → frolic, have fun
  • → take your mind away
  • from ‘structured’ work
  • → experiment
  • → do something different, learn
  • → be a kid / with your kids

2. Our Culture

21 of 68

def examples(‘sunday’):

  • → dedicate quality time to those you love
  • [kids, family, community]
  • 1. rest

  • 2. devote
  • → take time for yourself
  • → meet people you love
  • → frolic, have fun
  • → take your mind away
  • from ‘structured’ work
  • → experiment
  • → do something different, learn
  • → be a kid / with your kids

2. Our Culture

22 of 68

def examples(‘sunday’):

  • 1. rest

  • 2. devote
  • → take time for yourself
  • → meet people you love
  • → frolic, have fun
  • → take your mind away
  • from ‘structured’ work
  • → experiment
  • → do something different, learn
  • → be a kid / with your kids

2. Our Culture

  • → dedicate quality time to those you love
  • [kids, family, community]
  • → dedicate time to your core beliefs

23 of 68

def examples(‘sunday’):

  • 1. rest

  • 2. devote
  • → take time for yourself
  • → meet people you love
  • → frolic, have fun
  • → take your mind away
  • from ‘structured’ work
  • → experiment
  • → do something different, learn
  • → be a kid / with your kids

2. Our Culture

  • → dedicate quality time to those you love
  • [kids, family, community]
  • → dedicate time to your core beliefs
  • → be at peace

24 of 68

def examples(‘sunday’):

  • 1. rest

  • 2. devote
  • → take time for yourself
  • → meet people you love
  • frolic, have fun
  • → take your mind away
  • from ‘structured’ work
  • experiment
  • → do something different, learn
  • → be a kid / with your kids

2. Our Culture

  • → dedicate quality time to those you love
  • [kids, family, community]
  • → dedicate time to your core beliefs
  • → be at peace

25 of 68

And now it’s time for…

Intros

Let’sssss goooooooo!

26 of 68

Part 0: Course logistics

Sundai Club Team

January, 2025

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

27 of 68

Course structure

Mon

Mini-projects

Final Project

Tue

Wed

Thu

Fri

Mon

Sun

Front End

Back End

Final Project Pitches

AI systems

Final Project, Guardrails & Ethics

Payment Systems + Guest Lectures

4-163 !

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

28 of 68

Course structure

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

29 of 68

Course structure

Mon

Mini-projects

Final Project

Tue

Wed

Thu

Fri

Mon

Sun

Front End

Back End

Final Project Pitches

AI systems

Final Project, Guardrails & Ethics

Payment Systems + Guest Lectures

4-163 !

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

30 of 68

Course structure

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

31 of 68

Course structure

Mon

Mini-projects

Final Project

Tue

Wed

Thu

Fri

Mon

Sun

Front End

Back End

Final Project Pitches

AI systems

Final Project, Guardrails & Ethics

Payment Systems + Guest Lectures

4-163 !

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

32 of 68

Sundai Hack

Mention that you are from the IAP class and tag the project that you’ve built!

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

33 of 68

Course structure

Mon

Mini-projects

Final Project

Tue

Wed

Thu

Fri

Mon

Sun

Front End

Back End

Final Project Pitches

AI systems

Final Project, Guardrails & Ethics

Payment Systems + Guest Lectures

4-163 !

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

34 of 68

Project requirements

  • Some AI component
    • LLM / Vision / Audio / Graphs …
  • Simple and easy to use front-end
  • Deployed
  • (optional) fine-tuning
  • (optional) backend / DB / storage
  • (optional) user logins

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

35 of 68

Final projects info

  • Groups 2-3 ppl (solo is also ok)
  • Display your project on

https://projects.iap.sundai.club/

  • Present on Monday starting at 10am
    • 5 min per team
    • 2 min for questions
    • Live demo
    • Sign up for a slot here �https://tinyurl.com/2zew5rju

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

36 of 68

Questions ?

Sundai Club Team

January, 2025

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

37 of 68

Part 1: Web analytics

Sundai Club Team

January, 2025

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

38 of 68

Why ?

Typical 1x engineer

Average 10x developer

Before

Today

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

39 of 68

How ?

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

40 of 68

What ?

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

41 of 68

Data collection

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

42 of 68

However ..

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

43 of 68

However ..

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

44 of 68

Anyways

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

45 of 68

Anyways

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

46 of 68

Anyways

!!!

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

47 of 68

Part 2: LLM Guardrails

Sundai Club Team

January, 2025

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

48 of 68

Guardrails: Why?

  • LLMs are unpredictable by nature
  • No deterministic behaviour
  • Requires extensive prompt sanitization

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

49 of 68

Guardrails: What’s the worst that can happen?

  • Users hack your app
  • Token overhaul
  • Users stuck waiting and waiting and waiting…
  • User data gets leaked…
  • Your app randomly breaks

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

50 of 68

Prompt injections

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

51 of 68

Prompt injections

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

52 of 68

Prompt injections

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

53 of 68

Prompt injections

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

54 of 68

Prompt injections: understanding special tokens

https://www.llama.com/docs/model-cards-and-prompt-formats/llama3_1/#-special-tokens-

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

55 of 68

Prompt injections: understanding special tokens

https://www.llama.com/docs/model-cards-and-prompt-formats/llama3_1/#-special-tokens-

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

56 of 68

Prompt injections

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

57 of 68

Prompt injection game

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

58 of 68

Token overhaul

  • You are the one paying for tokens
  • Avoid input token overhaul
  • Avoid output novels…

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

59 of 68

Token overhaul

  • You are the one paying for tokens
  • Avoid input token overhaul
  • Avoid output novels…

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

60 of 68

Token overhaul

  • You are the one paying for tokens
  • Avoid input token overhaul
  • Avoid output novels…

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

61 of 68

Good UX: Timeouts - when app freezes

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

62 of 68

Good UX: Rate limits - when app stops working

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

63 of 68

Guardrails: frameworks

Querying the Web:

Exa.ai, Perplexity

Presentations:

Gamma

Unified APIs:

llangchain, litellm, openrouter

Finetuning LLMs:

unsloth.ai, modal

IDE:

Cursor, Windsurf (Codeium)

Replit

Graphical Dev:

Langflow, stackai,

flowise, diffy.ai

Prompt Dev:

Wordware

Agents:

Autogen, CrewAI,

LangGraph

Self!

GuardRails:

LLMGuard, Lakera

HiveAI, NSFW-detect (Replicate)

Local:

Ollama + Ollama WebUI

RAG databases:

Pinecone, ChromaDB, Weaviate

Pgvector (PostgreSQL)

RAG indexing:

Llangchain, Llamaindex

Small LLMs:

Gemma 2B,

Mistral 8B, Llama 8B

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

64 of 68

Guardrails: Sundai Hack - AI wall

https://www.sundai.club/

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

65 of 68

Guardrails: LLMGuard - simple

https://llm-guard.com/get_started/quickstart/

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

66 of 68

Guardrails: LLMGuard - Multilayered

https://llm-guard.com/get_started/quickstart/

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

67 of 68

Now a break! �See you at 11:35 am

Sundai Club Team

January, 2025

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club

68 of 68

Now lunch break! �See you at 1:45pm for the workshop

Sundai Club Team

January, 2025

Mini test for today's lecture.

Please fill in to get the attendance!��https://forms.gle/DmMEpJJqTnVj87g99

MIT 6.S093 How to ship almost anything with AI

iap.sundai.club

sundai_club