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

31 Oct. 0204 - - Total Reads 1,420

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.4K

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

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

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