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

31 Oct. 0204 - - Total Reads 1,555

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

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

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

Testimonials

The AndMine team have been delivering our digital strategy and online services for many years now. Strongly commercially aware they know our industry well and have consistently delivered winning results for Matchbox. David Cohen, Owner, Matchbox

More Testimonials
AndMine-Google-Partner-Signature