Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Building Production-Ready Apps with AI

Building Production-Ready Apps with AI

My presentation from the Cloud Weekend (https://cloudweekend.me), Podgorica, May 11th, 2024.

Slobodan Stojanović

May 11, 2024
Tweet

More Decks by Slobodan Stojanović

Other Decks in Programming

Transcript

  1. Have you ever interacted with a multi-turn conversational model trained

    through extensive transformer architectures for dynamic user engagement?
  2. @slobodan_ Prompts •Prompts are just instructions. •You tell an LLM

    what you want, and the LLM tries to reply based on its training. •More detailed and better explanation = better answer. •LLM will always answer, but answers are not always based on truth.
  3. @slobodan_ Slobodan Stojanović CTO and co-founder of Vacation Tracker co-author

    of Serverless Apps with Node.js book AWS Serverless Hero JS Belgrade meetup organizer
  4. @slobodan_ OpenAI - GPT-4 Turbo •OpenAI has multiple models, but

    GPT-4 Turbo is the best one. •Price: •Input: US$ 10.00 / 1M tokens •Output: US$ 30.00 / 1M tokens •Quality: ChatGPT level*
  5. @slobodan_ Anthropic Claude •Claude 3 offers 3 models: Opus, Sonnet

    and Haiku •Claude 3 Opus is at the "GPT-4 level." •Price: •Input: US$ 15 / 1M tokens (Opus), US$ 0.25 / 1M (Haiku) •Output: US$ 75 / 1M tokens (Opus), US$ 1.25 / 1M (Haiku)
  6. @slobodan_ Google Gemini •People had high hopes for Google LLM.

    •Good quality and an impressive 1M context. •Price*: •Input: US$ 7 / 1M tokens •Output: US$ 21 / 1M tokens
  7. @slobodan_ Mistral & Mixtral •First "WOW!" open-source model. •Both open-source

    (Mixtral 8x7B and 8x22B) and commercial models (Mistral Large). •Price*: •Input: US$ 0.45 / 1M tokens (Mixtral 8x7B), US$ 8 / 1M (Mistral Large). •Output: US$ 0.7 / 1M tokens (Mixtral 8x7B), US$ 24 / M (Mistral Large)
  8. @slobodan_ Meta Llama3 •Llama 3 is Faaaast! And open-source. •Not

    multi-modal yet, but very good. •Price*: •Input: US$ 0.4 / 1M tokens (8B), US$ 2.65 / 1M (70B) •Output: US$ 0.6 / 1M tokens (8B), US$ 3.5 / 1M (70B)
  9. @slobodan_ Azure OpenAI •OpenAI models integrated in Azure. •Same pricing

    as OpenAI API, but paid with your Azure subscription. •You can control the region where the model is deployed. •Microso"'s ToC and SLA: •"Azure OpenAI doesn't use customer data to retrain models."
  10. @slobodan_ Amazon Bedrock •Amazon's Generative AI platform •Amazon hosts foundation

    models and offers APIs for them. Select your region. •Amazon's ToC and SLA: •"Your training data isn't used to train the base Titan models or distributed to third parties."
  11. @slobodan_ Amazon Bedrock Models •Claude (all models) •Mistral AI (most

    models) •LLama (all models) •Stable Diffusion •Cohere (I just tried it initially and forgot about it) •Jurassic (I have no idea what's this) •Amazon's Titan (mostly useless at the moment)
  12. @slobodan_ AI Agent frameworks and tools •Langchain •AutoGPT •AutoGen, BabyAGI,

    and many others •OpenAI Assistants •Bedrock Agents •Or build your own simple agent!
  13. @slobodan_ Other platforms •Cloudflare AI: mostly open-source models. •Groq: open-source

    models, fast! •LPU™ (Language Processing Unit) •Google Vertex AI Studio: Gemini models •Most of the models also offer platforms. •Many others…
  14. @slobodan_ How to run an LLM locally •LM Studio (many

    open-source LLMs, easy download, offers playgrounds) •Ollama •Hugging Face
  15. @slobodan_ What are LLMs good at? •Text summarization, labeling, and

    structuring •Text generation •Personalization and translations •And many more things…
  16. @slobodan_ All LLM platforms “We don't train our models with

    your data!” Every single one of them!
  17. @slobodan_ OWASP Top 10 for LLM •Prompt Injection •Insecure Output

    Handling •Training Data Poisoning •Model Denial of Service •Supply Chain Vulnerabilities Source: https://owasp.org/www-project-top-10-for-large-language-model-applications/
  18. @slobodan_ OWASP Top 10 for LLM •Sensitive Information Disclosure •Insecure

    Plugin Design •Excessive Agency •Overreliance •Model The" Source: https://owasp.org/www-project-top-10-for-large-language-model-applications/
  19. @slobodan_ ChatGPT “AGI is like a Swiss Army knife for

    the brain, brilliantly juggling any task you throw at it—from cracking jokes to solving quantum physics puzzles!” Not an AGI yet :)