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

31 Oct. 0204 - - Total Reads 855

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

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

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

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