<?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: TheSidneySpace</title>
    <description>The latest articles on DEV Community by TheSidneySpace (thesidneyspace).</description>
    <link>https://dev.to/thesidneyspace</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%2Forganization%2Fprofile_image%2F15943%2F4dd784c3-defb-4ba7-972e-feeaa4d7a6a4.png</url>
      <title>DEV Community: TheSidneySpace</title>
      <link>https://dev.to/thesidneyspace</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/thesidneyspace"/>
    <language>en</language>
    <item>
      <title>The AI Recognized the Food. That Didn't Mean the Calories Were Right.</title>
      <dc:creator>SidneyOkine</dc:creator>
      <pubDate>Sat, 07 Nov 2026 22:31:26 +0000</pubDate>
      <link>https://dev.to/thesidneyspace/the-ai-recognized-the-food-that-didnt-mean-the-calories-were-right-47fa</link>
      <guid>https://dev.to/thesidneyspace/the-ai-recognized-the-food-that-didnt-mean-the-calories-were-right-47fa</guid>
      <description>&lt;p&gt;&lt;strong&gt;What building an AI-assisted meal scanner taught us about uncertainty, user control, and the difference between a working model and a useful product.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A photograph of a plate of rice and stew doesn't tell you how much oil went into the stew.&lt;/p&gt;

&lt;p&gt;It doesn't tell you whether the rice weighs 150 or 250 grams. It doesn't tell you about the ingredients underneath the sauce, either.&lt;/p&gt;

&lt;p&gt;A computer vision model might recognise the food perfectly.&lt;/p&gt;

&lt;p&gt;And still get the calorie estimate wrong.&lt;/p&gt;

&lt;p&gt;That's an interesting problem when you're building a feature that's supposed to make nutrition tracking easier.&lt;/p&gt;

&lt;p&gt;At TheSidneySpace, we work on LTG Lifestyle, a mobile wellness application that includes AI-assisted meal scanning.&lt;/p&gt;

&lt;p&gt;Users can photograph a meal, receive an estimate of its nutritional content, review the results, and adjust them before saving.&lt;/p&gt;

&lt;p&gt;The feature sounds straightforward when described in a sentence.&lt;/p&gt;

&lt;p&gt;But it raises a question that's relevant to almost anyone building AI-powered products:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What should an application do when its model produces a plausible answer that might not be correct?&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Recognition isn't measurement
&lt;/h2&gt;

&lt;p&gt;There's an important difference between identifying an object and understanding its properties.&lt;/p&gt;

&lt;p&gt;A model recognising a banana is one thing.&lt;/p&gt;

&lt;p&gt;Estimating the calories in a mixed meal is another.&lt;/p&gt;

&lt;p&gt;Consider a bowl containing rice, vegetables, and chicken.&lt;/p&gt;

&lt;p&gt;The model might correctly identify all three.&lt;/p&gt;

&lt;p&gt;But the nutritional calculation also depends on quantities, preparation methods, ingredients, and information that may not be visible in the image.&lt;/p&gt;

&lt;p&gt;Two meals that look similar can have meaningfully different nutritional values.&lt;/p&gt;

&lt;p&gt;The difficulty isn't necessarily that the model has failed.&lt;/p&gt;

&lt;p&gt;The difficulty is that the image doesn't contain enough information to determine an exact answer.&lt;/p&gt;

&lt;p&gt;That's a limitation of the input, not something that can always be solved by choosing a more capable model.&lt;/p&gt;

&lt;p&gt;And it has implications for how the product should behave.&lt;/p&gt;

&lt;h2&gt;
  
  
  A precise-looking number can be misleading
&lt;/h2&gt;

&lt;p&gt;Imagine the scanner returns:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;642 kcal&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It looks convincing.&lt;/p&gt;

&lt;p&gt;The interface has produced a specific number, presumably after analysing the photograph. The user might reasonably assume that number is accurate.&lt;/p&gt;

&lt;p&gt;But what does 642 actually mean?&lt;/p&gt;

&lt;p&gt;Is it based on an estimated serving size? How much of the meal was recognised correctly? Were cooking oils accounted for? How reliable were the ingredient assumptions?&lt;/p&gt;

&lt;p&gt;Displaying additional decimal places wouldn't answer any of those questions.&lt;/p&gt;

&lt;p&gt;This is where interface design becomes part of the reliability problem.&lt;/p&gt;

&lt;p&gt;Developers often think about reliability in terms of availability, error rates, response time, and whether a service returns valid data.&lt;/p&gt;

&lt;p&gt;Those are important.&lt;/p&gt;

&lt;p&gt;But an AI-powered feature can return a technically valid response and still communicate something misleading.&lt;/p&gt;

&lt;p&gt;A successful API request doesn't necessarily produce a trustworthy user experience.&lt;/p&gt;

&lt;p&gt;We need to treat those as separate concerns.&lt;/p&gt;

&lt;h2&gt;
  
  
  Don't confuse a generated result with a confirmed record
&lt;/h2&gt;

&lt;p&gt;One useful way to think about AI-assisted data entry is to separate the model's output from the information the user has accepted.&lt;/p&gt;

&lt;p&gt;For a meal scanner, that suggests a few distinct states:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Processing:&lt;/strong&gt; The image is being analysed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Draft:&lt;/strong&gt; The model has returned an estimated result.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Review:&lt;/strong&gt; The user can inspect and correct the result.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Saved:&lt;/strong&gt; The user has accepted the information.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Failed:&lt;/strong&gt; The scan couldn't produce a usable result.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These distinctions matter.&lt;/p&gt;

&lt;p&gt;A generated estimate should not automatically become part of someone's nutrition history simply because an API request succeeded.&lt;/p&gt;

&lt;p&gt;The user may need to change the food identification, adjust the quantity, or discard the result entirely.&lt;/p&gt;

&lt;p&gt;Separating those states creates room for that decision.&lt;/p&gt;

&lt;p&gt;It also encourages cleaner boundaries between AI-generated information and user-confirmed data.&lt;/p&gt;

&lt;p&gt;For developers, that's worth considering at the data-model level, not just as a button added to the interface later.&lt;/p&gt;

&lt;h2&gt;
  
  
  The edit screen is part of the AI feature
&lt;/h2&gt;

&lt;p&gt;It's tempting to spend most of the development effort improving the model request.&lt;/p&gt;

&lt;p&gt;You experiment with prompts, response formats, image handling, and different approaches to extracting structured data.&lt;/p&gt;

&lt;p&gt;Then you build a result screen.&lt;/p&gt;

&lt;p&gt;But if the result can be wrong, correcting it shouldn't feel like an afterthought.&lt;/p&gt;

&lt;p&gt;In LTG, users can review and adjust meal estimates before logging them.&lt;/p&gt;

&lt;p&gt;That interaction is important because the person using the app often knows something the model doesn't.&lt;/p&gt;

&lt;p&gt;They know whether the bowl was particularly large.&lt;/p&gt;

&lt;p&gt;They know if the meal contained an ingredient the camera couldn't see.&lt;/p&gt;

&lt;p&gt;They know whether the food was prepared differently from what the model assumed.&lt;/p&gt;

&lt;p&gt;AI can make an initial estimate easier to obtain.&lt;/p&gt;

&lt;p&gt;It shouldn't make that estimate unnecessarily difficult to correct.&lt;/p&gt;

&lt;p&gt;This principle extends well beyond nutrition.&lt;/p&gt;

&lt;p&gt;Document extraction, receipt scanning, transcription, AI-generated forms, and automated categorisation all face versions of the same problem.&lt;/p&gt;

&lt;p&gt;The initial output may be useful without being final.&lt;/p&gt;

&lt;p&gt;Design for that distinction from the beginning.&lt;/p&gt;

&lt;h2&gt;
  
  
  Failure doesn't always look like an error message
&lt;/h2&gt;

&lt;p&gt;When integrating an AI service, there are obvious failures to account for.&lt;/p&gt;

&lt;p&gt;The network request times out.&lt;/p&gt;

&lt;p&gt;The provider is unavailable.&lt;/p&gt;

&lt;p&gt;The response doesn't match the expected schema.&lt;/p&gt;

&lt;p&gt;The image cannot be processed.&lt;/p&gt;

&lt;p&gt;Those are relatively familiar engineering problems.&lt;/p&gt;

&lt;p&gt;A harder category involves responses that appear valid but are not useful.&lt;/p&gt;

&lt;p&gt;Perhaps the system identifies the wrong food.&lt;/p&gt;

&lt;p&gt;Perhaps it returns incomplete nutritional information.&lt;/p&gt;

&lt;p&gt;Perhaps the result contains a quantity that makes little sense for the meal.&lt;/p&gt;

&lt;p&gt;The JSON parses correctly. The request returns successfully. Nothing crashes.&lt;/p&gt;

&lt;p&gt;But something is still wrong.&lt;/p&gt;

&lt;p&gt;That's why the success of the transport layer, the validity of the response structure, and the usefulness of the result should be evaluated separately.&lt;/p&gt;

&lt;p&gt;A successful HTTP response isn't the end of validation.&lt;/p&gt;

&lt;h2&gt;
  
  
  What should happen when the scan fails?
&lt;/h2&gt;

&lt;p&gt;Suppose someone has taken a photograph of their lunch.&lt;/p&gt;

&lt;p&gt;The upload begins, the processing indicator appears, and then the connection drops.&lt;/p&gt;

&lt;p&gt;What now?&lt;/p&gt;

&lt;p&gt;An application could show a generic error and send the user back to the beginning.&lt;/p&gt;

&lt;p&gt;Or it could preserve the context, explain the problem, and offer a sensible next step.&lt;/p&gt;

&lt;p&gt;For this type of workflow, useful fallback behaviour might include retrying the request, allowing manual meal entry, or preserving a draft so the user doesn't have to reconstruct the entire interaction.&lt;/p&gt;

&lt;p&gt;The right choice depends on the product's architecture and constraints.&lt;/p&gt;

&lt;p&gt;But the larger point is straightforward.&lt;/p&gt;

&lt;p&gt;An AI feature should not require AI to be available for the entire application to remain usable.&lt;/p&gt;

&lt;p&gt;The model is there to reduce effort.&lt;/p&gt;

&lt;p&gt;When it isn't available, it shouldn't create unnecessary additional effort.&lt;/p&gt;

&lt;h2&gt;
  
  
  Observability needs to go beyond API success
&lt;/h2&gt;

&lt;p&gt;If you're trying to understand whether an AI-assisted feature is working well, request success rates only tell part of the story.&lt;/p&gt;

&lt;p&gt;Consider the difference between these events:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A scan was started.&lt;/li&gt;
&lt;li&gt;The scan service returned a response.&lt;/li&gt;
&lt;li&gt;The result was presented to the user.&lt;/li&gt;
&lt;li&gt;The user edited the result.&lt;/li&gt;
&lt;li&gt;The user saved the meal.&lt;/li&gt;
&lt;li&gt;The user abandoned the flow.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each event answers a different question.&lt;/p&gt;

&lt;p&gt;A high number of successful scan requests might look encouraging.&lt;/p&gt;

&lt;p&gt;But what if many users leave after seeing the estimate?&lt;/p&gt;

&lt;p&gt;What if the results are frequently edited?&lt;/p&gt;

&lt;p&gt;What if users complete the scan but rarely save the meal?&lt;/p&gt;

&lt;p&gt;None of these observations automatically proves that the model is inaccurate.&lt;/p&gt;

&lt;p&gt;A correction might reflect personal preference, a portion adjustment, or additional information the user knows.&lt;/p&gt;

&lt;p&gt;But these events provide useful starting points for investigation.&lt;/p&gt;

&lt;p&gt;They help shift the conversation from "Is the API working?" to "Is the feature helping people accomplish what they came to do?"&lt;/p&gt;

&lt;p&gt;When recording analytics, it's also worth being deliberate about what information is actually necessary. You can often understand a workflow's completion and failure patterns without collecting identifiable meal images or detailed personal nutrition records in your analytics platform.&lt;/p&gt;

&lt;h2&gt;
  
  
  The model isn't the whole product
&lt;/h2&gt;

&lt;p&gt;There's a tendency to evaluate AI features primarily by the sophistication of the model behind them.&lt;/p&gt;

&lt;p&gt;Which provider are you using?&lt;/p&gt;

&lt;p&gt;How accurate is it?&lt;/p&gt;

&lt;p&gt;How quickly does it respond?&lt;/p&gt;

&lt;p&gt;How much does each request cost?&lt;/p&gt;

&lt;p&gt;These are legitimate engineering questions.&lt;/p&gt;

&lt;p&gt;But they don't describe the entire experience.&lt;/p&gt;

&lt;p&gt;A less sophisticated model with understandable results, practical corrections, and reliable fallback behaviour may provide a better experience than an impressive model surrounded by confusing interactions.&lt;/p&gt;

&lt;p&gt;The product has to account for everything that happens after the inference is complete.&lt;/p&gt;

&lt;p&gt;It has to help the user understand the result, make a decision, and continue with whatever they were trying to accomplish.&lt;/p&gt;

&lt;p&gt;That's where a great deal of the engineering and design work belongs.&lt;/p&gt;

&lt;h2&gt;
  
  
  The question worth asking before shipping
&lt;/h2&gt;

&lt;p&gt;We've found it useful to think about AI-assisted meal scanning as an information-entry problem rather than simply an image-recognition problem.&lt;/p&gt;

&lt;p&gt;The photograph is an input.&lt;/p&gt;

&lt;p&gt;The model produces an estimate.&lt;/p&gt;

&lt;p&gt;The interface helps someone review that estimate.&lt;/p&gt;

&lt;p&gt;The application records the information they've chosen to accept.&lt;/p&gt;

&lt;p&gt;Each stage has a different responsibility.&lt;/p&gt;

&lt;p&gt;And each deserves attention.&lt;/p&gt;

&lt;p&gt;Because the objective isn't to demonstrate that a model can recognise someone's lunch.&lt;/p&gt;

&lt;p&gt;It's to help someone keep a useful record of what they've eaten without making the process unnecessarily complicated.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;An AI feature doesn't become trustworthy just because it produces an answer. It becomes more trustworthy when the product makes room for the answer to be wrong.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That's a principle worth carrying into the next AI feature you build.&lt;/p&gt;

</description>
      <category>mobile</category>
      <category>programming</category>
      <category>product</category>
    </item>
  </channel>
</rss>
