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

31 Oct. 0204 - - Total Reads 1,082

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.1K

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

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

Testimonials

Not only is Michael professional but he is also a great friend to have in your court. He is balanced in his advice, fair in his quotes and has the best twitter feed for all things tech - i highly recommend you follow him and also hire him! Clare Smith, GM – Brand & Marketing Communications at Sensis

More Testimonials
AndMine-Google-Partner-Signature