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

31 Oct. 0204 - - Total Reads 1,554

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

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

Testimonials

I strongly recommend AndMine and Michael's work to any forward thinking company. They have helped us rapidly evolve our business with great success in a very difficult period in retail. From online to offline they are the new generation of advertising delivering brilliant results and service. From simple EDM's to our new online store and creative campaigns, they have gone above and beyond, engrained themselves in our business and amplified our brand. We look forward to what Michael and the team achieve for us next. Harry Goles, OJAY Clothing

More Testimonials
AndMine-Google-Partner-Signature