<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sara Moore</title>
    <description>The latest articles on DEV Community by Sara Moore (@sara_m_d512f33a34c6ebfb27).</description>
    <link>https://dev.to/sara_m_d512f33a34c6ebfb27</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4207189%2F0a764d07-1e71-4e14-be93-63d94aab075d.jpg</url>
      <title>DEV Community: Sara Moore</title>
      <link>https://dev.to/sara_m_d512f33a34c6ebfb27</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sara_m_d512f33a34c6ebfb27"/>
    <language>en</language>
    <item>
      <title>We Built an AI Prescription Reader That Knows When Not to Guess</title>
      <dc:creator>Sara Moore</dc:creator>
      <pubDate>Tue, 27 Oct 2026 05:36:45 +0000</pubDate>
      <link>https://dev.to/sara_m_d512f33a34c6ebfb27/we-built-an-ai-prescription-reader-that-knows-when-not-to-guess-158g</link>
      <guid>https://dev.to/sara_m_d512f33a34c6ebfb27/we-built-an-ai-prescription-reader-that-knows-when-not-to-guess-158g</guid>
      <description>&lt;p&gt;What building decodRx at HackTX 2026 taught us about designing AI systems for uncertainty.&lt;/p&gt;

&lt;p&gt;Imagine standing in your kitchen, holding a new prescription bottle.&lt;/p&gt;

&lt;p&gt;The label is smudged. The dosage is difficult to read. You can make out most of the instructions, but one number is unclear.&lt;/p&gt;

&lt;p&gt;What do you do?&lt;/p&gt;

&lt;p&gt;For many people, this is more than an inconvenience. Small print, unfamiliar abbreviations, limited English proficiency, and low health literacy can make understanding medication instructions unnecessarily difficult.&lt;/p&gt;

&lt;p&gt;Now imagine asking an AI to read the label for you. It returns a confident answer, even though it couldn't actually read the dosage.&lt;/p&gt;

&lt;p&gt;That was the problem we wanted to tackle at HackTX 2026.&lt;/p&gt;

&lt;p&gt;We built &lt;strong&gt;decodRx&lt;/strong&gt;, a full-stack prototype designed to make prescription labels easier to understand without turning uncertainty into potentially dangerous misinformation.&lt;/p&gt;

&lt;p&gt;Our central design principle was simple:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If the system doesn't know, it shouldn't guess.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem with simply asking a chatbot
&lt;/h2&gt;

&lt;p&gt;Modern multimodal AI models can extract information from images, summarize text, and answer questions in seconds. But when the input is ambiguous, a fluent answer doesn't necessarily mean a correct answer.&lt;/p&gt;

&lt;p&gt;For medication instructions, that distinction matters.&lt;/p&gt;

&lt;p&gt;We wanted to build something that did more than put a prescription photo into a chatbot and return a paragraph. We wanted the application to make uncertainty visible, require user confirmation, and give people a way to get human help.&lt;/p&gt;

&lt;p&gt;That meant treating safety as an engineering problem, not just a prompting problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  How decodRx works
&lt;/h2&gt;

&lt;p&gt;Our prototype is built around a single workflow.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Turn a prescription photo into structured data
&lt;/h3&gt;

&lt;p&gt;A user uploads a prescription label image. We use Google's Gemini API to extract individual fields, such as medication information and dosage instructions, into structured data.&lt;/p&gt;

&lt;p&gt;Instead of treating the model's response as one block of text, we can display the extracted fields individually and show the corresponding source text.&lt;/p&gt;

&lt;p&gt;This gives users a way to inspect what the model actually read.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Make uncertainty visible
&lt;/h3&gt;

&lt;p&gt;What happens when the model cannot confidently read a field?&lt;/p&gt;

&lt;p&gt;We leave it marked as &lt;strong&gt;Unknown&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The application doesn't silently fill in a missing strength or treat an uncertain extraction as verified. Explanations remain locked until the user confirms every required field.&lt;/p&gt;

&lt;p&gt;Importantly, this isn't enforced only through a disabled button in the frontend. The backend also checks whether the required fields have been confirmed before allowing the explanation step to proceed.&lt;/p&gt;

&lt;p&gt;We wanted the safety rule to exist at the system level, rather than depending on the interface behaving correctly.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Let people help without taking control away from the patient
&lt;/h3&gt;

&lt;p&gt;AI isn't the only way to resolve uncertainty.&lt;/p&gt;

&lt;p&gt;decodRx includes a human-help workflow in which an approved volunteer can propose a reading of an unclear field. The patient decides whether to accept or reject that suggestion.&lt;/p&gt;

&lt;p&gt;We also built a supporter-circle workflow for coordinating practical tasks. A patient can selectively share medication directions with someone helping them, accept assistance with a task, and revoke access.&lt;/p&gt;

&lt;p&gt;The idea is to make asking for help easier without making the patient give up control of their information.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Connect information to useful next steps
&lt;/h3&gt;

&lt;p&gt;The prototype also integrates pharmacy lookup through SerpApi.&lt;/p&gt;

&lt;p&gt;One unexpected challenge was that a search could report success while returning pharmacies nowhere near the requested location. We added checks to verify that results were actually nearby before presenting them.&lt;/p&gt;

&lt;p&gt;That reinforced another lesson: a successful API response doesn't automatically mean a useful or correct result.&lt;/p&gt;

&lt;h2&gt;
  
  
  Under the hood
&lt;/h2&gt;

&lt;p&gt;We used a React and TypeScript frontend with an Express backend. Shared Zod schemas define contracts between the frontend and backend, helping us keep the data structures consistent across the application.&lt;/p&gt;

&lt;p&gt;Gemini handles image-to-structured-data extraction. SerpApi supports pharmacy lookup, with validation around returned locations.&lt;/p&gt;

&lt;p&gt;We also wrote automated tests and browser tests with Playwright to exercise application behavior, including the rules around unconfirmed fields.&lt;/p&gt;

&lt;p&gt;The most interesting engineering challenge wasn't getting a model to read a label. It was making the rest of the application behave safely when the model couldn't.&lt;/p&gt;

&lt;p&gt;That required thinking across multiple layers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Data contracts:&lt;/strong&gt; How do we represent a field that hasn't been read reliably?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Frontend behavior:&lt;/strong&gt; How do we make uncertainty obvious to users?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backend enforcement:&lt;/strong&gt; How do we prevent unconfirmed information from being used prematurely?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Third-party integrations:&lt;/strong&gt; How do we validate results instead of blindly trusting successful responses?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Testing:&lt;/strong&gt; How do we verify that safeguards work across the complete workflow?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We built a working prototype with automated tests, but those tests demonstrate software behavior, not clinical accuracy. We haven't established extraction accuracy on real prescription labels, and the application is not yet deployed.&lt;/p&gt;

&lt;p&gt;Being explicit about that distinction is part of building responsibly.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we learned
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Safety needs to be part of the architecture
&lt;/h3&gt;

&lt;p&gt;It's tempting to approach AI safety by adding a disclaimer or refining a prompt.&lt;/p&gt;

&lt;p&gt;Those measures alone aren't enough when the application makes decisions based on model output.&lt;/p&gt;

&lt;p&gt;For decodRx, uncertainty had to be represented in our data structures, reflected in the interface, and enforced by the backend. The product's safeguards mattered just as much as the model's capabilities.&lt;/p&gt;

&lt;h3&gt;
  
  
  Successful integrations still need verification
&lt;/h3&gt;

&lt;p&gt;Our pharmacy lookup experience demonstrated that third-party services can return technically successful but contextually incorrect results.&lt;/p&gt;

&lt;p&gt;Developers should validate whether an answer satisfies the user's actual request, not just whether an API returned data.&lt;/p&gt;

&lt;h3&gt;
  
  
  A prototype is not a validated healthcare product
&lt;/h3&gt;

&lt;p&gt;We used fictional demonstration data. The current application doesn't provide clinical recommendations, verify dosage safety, or establish whether a prescription is appropriate for a patient.&lt;/p&gt;

&lt;p&gt;Its current explanation panel repeats the label's directions rather than rewriting them into plain language, and it prompts users to ask a pharmacist about questions that may need clarification.&lt;/p&gt;

&lt;p&gt;Before real-world use, we'd need to evaluate extraction accuracy on real labels, conduct accessibility testing with users, strengthen authentication and privacy protections, and establish appropriate clinical review.&lt;/p&gt;

&lt;p&gt;We see these as essential next steps, not details to gloss over.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next?
&lt;/h2&gt;

&lt;p&gt;We'd like to explore a reviewed plain-language rewriting workflow, stronger validation using real-world label data, more comprehensive accessibility testing, and a secure deployed architecture.&lt;/p&gt;

&lt;p&gt;Longer term, we want to investigate whether a specialized label-reading model could improve reliability and reduce dependence on external APIs.&lt;/p&gt;

&lt;p&gt;But the guiding principle will remain the same: an uncertain answer should stay uncertain until someone can verify it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build for the moments when AI gets it wrong
&lt;/h2&gt;

&lt;p&gt;Hackathons often reward ambitious features and impressive demos. Building decodRx reminded us that sometimes the most important feature is a system's ability to stop.&lt;/p&gt;

&lt;p&gt;A model that can read most of a prescription label is useful. A system that knows when not to trust an unclear reading may be even more important.&lt;/p&gt;

&lt;p&gt;We built decodRx around that distinction.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://youtu.be/TpsITc-wL8E?si=-LMmTatBJhvlKYr9" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhhdjhahazwqbmraiywla.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhhdjhahazwqbmraiywla.png" alt=" " width="800" height="518"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>hackathon</category>
    </item>
  </channel>
</rss>
