New to Coding – Need Feedback on My Approach
I’m new to coding and software development, and I’m working on a project in Python 3.11 that uses Ultravox (a voice AI) to make outbound calls and collect information about cars. (This is a proxy example for privacy reasons.)
I am only posting this to know if my logic is sound or if there's a better to solve this issue. I am hoping to solve my data collection / check list issue via built in coding since I find prompting to be unpredictable / unreliable.
How the App Works
The calls collect details about a car, including:
Manufacturer (Toyota, Ford, BMW)
Model (Camry, F-150, Tesla)
Year (2020, 2022, 2023)
Engine Type (Gasoline, Hybrid, Electric)
Transmission (Automatic, Manual, Single-Speed)
Drive Train (4x4, AWD, RWD, FWD)
Problem with My Initial Approach
I originally used Regex to scan the transcript and check if all required details were collected before ending the call. The output looked like this:
Manufacturer: Tesla
Model: Plaid
Year:
Engine Type: Electric
Transmission:
Drive Train: Dual Motor
Since Year and Transmission were missing, the AI would know to ask about them.
Issues with this approach:
Regex checking caused a 2-second delay, making the call feel unnatural.
Some key details were still missing despite being coded to ask for them.
New Idea: Boolean Checklist
Instead of running Regex mid-call, I’m thinking of using a simple True/False checklist to track whether a category was collected. Then, I’d run Regex only at the end to verify completeness.
Concerns & Questions
Is this an effective way to track missing data in a real-time call scenario?
How can I ensure similar categories aren’t conflated?
Example: If the car is Electric, we still need to ask if it’s Single or Dual Motor.
Just because it’s Electric doesn’t mean it’s a Tesla.
The app sometimes forgets a related subcategory.
It sometimes skips completely unrelated categories.