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

Cloud Engineering amplified by GPT-4

Cloud Engineering amplified by GPT-4

Sebastian Korfmann

March 16, 2023
Tweet

More Decks by Sebastian Korfmann

Other Decks in Programming

Transcript

  1. What is GPT-4? WeÕve created GPT-4, the latest milestone in

    OpenAIÕs effort in scaling up deep learning. GPT-4 is a large multimodal model (accepting image and text inputs, emitting text outputs) that, while less capable than humans in many real-world scenarios, exhibits human-level performance on various professional and academic benchmarks. 3 3 https://openai.com/research/gpt-4 Cloud Engineering ampliÞed by GPT-4 / @skorfmann 2
  2. The Idea ¥ "I've got an hour until lunch, let's

    build an AWS CDK app with Chat GPT 4" ¥ Let's try my go-to example: An URL Shortener Cloud Engineering ampliÞed by GPT-4 / @skorfmann 6
  3. 40 minutes later: curl -X POST https://3c10izhvhc.execute-api.eu-central-1.amazonaws.com/prod/create \ -H "Content-Type:

    application/json" \ -d '{"originalUrl": "https://www.example.com"}' {"shortUrl":"https://3c10izhvhc.execute-api.eu-central-1.amazonaws.com/prod/37e97e34","shortCode":"37e97e34"} Cloud Engineering ampliÞed by GPT-4 / @skorfmann 7
  4. Setting the stage > You are an AI programming assistant.

    - Follow the user's requirements carefully & to the letter. - First think step-by-step - describe your plan for \n what to build in pseudocode, written out in great detail. - Then output the code in a single code block. - Minimize any other prose Cloud Engineering ampliÞed by GPT-4 / @skorfmann 8
  5. DeÞning the requirements > I want to build the backend

    for an URL shortener with the AWS CDK in Typescript. I'll need: A RestAPI with two endpoints: - Create Short URL - Redirect for Short URL The urls should be persisted in DynamoDB Cloud Engineering ampliÞed by GPT-4 / @skorfmann 9
  6. A few iterations > Great - now create both lambda

    handlers > ... > Module '"@aws-sdk/client-dynamodb"' has no exported member 'PutCommand'.ts(2305) \n Module '"@aws-sdk/client-dynamodb"' has no exported member 'DynamoDBDocumentClient'.ts(2305) > ... > Please generate a Readme for the application 4 4 https://github.com/skorfmann/gpt-url-redirect/blob/main/prompt.md Cloud Engineering ampliÞed by GPT-4 / @skorfmann 13
  7. In the evening on that same day ¥ "Well, let's

    build a frontend" Cloud Engineering ampliÞed by GPT-4 / @skorfmann 15
  8. That was great! ¥ "Well, let's deploy this via Github

    Actions with OIDC" Cloud Engineering ampliÞed by GPT-4 / @skorfmann 19
  9. Knowledge Cut Off: End of September 2021 ¥ AWS /

    Github OIDC wasn't really around back then ¥ "Let's just paste the Github AWS OIDC docs into the prompt to provide context" Cloud Engineering ampliÞed by GPT-4 / @skorfmann 20
  10. Changes since GPT 3.5 ¥ More predictable ¥ Great a

    generating roughly working code at 1st shot ¥ Feedback loops work naturally ¥ Way more context ¥ More expensive ¥ Still limited access Cloud Engineering ampliÞed by GPT-4 / @skorfmann 22
  11. Legal Aspects / Licensing TL;DR: you can commercially use the

    content generated by the Services, including for sale or publication, as long as you comply with the Terms. You own the input you provide and the output you receive, which allows you to use the content for any purpose, including commercial purposes. I'm not a lawyer, though - so check for yourself 1 1 https://openai.com/policies/terms-of-use Cloud Engineering ampliÞed by GPT-4 / @skorfmann 23
  12. Legal Aspects / Licensing ¥ Still uncharted terrain 2 ¥

    Time will well ¥ I'm happy as long as OpenAI grants commercial usage rights 2 https://www.forbes.com/sites/joemckendrick/2022/12/21/who-ultimately-owns-content-generated-by-chatgpt-and-other-ai- platforms/ Cloud Engineering ampliÞed by GPT-4 / @skorfmann 24
  13. So, what's the License of the ChatGPT Url Shortener Repo?

    Cloud Engineering ampliÞed by GPT-4 / @skorfmann 25
  14. Peer Feedback ¥ "Wow, I'll be out of my job

    within a year (>_<)" ¥ "But this is a beaten path, how about X?" ¥ But overall a lot of excitement Cloud Engineering ampliÞed by GPT-4 / @skorfmann 27
  15. Bonus Round ¥ > And now the same backend in

    CDK for Terraform ¥ > how would a similar app look like in Azure built with Terraform? Cloud Engineering ampliÞed by GPT-4 / @skorfmann 28
  16. What does all of this mean? I have no idea!

    Still processing :D Cloud Engineering ampliÞed by GPT-4 / @skorfmann 32
  17. Resources ¥ https://openai.com/product/gpt-4 ¥ https://gist.github.com/skorfmann/ 03f84cec6f25aefab464659bf26fba8d ¥ https://github.com/skorfmann/gpt-url-redirect ¥ https://ds1jsd79h0pzb.cloudfront.net/

    ¥ https://hekto.dev/ ¥ https://www.forbes.com/sites/joemckendrick/2022/12/21/who- ultimately-owns-content-generated-by-chatgpt-and-other-ai-platforms/ Cloud Engineering ampliÞed by GPT-4 / @skorfmann 34