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

31 Oct. 0204 - - Total Reads 903

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

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

Testimonials

I wanted to thank you and your teams for the responsiveness and quality of the work you have done for the french version of the site. We had a very good feedback on the quality of the site from our French network. Vincent Berlinet

More Testimonials
AndMine-Google-Partner-Signature