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

31 Oct. 0204 - - Total Reads 1,241

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

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

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

Testimonials

We contracted &Mine to build a new website and a ‘real-life’ online tutorial. We found their work to be creative and technically competent, and their staff friendly, professional and flexible. We are happy to recommend them. Deborah Fullwood, Director, WestWood Spice

More Testimonials
AndMine-Google-Partner-Signature