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

31 Oct. 0204 - - Total Reads 902

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: 0.9K

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

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

Testimonials

Thank you for all of your hard work in getting our beautiful Melrose website live today. Woohoo!From the incredible design, to all of the behind the scenes technical aspects, to making it all come together and managing all of our feedback. - Lucinda Hobson, Melrose Project Manager Thank you to each and everyone of you for your dedication and hard work in getting this live and running and for your continuous hard work over the week in ironing out the issues that come with a website launch. Kat Heath, Melrose Group Marketing Manager

More Testimonials
AndMine-Google-Partner-Signature