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

31 Oct. 0204 - - Total Reads 728

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

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

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

Testimonials

We contracted &Mine to build a new website and a ‘real-life’ online tutorial. We found their work to be creative and technically competent, and their staff friendly, professional and flexible. We are happy to recommend them. Deborah Fullwood, Director, WestWood Spice

More Testimonials
AndMine-Google-Partner-Signature