An installable, mobile-first AI writing studio using retrieval-based voice conditioning and server-side inference.
Overview
Private AI Voice Studio generates short-form drafts in a specific personal voice. It uses curated example retrieval, prompt conditioning, and blind-tested model routing instead of generic instructions or a full archive in every request.
The result is an installable private PWA with server-side inference, protected access, local feedback, and privacy-safe source handling.
Specificity came from the system around the model—not from asking one model to “sound more personal.”
Anonymized interface / Composer and result
Create a new draft
Small systems often create the clearest progress. This week, the useful change was simple: fewer inputs, sharper decisions, and one result worth keeping.
The full writing loop, designed for mobile.
Set the context, generate a readable draft, then refine it without rebuilding the prompt. The neutral mockup uses no real source text or identifying product data.
Problem
Generic assistants produced correct but interchangeable copy. Rhythm, restraint, humor, emotional register, and publishability varied from request to request.
Better conditioning could not come at the cost of exposing private writing. The product needed a small, controlled representation of voice—not a deployed archive.
- Produce recognizable stylistic consistency without treating the entire archive as a prompt.
- Separate original author voice from duplicates, overlaps, and attributed quotations.
- Choose models through repeatable output evaluation rather than reputation.
- Make the product usable away from the development machine without moving secrets or raw data to the client.
Before
- Generic outputs
- Full archive or long prompts
- Subjective model selection
- Local-only workflow
- Unnecessary privacy risk
After
- Retrieval-conditioned drafts
- Maximum five approved anchors
- Blind six-scenario evaluation
- Private mobile PWA
- Zero raw source files deployed
Product strategy
The strategy treated voice as evidence, not intuition: a cleaned analysis corpus, approved runtime anchors, and explicit routing rules for drafting and refinement.
Curation, retrieval, evaluation, and protected functions carried the complexity. History, favorites, settings, and feedback stayed on the user’s device.
Voice-conditioning system
Cleaning left 693 distinct samples after removing 2,444 duplicates or overlaps and excluding 197 attributed quotations.
I translated the corpus into a voice taxonomy and 120 approved retrieval anchors. Each request uses at most five relevant examples, keeping prompt conditioning focused and source exposure narrow.
- Style patterns were separated from topics and identifying subject matter.
- Retrieval anchors were stripped, reviewed, and approved before runtime use.
- Generation rules described behavior without deploying raw workbooks or archives.
- Feedback could improve local preferences without silently expanding the server-side corpus.
Model evaluation
Four AI models were compared through blind review. Candidate identities were hidden, and each model received the same six scenarios and scoring dimensions. The goal was not to identify the strongest general model; it was to find the most consistent model for this specific product.
Models were judged on voice similarity, natural mixed-language writing, originality, humor, emotional accuracy, instruction following, and publishability. Routing decisions were based on consistency across scenarios—not brand reputation or benchmark claims.
Blind review matrix
Model identities hidden during scoringSix shared writing scenarios
| Candidate | Voice similarity | Natural writing | Instruction fit | Consistency | Routing decision |
|---|---|---|---|---|---|
| Candidate A | High | Default drafting | |||
| Candidate B | High | Alternate / refinement | |||
| Candidate C | Scenario-specific | Restricted intensity mode | |||
| Candidate D | Variable | Not routed |
Privacy and security
Privacy set the architecture. Raw workbooks and archives stayed outside production; runtime generation used only stripped, approved anchors and generation rules.
No raw corpus deployed
Source archives stayed outside production. Attributed quotations were excluded and only approved anchors entered runtime retrieval.
No client-side secrets
API keys and the private access credential existed only as server-side environment variables.
Protected endpoints
Private access-code authentication established a secure HTTP-only session cookie required by protected API functions.
Rate limiting failed closed
If the shared Redis dependency was unavailable, protected generation did not silently continue without rate limits.
No inference caching
The service worker did not cache API responses. Application-shell behavior remained separate from private generated content.
Sensitive text excluded
Logs excluded prompts, corpus text, private drafts, credentials, and access credentials.
Technical architecture
The application uses a narrow serverless path: authenticate, retrieve a small approved context, select a model under strict routing rules, request inference, and return the response. Device-local storage handles recent history and feedback.
Request and data flow
Local history & feedback
Authenticated session
Protected request
Maximum five examples
Draft / refine / restricted
Server-side access
Saved locally
Key features
Mobile composer
A focused short-form workflow with context, intent, tone, length, draft, and refinement controls.
Retrieval-based conditioning
Relevant approved anchors are selected per request instead of attaching a large static archive.
Tested model routing
Drafting, alternate refinement, and restricted high-intensity use follow explicit evaluation-backed routes.
Local product memory
Recent history, favorites, settings, and feedback remain on the user’s own device.
Installable PWA
The product can be installed and used as a mobile-first application independent of the development machine.
Private production controls
Authenticated sessions, protected functions, shared rate limits, and privacy-aware logs protect inference.
My role
I owned the product decisions and directed AI-assisted implementation from concept through private production launch.
Defined the product concept and scope
Designed the end-to-end user workflow
Cleaned and curated the source dataset
Created the voice taxonomy
Selected model candidates
Designed and ran blind evaluation
Set privacy and security requirements
Directed AI-assisted implementation
Configured Vercel, OpenRouter, and Upstash
Led debugging, QA, and launch
Challenges solved
- Turned a noisy archive into a defensible corpus by removing duplicates, overlaps, and attributed quotations.
- Converted stylistic intuition into a taxonomy, approved retrieval anchors, and generation rules.
- Replaced model reputation with blind, scenario-consistent scoring.
- Balanced specificity and privacy with no more than five approved examples per request.
- Moved inference and secrets behind authenticated server functions.
- Kept prompts, drafts, credentials, and source text out of logs.
Outcome
The final system turned a private writing archive into an installable mobile product without deploying the raw corpus. Production health, authentication, rate-limit, PWA, syntax, and bundle-security checks passed.