{"id":"AuxKbKQ_WZE","title":"How I Keep Health Data Private When Building With AI","description":"If you're building a product on top of the OpenAI or Anthropic APIs, your users' data is going somewhere, and most of them have no idea where. That matters for any product. It matters a lot more when the product holds health information.\n\nI'm Joe, and I'm building a private place for your family's health information that you can ask questions to. This video walks through the routing logic I use to decide where each request goes, balancing privacy, cost, speed, and answer quality.\n\nThe core rule: audit the prompt inside the app before anything leaves it. Simple lookups like your last blood pressure reading never touch a model at all. Questions with no personal health data go out anonymized through NEAR AI to whichever model gives the best answer. When the router isn't sure, it defaults to a NEAR AI open source model running in a TEE on hardware you can verify. Anything that clearly involves health information goes to a BAA-covered account through a service like AWS Bedrock, so HIPAA obligations rest on an actual agreement.\n\nUncertainty always resolves toward more privacy, never less. That one rule shapes most of the architecture.\n\nChapters\n0:00 Where does your data actually go\n0:35 What I'm building with Microwave OS\n1:07 Auditing the prompt before anything leaves the app\n1:31 Simple lookups that never touch a model\n1:54 No private health data, so route it out anonymized\n2:25 When the router isn't sure, default to private\n3:06 Health data and BAA-covered models\n3:49 Why privacy-first is easier if you start there\n\nI'm documenting this whole build. Subscribe and follow along, and leave your questions in the comments because I want to work through this with people rather than at them.\n\n#BuildInPublic #PrivacyByDesign #AIEngineering #HIPAA #NEARAI #HealthTech","channel_name":"NEAR DevHub","published_at":"2026-08-04T00:00:00.000Z","thumbnail_url":"https://img.youtube.com/vi/AuxKbKQ_WZE/hqdefault.jpg","transcript_text":"You ever use claude or chatgbt and wonder where your data is going? Well, when you're building with AI and you're building a product using AI, your users should know where that data is going. If you're just building on top of an API like from OpenAI or from Anthropic, then they're also being able to use some of that data. They know where it's coming from that can maybe be used to train or whatever else. We've even seen leaks lately where that information is actually showing up on the internet in Google searches. So, that's really problematic when you're building a product, especially one around privacy. Hi, I'm Joe and I'm building Microwave OS. It is a private place for all your family's health information that you can ask questions to. And I'm building it on top of AI. I am focused on having a routing logic. the user have maximum privacy as well as giving the best type of answer and feedback it can possibly do as well as for me as the builder maximize my economics around all of this too. So we want to make sure that we can actually have that ability of privacy, data ownership and economics all tied together for our product. So let me quickly show you how this logic is going to work inside Microwave OS. So before we even actually go and send information out to a model, we actually want to audit what's actually in there. So that question, whatever comment is put into the text box by the end user, that should be processed in a way to figure out what type of routing should it do. It has to be built into the app directly. It can't be sent off somewhere because that defeats the purpose. There is nothing really in it that question just simply a simple lookup like what is my weight? uh what was my most recent blood pressure, things like that. Uh it should be able to look that up and just tell you what it is because it has that information. There's no reason to send it out to the cloud. There's no reason to have an AI process that. It's just a lookup. The next question starts to become then is there actual private health information inside of it. Are we certain about that or uncertain about that? If we're certain that there's no actual private health information, we can then send it to near AAI which can be anonymized and we can actually use a anthropic based model or an open AI based model or whatever we want to use that fits our needs there. Uh but it will be anonymized and we can feel confident and we can also get the best return on that answer. Now if we are unsure about that and the routing can say I'm not sure this actually has the private information permission or not. So we can actually then lean on making sure that it goes to a near model that is within a TE. That means that it is a open- source model that is being hosted on their own hardware that we can actually verify what is happening there. The uncertainty leads to privacy and security. So if we are unsure at any time, we're always going to lean towards being more private. So we can use a near AI model for that that is open source that is on encrypted hardware that we feel comfortable saying okay no one can access what you just wrote to this uh to this app. Lastly if private health information is present for short or it's actually possible that there is then we can send it to our health focused BAA account through something like AWS bedrock. There's other services that provide this as well. What a baa account is is simply just a business uh agreement that allows you to say that look we're going to use this particular model. It is fully protected. It is encrypted under the proper encrypted standards and no one else can see what's being asked here. So it's similar to the neari model but because this is health information we want to have that proper agreement in place to make sure that we are following all HIPPA guidelines in the United States and elsewhere. Building with privacy in mind first, especially with AI, can be a little bit tricky, but if you do it from the first get-go, it's so much easier and it really starts to shape the rest of your app and your product decision. I'll be taking you on this journey all the way building this app. I encourage you to follow along, ask questions, and let's learn together about the best ways to build with privacy.","transcript_synced_at":"2026-11-03T03:47:59.681Z","segments":[{"start_seconds":5,"text":"You ever use claude or chatgbt and wonder where your data is going? Well, when you're building with AI and you're building a product using AI, your users","url":"https://www.youtube.com/watch?v=AuxKbKQ_WZE&t=5s"},{"start_seconds":13,"text":"should know where that data is going. If you're just building on top of an API like from OpenAI or from Anthropic, then they're also being able to use some of","url":"https://www.youtube.com/watch?v=AuxKbKQ_WZE&t=13s"},{"start_seconds":21,"text":"that data. They know where it's coming from that can maybe be used to train or whatever else. We've even seen leaks lately where that information is","url":"https://www.youtube.com/watch?v=AuxKbKQ_WZE&t=21s"},{"start_seconds":29,"text":"actually showing up on the internet in Google searches. So, that's really problematic when you're building a product, especially one around privacy.","url":"https://www.youtube.com/watch?v=AuxKbKQ_WZE&t=29s"},{"start_seconds":35,"text":"Hi, I'm Joe and I'm building Microwave OS. It is a private place for all your family's health information that you can ask questions to. And I'm building it on","url":"https://www.youtube.com/watch?v=AuxKbKQ_WZE&t=35s"},{"start_seconds":43,"text":"top of AI. I am focused on having a routing logic. the user have maximum privacy as well as giving the best type","url":"https://www.youtube.com/watch?v=AuxKbKQ_WZE&t=43s"},{"start_seconds":51,"text":"of answer and feedback it can possibly do as well as for me as the builder maximize my economics around all of this","url":"https://www.youtube.com/watch?v=AuxKbKQ_WZE&t=51s"},{"start_seconds":59,"text":"too. So we want to make sure that we can actually have that ability of privacy, data ownership and economics all tied","url":"https://www.youtube.com/watch?v=AuxKbKQ_WZE&t=59s"},{"start_seconds":67,"text":"together for our product. So let me quickly show you how this logic is going to work inside Microwave OS. So before","url":"https://www.youtube.com/watch?v=AuxKbKQ_WZE&t=67s"},{"start_seconds":74,"text":"we even actually go and send information out to a model, we actually want to audit what's actually in there. So that","url":"https://www.youtube.com/watch?v=AuxKbKQ_WZE&t=74s"},{"start_seconds":82,"text":"question, whatever comment is put into the text box by the end user, that should be processed in a way to figure out what type of routing should it do.","url":"https://www.youtube.com/watch?v=AuxKbKQ_WZE&t=82s"},{"start_seconds":91,"text":"It has to be built into the app directly. It can't be sent off somewhere because that defeats the purpose. There is nothing really in it that question","url":"https://www.youtube.com/watch?v=AuxKbKQ_WZE&t=91s"},{"start_seconds":98,"text":"just simply a simple lookup like what is my weight? uh what was my most recent blood pressure, things like that. Uh it","url":"https://www.youtube.com/watch?v=AuxKbKQ_WZE&t=98s"},{"start_seconds":105,"text":"should be able to look that up and just tell you what it is because it has that information. There's no reason to send it out to the cloud. There's no reason to have an AI process that. It's just a","url":"https://www.youtube.com/watch?v=AuxKbKQ_WZE&t=105s"},{"start_seconds":114,"text":"lookup. The next question starts to become then is there actual private health information inside of it. Are we certain about that or uncertain about that? If we're certain that there's no","url":"https://www.youtube.com/watch?v=AuxKbKQ_WZE&t=114s"},{"start_seconds":121,"text":"actual private health information, we can then send it to near AAI which can be anonymized and we can actually use a","url":"https://www.youtube.com/watch?v=AuxKbKQ_WZE&t=121s"},{"start_seconds":128,"text":"anthropic based model or an open AI based model or whatever we want to use that fits our needs there. Uh but it will be anonymized and we can feel","url":"https://www.youtube.com/watch?v=AuxKbKQ_WZE&t=128s"},{"start_seconds":137,"text":"confident and we can also get the best return on that answer. Now if we are unsure about that and the routing can","url":"https://www.youtube.com/watch?v=AuxKbKQ_WZE&t=137s"},{"start_seconds":145,"text":"say I'm not sure this actually has the private information permission or not.","url":"https://www.youtube.com/watch?v=AuxKbKQ_WZE&t=145s"},{"start_seconds":148,"text":"So we can actually then lean on making sure that it goes to a near model that is within a TE. That means that it is a","url":"https://www.youtube.com/watch?v=AuxKbKQ_WZE&t=148s"},{"start_seconds":157,"text":"open- source model that is being hosted on their own hardware that we can actually verify what is happening there.","url":"https://www.youtube.com/watch?v=AuxKbKQ_WZE&t=157s"},{"start_seconds":164,"text":"The uncertainty leads to privacy and security. So if we are unsure at any time, we're always going to lean towards","url":"https://www.youtube.com/watch?v=AuxKbKQ_WZE&t=164s"},{"start_seconds":171,"text":"being more private. So we can use a near AI model for that that is open source that is on encrypted hardware that we","url":"https://www.youtube.com/watch?v=AuxKbKQ_WZE&t=171s"},{"start_seconds":179,"text":"feel comfortable saying okay no one can access what you just wrote to this uh to this app. Lastly if private health","url":"https://www.youtube.com/watch?v=AuxKbKQ_WZE&t=179s"},{"start_seconds":186,"text":"information is present for short or it's actually possible that there is then we can send it to our health focused BAA","url":"https://www.youtube.com/watch?v=AuxKbKQ_WZE&t=186s"},{"start_seconds":194,"text":"account through something like AWS bedrock. There's other services that provide this as well. What a baa account","url":"https://www.youtube.com/watch?v=AuxKbKQ_WZE&t=194s"},{"start_seconds":202,"text":"is is simply just a business uh agreement that allows you to say that look we're going to use this particular model. It is fully protected. It is","url":"https://www.youtube.com/watch?v=AuxKbKQ_WZE&t=202s"},{"start_seconds":210,"text":"encrypted under the proper encrypted standards and no one else can see what's being asked here. So it's similar to the","url":"https://www.youtube.com/watch?v=AuxKbKQ_WZE&t=210s"},{"start_seconds":219,"text":"neari model but because this is health information we want to have that proper agreement in place to make sure that we are following all HIPPA guidelines in the United States and elsewhere.","url":"https://www.youtube.com/watch?v=AuxKbKQ_WZE&t=219s"},{"start_seconds":229,"text":"Building with privacy in mind first, especially with AI, can be a little bit tricky, but if you do it from the first get-go, it's so much easier and it","url":"https://www.youtube.com/watch?v=AuxKbKQ_WZE&t=229s"},{"start_seconds":237,"text":"really starts to shape the rest of your app and your product decision. I'll be taking you on this journey all the way building this app. I encourage you to follow along, ask questions, and let's","url":"https://www.youtube.com/watch?v=AuxKbKQ_WZE&t=237s"},{"start_seconds":245,"text":"learn together about the best ways to build with privacy.","url":"https://www.youtube.com/watch?v=AuxKbKQ_WZE&t=245s"}],"youtube_url":"https://youtube.com/watch?v=AuxKbKQ_WZE","url":"https://near-pedia.xyz/videos/AuxKbKQ_WZE"}