Building a Voice Assistant with Open Source LLMs: From Demo to Production

weights_&_biases · Tech · 2023 · source Agentic: yes · promotional bias: low · source-backed · extracted with prompt 0.5.4 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: LLMOps productionization

Weights & Biases used a custom voice assistant to demonstrate that moving from an impressive LLM demo to production requires exact outputs, low latency, reproducibility, and evaluation-driven iteration.

Constraints:

Architecture

The assistant combines Whisper speech recognition, a local Llama/Mistral-style model run through llama.cpp, Python-like function-call generation, and a skill library for music, weather, math, and news. The productionization loop used Weights & Biases experiment tracking, evaluation sets, prompt engineering, model swaps, synthetic example generation, and QLoRA fine-tuning.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  voice-user[Voice User] --> whisper-transcription[Whisper Transcription]
  whisper-transcription --> local-function-calling-model[Local Function Calling Model]
  llama-cpp[llama.cpp] --> local-function-calling-model
  local-function-calling-model --> skill-functions[Skill Functions]
  skill-functions --> external-apis[External APIs]
  synthetic-training-data[Synthetic Training Data] --> local-function-calling-model
  local-function-calling-model --> evaluation-framework[Evaluation Framework]
  evaluation-framework --> experiment-tracker[Experiment Tracker]
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Voice User Person issuing spoken assistant commands. Whisper Transcription
Whisper Transcription Speech-to-text layer for converting audio to text. Voice User, Local Function Calling Model
Local Function Calling Model Open-source LLM that maps transcribed text to exact Python-like skill calls. Whisper Transcription, Skill Functions, Evaluation Framework
llama.cpp Local inference runtime for running Llama/Mistral-style models on cheap hardware and MacBooks. Local Function Calling Model
Skill Functions Weather, music, math, news, and other API-backed functions. Local Function Calling Model, External APIs
External APIs Services called by assistant skills to fulfill requests. Skill Functions
Evaluation Framework Accuracy checks and eval sets that compare prompts, models, and fine-tuned variants. Local Function Calling Model, Experiment Tracker
Experiment Tracker Weights & Biases tracking for reproducibility and collaboration. Evaluation Framework
Synthetic Training Data Examples generated from a larger model and filtered for fine-tuning. Local Function Calling Model, Evaluation Framework

Data flow

Speech is transcribed, the local LLM converts the text into a structured function call, the selected skill executes against an API, and accuracy/latency/results are logged. When errors appear, the team updates prompts, switches models, adds examples, fine-tunes, and compares metrics instead of trusting demos.

3 supporting quotes
“understanding the speech and then getting the natural language into an API call so kind of a simple architecture here right so the weather comes in you ask what's weather in Boston it goes through an on device LM to translate it to kind of python looking code that says”transcript, stated
“you ask what's weather in Boston it goes through an on device LM to translate it to kind of python looking code”transcript, stated
“prompt engineering works really well especially when you start start with a terrible prompt and then fine-tuning improves the performance at the end”transcript, stated

Why this architecture

The system needed local, fast, open-source inference and exact function-call outputs. The development process needed external experiment tracking because the real production asset was the learning across failed and successful experiments.

3 supporting quotes
“software development process which I love is a linear process you you you add features you add code and generally things improve over time and the AI process is experimental almost all the things that you do when you're using an llm is is trying it”transcript, stated
“the AI process is experimental almost all the things that you do when you're using an llm is is trying it seeing what happens”transcript, stated
“reproducibility matters right you don't really save your IP you don't save your learnings if you can't reproduce your learnings”transcript, stated

Models used: Whisper · Llama 2 · Llama chat · Mistral · ChatGPT · QLoRA fine-tuned model

Scale

Alternatives considered (roads not taken)

Default prompt with Llama 2

Rejected because: It produced 0% accuracy for exact code/function-call output.

“went with um llama 2 at the time and put it in a default prompt and it didn't work 0% accuracy and so every kind of customer goes through this journey to try to improve the accuracy or whatever the real kind of user facing metric is I'll tell you briefly about my journey”transcript, stated

Stop after prompt engineering at 75% accuracy

Rejected because: The system was still too annoying to use in practice.

“75% accuracy is incredibly annoying it it it's it's still not um it's still not going to they're going to work well”transcript, stated

Rely on vibes for model/prompt changes

Rejected because: Vibes cannot resolve whether an apparent change is a measurable improvement.

“you can't release a V2 right because what happens is unlike in software development where you're typically adding features and mostly moving forward”transcript, stated

Build each step fully before showing users

Rejected because: The speaker calls this an enterprise anti-pattern that delays end-user feedback.

“people kind of want to build the first step and kind of nail that and then build the second step and they kind of never get something into the hands of the end user”transcript, stated

Patterns

eval-driven-development (productionization)

The project used accuracy measurements to decide prompt, model, and fine-tuning changes instead of relying on vibes.

“doing evaluation is so critical because you can't you can't improve any these other things”transcript, stated

structured-output-contract (tool calling)

The assistant required the LLM to produce exact Python-looking function-call syntax for skills.

“has to look like that because it's going to call that function on the weather skill that I wrote”transcript, stated

fine-tuning-adaptation (model adaptation)

QLoRA fine-tuning on generated examples produced the final improvement to 98% accuracy.

“I was able to run Q on my GPU in my basement this runs on kind of standard Hardware”transcript, stated

synthetic-data-generation (data)

A larger model generated a couple thousand examples from manually created seeds.

“in you know 15 minutes I have um a couple thousand examples to find tunon”transcript, stated

observability-tracing (reproducibility)

Weights & Biases tracking preserved failed experiments and learnings so teammates could continue from them.

“if I gave this to a colleague and they tried to iterate off on top of it they would if they just saw this talk here they wouldn't realize all the things that I tried that failed”transcript, stated

latency-optimization (inference)

The system favored small local models because voice assistant latency was central to usability.

“if that takes longer than a couple hundred milliseconds it's incredibly painful”transcript, stated

Tradeoffs

Productionization strategy

Chose Lightweight prototype plus end-user feedback over Enterprise-style step-by-step perfection before users see anything.

Rationale: The speaker observed teams failing by never getting early versions into users' hands.

“starting with a lightweight prototype”transcript, stated
“incorporating end user feedback in lots of different ways is is critical”transcript, stated

Model evolution

Chose Switch from Llama 2 to Mistral when a better model appeared over Continue optimizing the original model only.

Rationale: A same-API model switch gave a small but measurable free improvement.

“if you ready to switch the models quickly you can get free accuracy improvements as as new models come out”transcript, stated

Evaluation design

Chose Application-specific evals and metrics over Generic advice about whether to use RAG, fine-tuning, or prompt engineering.

Rationale: The right technique should be answerable by the system's own evaluation framework.

“it shouldn't take you very long to have an answer for yourself for your own application um if one of these techniques works or not”transcript, stated

Gotchas (what bit them)

Stakeholders may over-trust compelling demos.

Root cause: AI demos can appear astonishing while hiding the distance to production reliability.

Resolution: Expose the system to users early, measure accuracy, and build evals before shipping.

“you can make just an absolutely astonishing demo and it's so much further from production than we're used to”transcript, stated

Prompt/model changes can improve some cases while regressing others.

Root cause: LLM changes are experimental and non-deterministic rather than monotonic software improvements.

Resolution: Use eval sets that reveal the difference between competing model/prompt versions.

“any of these new things that you try are going to make some things better and some things worse”transcript, stated

Reproducibility is difficult but necessary for AI IP preservation.

Root cause: Humans forget to write down every prompt, workflow, and failed experiment.

Resolution: Track experiments passively with outside processes.

“you can't rely on humans to write everything down no matter how much they want to they're going to forget”transcript, stated

Fine-tuning requires a dataset, not just intent.

Root cause: QLoRA is tractable, but the model needs enough good examples.

Resolution: Manually seed examples and use a larger model to generate/filter thousands more.

“but you need the data set so I manually created a couple examples here”transcript, stated

Evaluation

The talk recommends layered evaluation: must-never-fail tests, fast 20-30 second iteration checks, larger nightly eval suites, and metrics correlated to the actual user experience. The voice assistant itself measured function-call accuracy across prompt/model/fine-tuning variants.

Metrics: Function-call accuracy · Latency · Must-never-fail cases · Fast eval runtime · Nightly eval pass/fail · Metric correlation with user experience · Number of tracked experiments

3 supporting quotes
“these are things we can never get wrong and we want to have like 100% in this simple test”transcript, stated
“they can kind of run it in real time they can test something new in 20 or 30 seconds”transcript, stated
“much bigger valuations tests that run nightly and give feedback”transcript, stated

Outcomes

This row shares the same source as the home-project case study; it is a conference example used to generalize LLMOps practices.

“lomama to check um there's so many models to try these days”transcript, stated
“what are the lessons you know people come to me now every day asking hey you know how do I get llm apps from demo into production”transcript, stated