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

31 Oct. 0204 - - Total Reads 1,310

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

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

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

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