Feedback on Coding Logic

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 (4×4, 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.

  • Example Boolean Checklist:
  • Manufacturer: True
  • Model: True
  • Year: False
  • Engine Type: True
  • Transmission: False
  • Drive Train: True

Concerns & Questions

  1. Is this an effective way to track missing data in a real-time call scenario?
  2. 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.
  3. The app sometimes forgets a related subcategory.
    • Example: It asks if the car is Electric and if it has a Single-Speed Transmission, but it forgets to ask if it’s Dual Motor.
  4. It sometimes skips completely unrelated categories.
    • Example: It gathers all powertrain info but forgets to ask about leather seats. Would a Boolean Checklist help prevent this?

submitted by /u/rismail88
[link] [comments]

from Software Development – methodologies, techniques, and tools. Covering Agile, RUP, Waterfall + more! https://ift.tt/ZkOK9iQ

Leave a comment

Design a site like this with WordPress.com
Get started
search previous next tag category expand menu location phone mail time cart zoom edit close