Dynamic LLM Selection and Prompt Optimization Through Automated Evaluation and User Feedback

beekeeper · Tech · 2026 · source Agentic: no · promotional bias: high · 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: Tech

Beekeeper needed a way to keep model and prompt choices current as LLM quality, prices, and requirements changed across frontline-worker use cases.

Constraints:

Architecture

Beekeeper built a two-phase LLMOps control plane for chat summarization. A scheduled baseline phase tests model/prompt pairs against synthetic and annotated data, scores them on quality, latency, and cost, sends a statistical sample to human validation, mutates promising prompts, and stores winners on a leaderboard. A feedback phase takes production user feedback, fetches ranked model/prompt pairs, creates personalized prompt variants, gates them with drift detection against the baseline, and saves safe variants for specific users or tenants. Runtime requests are routed to the current top leaderboard choices rather than a single fixed model/prompt.

Diagram confidence: explicit (topology described by the source).

flowchart LR
  eventbridge-scheduler["eventbridge-scheduler"] --> coordinator["coordinator"]
  coordinator --> model-prompt-evaluators["model-prompt-evaluators"]
  model-prompt-evaluators --> amazon-bedrock["amazon-bedrock"]
  model-prompt-evaluators --> mechanical-turk-validation["mechanical-turk-validation"]
  model-prompt-evaluators --> leaderboard-store["leaderboard-store"]
  leaderboard-store --> request-router["request-router"]
  coordinator --> prompt-mutator["prompt-mutator"]
  prompt-mutator --> amazon-bedrock
  prompt-mutator --> drift-detector["drift-detector"]
  drift-detector --> personalized-prompt-store["personalized-prompt-store"]
  personalized-prompt-store --> request-router
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
eventbridge-scheduler Schedules recurring evaluation cycles that keep the model/prompt leaderboard fresh. coordinator
coordinator Fetches test data, distributes model/prompt pairs to evaluators, and later sends ranked candidates plus user feedback to the mutator. eventbridge-scheduler, model-prompt-evaluators, prompt-mutator, leaderboard-store
model-prompt-evaluators Generate summaries for each model/prompt pair and score them with static checks and cross-LLM checks. coordinator, amazon-bedrock, mechanical-turk-validation, leaderboard-store
amazon-bedrock Provides the model access layer for Nova, Claude, Llama, Mistral, and other models behind a shared API. model-prompt-evaluators, prompt-mutator, drift-detector
mechanical-turk-validation Human-validates a statistical sample of automated evaluation outputs to catch evaluator drift and double hallucination. model-prompt-evaluators
leaderboard-store Stores scores and ranks model/prompt pairs for routing and mutation selection. coordinator, model-prompt-evaluators, request-router
prompt-mutator Uses LLMs plus mutation instructions, feedback, thinking style, and user context to create candidate prompt variants. coordinator, amazon-bedrock, drift-detector
drift-detector Compares personalized prompt variants against the baseline and rejects changes that undermine model work or quality standards. prompt-mutator, amazon-bedrock, personalized-prompt-store
personalized-prompt-store Persists validated user- or tenant-specific prompt variants after drift checks pass. drift-detector, request-router
request-router Routes production summarization requests to the currently ranked model/prompt choices. leaderboard-store, personalized-prompt-store

Data flow

A scheduler starts the synthetic rank creator, which fetches test data and sends model/prompt pairs to evaluators. Evaluators generate summaries and run static and LLM-based checks, while a sample goes to Mechanical Turk for human validation. Scores update the leaderboard, the best prompt/model pairs are mutated and re-evaluated, and the winners are used in production traffic splits. When user feedback arrives, the coordinator sends the ranked pairs and feedback to a mutator; drift detection compares the personalized variant against the baseline before saving it for that user or tenant.

4 supporting quotes
“The workflow begins with a synthetic rank creator that establishes baseline performance. A scheduler triggers the coordinator, which fetches test data and sends it to evaluators.”article, stated
“These evaluators test each model/prompt pair and return results, with a portion sent for manual validation. The system mutates promising prompts to create variations, evaluates these again, and saves the best performers.”article, stated
“When user feedback arrives, the system incorporates it through a second phase. The coordinator fetches ranked model/prompt pairs and sends them with user feedback to a mutator, which returns personalized prompts.”article, stated
“A drift detector makes sure these personalized versions don’t stray too far from quality standards, and validated prompts are saved for specific users.”article, stated

Why this architecture

The design treats model/prompt choice as a continuously changing optimization problem rather than a release-time decision. Beekeeper wanted to balance quality, latency, and cost while letting small teams test new models, personalize per tenant, and avoid prompt feedback corrupting the baseline. The leaderboard gives a routing surface, statistical human review checks whether automated evaluators remain trustworthy, and drift detection keeps personalization from becoming uncontrolled prompt injection or quality regression.

4 supporting quotes
“Choosing the “right” LLM and prompt isn’t a one-time decision—it shifts as models, prices, and requirements change.”article, stated
“The result is a constantly-optimizing setup that balances quality, latency, and cost—and adapts automatically when the landscape changes.”article, stated
“If the number detected by human verification diverges by more than two percentage points from their estimations, they know that the automated process isn’t working properly and needs revision.”article, implied
“However, they don’t want user feedback to fully change the behavior of their model through prompt injection in feedback.”article, implied

Models used: Amazon Bedrock · Amazon Nova · Anthropic Claude 4 Sonnet · Meta Llama 3 · Mistral 8x7B · Mistral Large · Anthropic Claude · Qwen3 embeddings

Scale

Alternatives considered (roads not taken)

Treating model/prompt choice as a one-time manual decision

Rejected because: Models, prices, requirements, and prompt complexity change over time, so a static decision would become stale.

“Choosing the “right” LLM and prompt isn’t a one-time decision—it shifts as models, prices, and requirements change.”article, stated

Letting engineers manually re-benchmark and update prompts

Rejected because: The system is designed to automatically evaluate, rank, and evolve prompts so teams can focus on the feedback-driven setup instead of manual re-benchmarking.

“Instead of manually updating prompts or re-benchmarking models, focus on creating a feedback-driven system that continuously improves results for your users.”article, stated

Applying every user feedback item directly to future prompts

Rejected because: Beekeeper first checks whether feedback is still applicable and then uses drift detection so personalization does not undermine the baseline.

“They use this to check whether the feedback provided is still applicable after the prompt-model pair was updated. This works as a baseline for incorporating user feedback.”article, stated
“The mutation process consists of reevaluating the user generated dataset after prompt mutation until the output incorporates the user feedback, then we use the baseline to understand differences and discard changes”article, stated

Manually reviewing every generated summary

Rejected because: They use a statistically determined Mechanical Turk sample instead, giving a human check without making evaluation prohibitively expensive or slow.

“Rather than evaluating every output manually (which would be prohibitively expensive and slow), they use statistical sampling based on Cochran's formula to determine the minimum sample size needed for significance.”summary, stated

Patterns

eval-driven-development (evaluation)

Model/prompt candidates are continuously tested with synthetic data and production feedback before routing decisions are made.

“continuously evaluates model+prompt candidates, ranks them on a live leaderboard”article, stated

model-routing (model-operations)

Requests are routed to the current best model/prompt pair for the use case, based on leaderboard results.

“routes each request to the current best choice for that use case.”article, stated

data-quality-loop (feedback)

User feedback drives prompt mutation, then drift detection gates personalized variants before they are saved.

“A drift detector makes sure these personalized versions don’t stray too far from quality standards, and validated prompts are saved for specific users.”article, stated

Tradeoffs

Validate automated evaluators with a statistical human sample rather than reviewing every output.

Chose 7% Mechanical Turk validation based on statistical sampling over manual review of every evaluation output.

Rationale: The sample catches automated-evaluator drift and double hallucination while avoiding the cost and latency of full manual review.

“Another important point is the presence of manual verification on a small set of evaluations at Beekeeper, to avoid cases of double hallucination.”article, stated
“For the whole pipeline, they use the same heuristic of 7% manual evaluation”article, stated

Use a leaderboard traffic split instead of routing all requests to the single current winner.

Chose 50/30/20 traffic across the top three model/prompt pairs over 100% production traffic to one model/prompt pair.

Rationale: The split still favors the best-ranked option while keeping alternate high-performing choices in production as the model landscape changes.

“Newly selected model/prompt pairs are used in production with ratios 1st: 50%, 2nd: 30%, and 3rd: 20%.”article, stated
“By continuously evaluating and optimizing quality, size, speed, and cost, the solution helps customers use the best-performing model/prompt combinations for their specific use cases.”article, implied

Gotchas (what bit them)

Prompt and model optimization is not a one-time setup task.

Root cause: Models, prices, prompts, and business requirements change over time.

Resolution: Beekeeper continuously evaluates candidates and updates routing from a live leaderboard.

“Choosing the “right” LLM and prompt isn’t a one-time decision—it shifts as models, prices, and requirements change.”article, stated

Evaluation

Synthetic test data is used for baseline scoring and user feedback validates production quality.

Metrics: quality · latency · cost · thumbs up/down

“Quality is scored with a small synthetic test set and validated in production with user feedback (thumbs up/down and comments).”article, stated

Outcomes

The source describes a constantly optimizing setup rather than a one-off experiment.

“This approach resulted in 13-24% better ratings on responses when aggregated per tenant, reduced manual labor in model selection, and enabled rapid adaptation to new models and user preferences.”summary, stated