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

31 Oct. 0204 - - Total Reads 976

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

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

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

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