Skip to content
CDO On-Demand
← All case studies

Keeping AI characters in character across long, unscripted conversations

The product lets people rehearse difficult conversations with a video avatar that stays in role and then drops character to coach them. Holding that persona steady across long unscripted exchanges is the hard engineering problem, and proving it holds is harder still. The work produced the prompt architecture, the evaluation harness, and the fine-tuned models that made both tractable.

Client
AI product startup
Engagement
AI engineering lead, five-person team

Team standard

Prompt architecture adopted across the engineering team

3 models

Benchmarked on fidelity, realism, adherence, and feedback quality

Lower cost

Fine-tuned small models cut token spend and improved hardware performance

The situation

The product gives people a way to rehearse conversations they cannot easily practice anywhere else. A nurse preparing for a dementia care discussion, a law enforcement officer working through de-escalation, a candidate rehearsing for an interview, or a financial advisor preparing a difficult client conversation can each hold the exchange with an AI avatar, and then ask the avatar to step out of role and give feedback on what went well and what to change.

The engineering challenge sits in that first part. An avatar that drifts out of character, forgets the storyline, or starts freelancing advice destroys the training value of the exercise. Holding a persona steady across long unscripted multi-turn conversations is difficult, and demonstrating that it holds reliably is more difficult still.

The approach

Prompt architecture for variance control. The central work was designing prompt structures that constrain model variance enough to hold character fidelity, tone, and realism across extended conversations that follow no script. These were published as best practice and adopted as the standard for a team of junior engineers.

A measurable evaluation discipline. A statistical test-analysis suite captured results across many interactions and isolated which prompt features improved outcomes and which degraded them. The suite began in a spreadsheet and moved to a local database as the volume grew. Alongside it, a config-driven evaluator checked adherence to the guidelines, flagged violations and storyline inconsistencies, and recommended corrections, with the guidelines themselves editable through configuration rather than code.

Local development and benchmarking. An application replicating the conversational behavior without the image or audio layers allowed development and regression testing against locally hosted models rather than burning API spend. That same harness supported benchmarking Gemma 2, Llama 3, and Qwen 2.5 on character fidelity, avatar realism, instruction adherence, and feedback quality.

Fine-tuning for cost and fidelity. A workflow starting from smaller open-weight bases produced character-specific models that held fidelity and delivered a realistic experience while improving hardware performance and reducing token cost.

The outcome

The prompt architecture became the team standard, which mattered more than any single conversation quality improvement because it made the whole team’s output more consistent. The evaluation tooling turned prompt engineering into a discipline with measurements attached rather than a matter of individual judgment. The fine-tuned character models improved the unit economics of a product whose gross margin depends directly on cost per conversation.

What made it work

Building the measurement before scaling the prompts. Without a way to tell which prompt changes helped and which quietly hurt, a team of engineers iterating in parallel will produce drift rather than improvement, and nobody will be able to say when it started.

Why this is relevant to you

Business, technical, and program together.

The business lens

The product serves nurses rehearsing dementia care conversations, officers practicing de-escalation, and advisors preparing for difficult client discussions. If the avatar breaks character or coaches badly, the training value collapses and so does the customer relationship. Persona stability was therefore a product requirement rather than a technical nicety.

The technical work

Holding character across long unscripted multi-turn conversations means controlling model variance, which is a prompt architecture problem before it is a model selection problem. Proving it holds required a statistical suite measuring which prompt features improved fidelity and which degraded it, turning prompt work from taste into something measurable.

Program and organization

Working as AI engineering lead on a five-person team meant the output had to be usable by junior engineers rather than only by its author. The prompt best practices were published as team standard, and the evaluation tooling was built config-driven so guidelines could change without touching code.

Services

Prompt architectureEvaluation harnessesModel fine-tuning

Stack

OllamaGemma 2Llama 3Qwen 2.5Claude CodeGoogle Antigravity

Have a similar problem?

If that resembles the situation in your own organization, a short call is the quickest way to establish whether the same approach would apply to you.