Why Doesn’t AI do the right thing with Variables?

31 Oct. 0204 - - Total Reads 1,419

AI Process Software

Why your AI says the right thing — but doesn’t do the right thing

One of the most frustrating realities of enterprise AI is that while models like ChatGPT or Claude are excellent at talking, they’re far less reliable at doing. Specifically, passing variables — like a user’s name, a date, an ID, or a workflow command — from an AI response into your application often breaks in unexpected ways.

Why? Because LLMs don’t know your business logic. They aren’t structured programs — they’re prediction engines that guess the next most likely words. That means even when they generate the correct-sounding answer, those answers are not reliably parseable, consistent, or machine-actionable unless heavily engineered.

For example, an AI might respond with:

“Sure, I’ll schedule your meeting with Sarah at 10am Tuesday.”

But under the hood, it failed to provide a usable datetime object or reference a valid user ID. So your app has no clue what to do next.

This becomes a major issue in use cases like form submission, CRM updates, task creation, or any workflow where structured data must be extracted and executed. A chatbot might say the right thing, but unless it outputs clean variables in a predictable format — and your app knows how to interpret them — nothing happens.

How to Solve It

There are a few solutions emerging. OpenAI’s function calling or Anthropic’s tool use allow developers to define the structure of expected variables. With these tools, you can tell the AI: “Only respond using this schema” — which makes the response reliably parseable by your system.

Here’s an example JSON output from function calling:

To get there, you need to:

  1. Define your app’s expected function schemas
  2. Use models that support structured outputs (e.g., GPT-4 with function calling)
  3. Test and handle fallback cases when AI guesses incorrectly

Enterprise AI doesn’t just need to talk — it needs to act. Getting variables right is the difference between a smart-sounding bot and a truly integrated, outcome-driven system.

If you’re ready to move from potential to production, AndMine can help engineer these logic layers so your AI doesn’t just respond — it gets things done.

Michael Simonetti, BSc BE MTE
Posted by:

Post Reads: 1.4K

Share this

Go on, see if you can challenge us on "Why Doesn’t AI do the right thing with Variables?" - Part of our 184 services at AndMine. We are quick to respond but if you want to go direct, test us during office hours.

Add Your Comment

Trusted by

Australian Government
Windsorsmith
Mark Alexander Design
The Fortune Institute
Smart Company
Maxine
Toy World
National Relay Services
Melrose MCT
CAN- Common Wealth Bank
Australian Anthill
DUSA, Deakin University Student Association
Viktoria & Woods
McArthur Skincare
LBG Australia and New Zealand
OMS – Order Management System
NextTech
Marshall White
itfe logo
Vendor Advocacy Australia
ADP Payroll
Scrum.org
Forbes
PranaOn
skillhire logo
Paypal
University of South Australia
VISSF
Bulk Nutrients
Corrs chambers westgarth
Melrose Health
Kadac
Elucent
intowork logo
NGS Super
Mamma Lucia
Ubertas Group
Coles
Wild Rhino Shoes
Melbourne Heart
Dinosaur Designs
aga logo
Arthur Galan
Switzer Media+Publishing
Bintani Australia
Etihad Stadium
SunSense Digital Agency
Green St Juice CO
Adobe Professional
POSTER Magazine
liberal
Engine Swim
Heat Holders
Victorian Government
Oracle
SMH – The Sydney Morning Herald
GPT Group
Taylor Rose
Melbourne Central
Hairhouse Warehouse
WTFN
kestrel logo
CCI
TPP
The Age
Positive Poster
Inferflora
ATT logo
Australian Physiotherapy Association
Movember
Toni&Guy
Tribe
Garmin
ctc logo
Ello
Banki Haddock Fiora
Rock Pool Group
Dial Before You Dig
Launtel
nextgenskills logo
Hanover
ISO Certified
Sports Power
Naturtint
Instant RockStar
Kay&Burton
help logo
Jalna
Acquia Certified Site Builder Drupal
Rackspace
Bondi Sands
Grainshaker
SwinBurne University of Technology
Crumpler
BlackMores
James Buyer Advocates
intojobs logo
Passage Foods
ABC
Macmillan Publishing
Brisbane Times
OpenAI
Xavier
Catholic Insurance
Vitura Health
Gilbert+Tobin
The Royal Melbourne Hospital
One Shift
CB Richard Ellis
Focus On Furniture
Madman Entertainment
MAP
Federation Square
Carlton Football Club
Ebay
Castran Gilbert
Rydges
Gadens
National Museum of Australia
Boston Consulting Group
Aqium Gel
mas national logo
Unsw Australia
Think & Grow Rich Inc
Loan Market
Drupal
Cooper Mills
Mecca Brands
AC/DC
Fast.co
Google
Arc One
White Suede
Tek Ocean
findstaff logo
King Wood Mallesons
Thomson Geer
Ego Pharmaceuticals
ISO CERTIFIED 27001
Telstra
Oakdale Meat Co
work and training logo
nara logo
Tassal
iPrimus
Fit My Car
Cleanfit
Magento Solution Specialist
Sunday Creek
Australian Organic Food CO
Metricon
21st Century Australia Party
Appstore
Florsheim Shoes
Cell Therapies
learning partners logo
Bigcommerce
Fairfax Media
Microsoft Certified Azure Fundamentals
Fresh Cheese Company
Cronos Australia
Bank of Cyprus
Melbourne Sports and Aquatic Centre – MSAC
High Street Armadale
Passage To India
Chia
Grays Ecommerce
131 Pizza
QV Skincare
Natralus Australia
Royal Freemasons
The Burger Cheese
Celebrate Health
Beaumont
RMIT University
Macpherson Kelley
Plants
MyAccount
interact logo
DeeWhy Market
Herbert Smith Freehills
Globird
Peter Mac
Jetstar
Bolle Safety
Atlantic Group of Companies
HGG 
Moov Head Lice
Craft CMS
htn logo
Novvi
Gilchrist Connell
OJAY
Palace Cinemas
Eway
Grow Your Business
ACTUATE IP
Magento
French Tables
Tomorrow Stars Basketball
The Canberra Times
Matchbox Homewares
Street Kitchen
Watches of Switzerland
Parker Lane
The University Of Melbourne
Federation University Australia
Shell
News
Schiavello
Bostik
Van Egmond Group
Uber
Amino Active
Engineers Without Borders
Max’s
GooglePlay
Associated Press
NMI Insurance

Testimonials

Just a quick note to say a big thanks and well done for doing what you said you would - building us a world class Health Food web site.  It looks great! We will find a way to properly thank your team for their hard work and terrific results. Russell, CEO, Melrose Health

More Testimonials
AndMine-Google-Partner-Signature