Day 9: Hardening an AI Mobile App

Published by

on

purple and pink diamond on blue background

Hi Friends! šŸ‘‹

šŸ“Š Daily Stand-Up: Yesterday, as the Lead Engineer, we worked on hardening our game. For any mobile app, there are certain precautions that need to be taken so we don’t disrupt the user’s experience and inform them of any failures. So we started hardening the app to handle app crashes, http request failures, app closures, connectivity problems, and because at the core of our game we have AI, prompt manipulation. 

Prompt Engineering has taken on a life of its own after the launch of ChatGPT and the dark side of that life houses entire communities that exist to share ways to manipulate or ā€˜Jailbreak’ the AI. 

For our app this amounts to limiting prompt length, ie not allowing users to submit long prompts to our AI. Blacklisting keywords from being in our user’s prompts, creating user ids and submitting those with our chat requests to identify bad actors. So not entirely different from protecting a free form text input from sql attacks.

Although I mentioned it briefly above, I’ve included several resources and examples below of hardening http requests, app closures, and AI prompts below.

Today we’ll finish up app hardening and move to start looking at hosting a rdb.

šŸ’ŖšŸ¼ New Skill: Mobile App Hardening

šŸŽµ Playlist: https://open.spotify.com/track/2zYzyRzz6pRmhPzyfMEC8s?si=28912c468d42427f

🧠 Mental State: Starting to think more about the RDB.

šŸ› ļø Tools: MacBook Pro M2, Ipad Pro, Pixel 6, Intellij, Flutter, The Keyboard that Saved my Hands, The Desk that Saved my Back, The Perfect Stand for Ipads, Desk Mounts that Work and Go on Sale, Ollama

šŸ“š Resources: 

Hardening AI prompt:

https://platform.openai.com/docs/guides/safety-best-practices

https://platform.openai.com/docs/guides/moderation

Hardening for App Http Requests:

https://medium.com/@mohammadjoumani/error-handling-in-flutter-a1dfe81a2e0

https://pub.dev/packages/connectivity_plus

https://medium.com/readytowork-org/dio-interceptors-in-flutter-e813f08c2017

https://stackoverflow.com/questions/77501480/i-want-check-internet-connection-before-every-dio-request-using-interceptor-and

https://pub.dev/packages/dio

Hardening for App Closures:

https://medium.com/@farooqafridi958/embracing-flutters-app-lifecycle-changes-with-applifecyclelistener-aae5bb538671

https://api.flutter.dev/flutter/widgets/AppLifecycleListener-class.html

https://www.filledstacks.com/post/flutter-application-life-cycle-management

#AI, #TechJourney, #Flutter, #MobileGameDevelopment, #SoftwareDevelopment, #ProgrammingLife, #TechBlog, #AIGame

By: David Giametta

Future David here! I hope you enjoyed reading through this post. AI Murders is now live! Apple, Google

Leave a Reply