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

31 Oct. 0204 - - Total Reads 646

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: 646

Share this

Go on, see if you can challenge us on "Why Doesn’t AI do the right thing with Variables?" - Part of our 183 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

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

Testimonials

Michael and his team have just launched our new website and the team at AndMine have been professional and a pleasure to deal with. From the very start, it was evident that Michael was able to deliver a first class website and gave great advice about social media and other tools we need to consider, given the nature of our business. After several design phases, we worked closely together and achieved a result that we are very happy with. I wouldn’t hesitate recommending AndMine for web and online marketing related services. Illona Vak, C Squared Executive

More Testimonials
AndMine-Google-Partner-Signature