Building and Scaling an LLM-Powered Query Assistant in Production

honeycomb · Tech · 2023 · source Agentic: no · promotional bias: low · source-backed · extracted with prompt 0.5.5 (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: Observability query onboarding

Honeycomb needed new users to translate natural-language questions and mental models of service behavior into Honeycomb query objects, because difficulty learning the query interface slowed activation, retention, and the path to paid usage.

Constraints:

Architecture

Honeycomb built Query Assistant as a natural-language-to-Honeycomb-query feature. The system uses GPT-3.5-turbo for query object generation and text-embedding-ada-002 plus Redis-stored dataset schema embeddings for context. The team chose GPT-3.5 over GPT-4 after prompt engineering for cost and latency, aggressively reduced prompt size under the original 90k tokens/minute rate limit, captured user inputs, LLM outputs, errors, and metadata, and used production data plus SLOs to iterate. Query Assistant emits intentionally expressive queries, incorporates existing-query context for modifications, and added team-defined Suggested Queries after customer feedback exposed schema-specific shortcomings.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  query-assistant-ui[Query Assistant UI] --> prompt-builder[Prompt builder]
  prompt-builder --> schema-embedding-store[Schema embedding store]
  embedding-model[Embedding model] --> schema-embedding-store
  prompt-builder --> gpt-3-5-query-generator[GPT-3.5 query generator]
  gpt-3-5-query-generator --> honeycomb-query-runner[Honeycomb query runner]
  honeycomb-query-runner --> query-assistant-ui
  query-assistant-ui --> feedback-widget[Feedback widget]
  feedback-widget --> production-analysis-pipeline[Production analysis pipeline]
  production-analysis-pipeline --> slo-monitoring[SLO monitoring]
  slo-monitoring --> iteration-process[Iteration process]
  production-analysis-pipeline --> iteration-process
  iteration-process --> prompt-builder
  suggested-queries[Suggested Queries] --> prompt-builder
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Query Assistant UI Product surface below the Query Builder where users enter natural-language requests and receive generated queries. Prompt builder, Honeycomb query runner, Feedback widget
Prompt builder Builds compact GPT prompts from the user's natural-language input, existing query context, dataset schema context, and instructions. Query Assistant UI, Schema embedding store, GPT-3.5 query generator
Schema embedding store Redis-backed vector store holding dataset schema embeddings generated with text-embedding-ada-002. Prompt builder, Embedding model
Embedding model text-embedding-ada-002 model used for schema embedding operations. Schema embedding store
GPT-3.5 query generator Primary LLM that converts natural-language requests and context into Honeycomb Query objects. Prompt builder, Honeycomb query runner
Honeycomb query runner Runs generated Honeycomb queries and helps users transition into manual querying. Query Assistant UI, GPT-3.5 query generator
Feedback widget Captures helpfulness signals and user feedback about generated queries. Query Assistant UI, Production analysis pipeline
Production analysis pipeline Systematic analysis of user inputs, model outputs, errors, metadata, SLOs, usage, and activation metrics. Feedback widget, SLO monitoring, Iteration process
SLO monitoring Monitors real-world behavior over time as a regression guard for nondeterministic LLM behavior. Production analysis pipeline, Iteration process
Suggested Queries Team-defined examples used to guide the model for custom schemas and field names. Prompt builder
Iteration process Rapid product and prompt updates, sometimes daily, informed by production data and customer feedback. Production analysis pipeline, Prompt builder

Data flow

A user types a natural-language request into Query Assistant, possibly with an existing Honeycomb query already in context. The product builds a prompt with the user's dataset context and schema embeddings from Redis, sends it to GPT-3.5-turbo, and receives a Honeycomb Query object rather than verbose prose. The generated query runs in Honeycomb, user feedback marks results helpful or not, and Honeycomb captures the input, output, errors, and metadata for later analysis. Production observations, SLOs, and customer feedback then inform prompt updates, Suggested Query integration, onboarding/discoverability changes, and daily iteration when needed.

3 supporting quotes
“If a machine can turn natural language into something else (in our case, a Honeycomb Query object), maybe it can help new users familiarize themselves with querying their data in Honeycomb”article, stated
“You need to capture user inputs, LLM outputs, and important metadata about those interactions”article, stated
“Their feedback was particularly influential towards one of the capabilities we baked into Query Assistant that pulls in team-defined Suggested Queries”article, stated

Why this architecture

Honeycomb used an LLM because the hard problem was translating each user's unique natural language and schema context into a Honeycomb Query object, not matching a fixed command. The team chose to ship quickly because nondeterministic LLM features only reveal real input/output behavior in production. GPT-3.5-turbo was kept for production because prompt engineering made it reliable enough at far lower cost than GPT-4, while embeddings and Suggested Queries gave the prompt schema-specific context. SLOs replaced deterministic regression tests as the guardrail for behavior changes.

4 supporting quotes
“We learned quickly that we stood no chance at predicting the variety of inputs users would provide in natural language against their data.”article, stated
“very quickly, adopting a “ship to learn” mindset. We believe that if you’re building with LLMs, you must ship early and often. You can’t debug or unit test LLMs in the traditional sense because they’re nondeterministic black boxes. You need to [capture user inputs, LLM outputs, and important”article, stated
“Even if we switched to GPT-4—which we won’t, due to GPT-3.5 performing very well—it would still cost us less than $1k per month.”article, stated
“Since you can’t write a regression test like you would with most software, you need a tool like an SLO to monitor your changes based on real-world data.”article, stated

Models used: GPT-3.5-turbo · text-embedding-ada-002 · GPT-4

Scale

— article, stated

— article, stated

— article, stated

Alternatives considered (roads not taken)

Perfect the feature before launch with traditional tests

Rejected because: Honeycomb could not predict user inputs, LLM responses, or user-specific contextual data, so production learning was necessary.

“We also had no way to predict how the LLM would respond to these inputs and contextual data that differs for every user. So we shipped very quickly, adopting a “ship to learn” mindset.”article, stated

Traditional unit/regression tests as the main LLM quality guard

Rejected because: LLMs are nondeterministic black boxes, so Honeycomb used captured production data and SLOs instead.

“You can’t debug or unit test LLMs in the traditional sense because they’re nondeterministic black boxes. You need to [capture user inputs, LLM outputs, and important”article, stated
“Since you can’t write a regression test like you would with most software, you need a tool like an SLO to monitor your changes based on real-world data.”article, stated

Use GPT-4 in production

Rejected because: GPT-3.5 performed well enough after prompt work and was much cheaper.

“Even if we switched to GPT-4—which we won’t, due to GPT-3.5 performing very well—it would still cost us less than $1k per month.”article, stated

Optimize only for experienced users by hiding Query Assistant below the Query Builder

Rejected because: Free-tier adoption underperformed because many users did not notice the feature, so Honeycomb adjusted onboarding and nurture emails.

“a lot of people didn’t even notice Query Assistant existed, even though it’s right below the Query Builder UI.”article, stated
“we changed our initial product onboarding and “nurture” email campaign for new users to let people know that Query Assistant is a great way to get started querying in Honeycomb.”article, stated

Patterns

structured-output-contract (interface)

Query Assistant outputs a Honeycomb Query object rather than free-form prose, making the LLM response directly executable in the product.

“If a machine can turn natural language into something else (in our case, a Honeycomb Query object), maybe it can help new users familiarize themselves with querying their data”article, stated

eval-driven-development (quality)

Honeycomb used production interaction capture, systematic analysis, SLOs, and activation metrics as the quality loop for nondeterministic LLM behavior.

“capture user inputs, LLM outputs, and important metadata](https://www.honeycomb.io/blog/improving-llms-production-observability#triplets_of_user_input_llm_response_and_error) about those interactions and systematically analyze them”article, stated
“using Service Level Objectives (SLOs) to monitor changes over time to make sure you’re fixing problems in your user experience without regressing behavior that already worked.”article, stated

observability-tracing (operations)

The team treated user input, model response, errors, and metadata as production observability signals for the LLM feature.

“You need to capture user inputs, LLM outputs, and important metadata about those interactions”article, stated

rag-retrieval (context)

Query Assistant uses embeddings for dataset schemas and pulls in Suggested Queries to guide the model for custom field names.

“we store embedding vectors for dataset schemas in a Redis cluster in AWS.”article, stated
“pulls in team-defined Suggested Queries as a way to guide the model towards more accuracy”article, stated

cost-aware-routing (model-operations)

Honeycomb engineered prompts so GPT-3.5-turbo could handle the production task instead of relying on GPT-4.

“We spent a lot of time reducing the size of our prompt because OpenAI’s rate limits at time of launch (90k tokens per minute) were a big concern for us.”article, stated
“Even if we switched to GPT-4—which we won’t, due to GPT-3.5 performing very well—it would still cost us less than $1k per month.”article, stated

data-quality-loop (product-feedback)

Detailed customer feedback, especially from Intercom, directly shaped model context through team-defined Suggested Queries.

“One customer in particular, Intercom, gave us extremely detailed feedback on the kinds of queries they’d ask and how Query Assistant was falling short of expectations.”article, stated

Tradeoffs

Development strategy

Chose ship-to-learn with production data over traditional pre-launch perfection.

Rationale: The team could not predict user inputs or LLM outputs, so the only reliable feedback came from real interactions.

“So we shipped very quickly, adopting a “ship to learn” mindset. **We believe that if you’re building with LLMs, you must ship early and often.”article, stated
“We believe that if you’re building with LLMs, you must ship early and often.”article, stated

Quality guardrail

Chose SLO-based monitoring on real production behavior over deterministic regression tests.

Rationale: SLOs can detect behavior drift in nondeterministic outputs where fixed unit tests are inadequate.

“Since you can’t write a regression test like you would with most software, you need a tool like an SLO to monitor your changes based on real-world data.”article, stated

Model choice

Chose GPT-3.5-turbo over GPT-4 for production query generation.

Rationale: Prompt engineering made GPT-3.5 reliable enough while keeping monthly costs tiny.

“On average, our monthly OpenAI bill is… $30. Even if we switched to GPT-4—which we won’t, due to GPT-3.5 performing very well—it would still cost us less than $1k per month.”article, stated

Query Assistant output style

Chose often emit more complex queries over only simplest possible queries.

Rationale: Complex WHERE and GROUP BY clauses taught users that the Honeycomb interface was flexible and helped them graduate to manual querying.

“We designed Query Assistant to often emit more “complex” queries—usually in the form of several groupings—to teach users that our querying interface is flexible.”article, stated

UI placement

Chose place Query Assistant below Query Builder over moving the query UI around for maximum AI discoverability.

Rationale: The team wanted discoverability for new users while staying out of existing users' way, though later data showed this hurt awareness.

“We initially thought that placing it below the UI was the right compromise between discoverability for new users and staying out of the way for existing users.”article, stated

Gotchas (what bit them)

LLM inputs and outputs could not be predicted up front.

Root cause: Every user's natural language and contextual dataset differed, and the model's response to that combination was nondeterministic.

Resolution: Ship early, capture real interactions, and iterate from production data instead of waiting for full pre-launch certainty.

“We learned quickly that we stood no chance at predicting the variety of inputs users would provide in natural language against their data.”article, stated

Traditional regression tests did not fit the LLM feature.

Root cause: LLMs are nondeterministic black boxes rather than deterministic functions.

Resolution: Use SLOs over real-world data to monitor whether changes fix problems without regressing working behavior.

“If you don’t change your software engineering practices, you’ll be stuck forever with something too unpredictable and unreliable.”article, stated

Discoverability undercut free-tier adoption.

Root cause: Placing Query Assistant below the Query Builder kept it out of the way but made many users miss it.

Resolution: Change onboarding and nurture email campaigns to explain Query Assistant as a way to start querying.

“When digging into why, we found that a lot of people didn’t even notice Query Assistant existed, even though it’s right below the Query Builder UI.”article, stated

Provider latency made early production requests timeout.

Root cause: At launch, GPT-3.5 average latency was about five seconds and P99 was 30 seconds or more.

Resolution: Rely on provider infrastructure improvements and continue monitoring latency; by October average duration halved and P99 fell several times.

“The average request to GPT-3.5-turbo took about five seconds, but our P99 was measured in 30 seconds or higher. We’d often time out requests as a result.”article, stated

Custom field names caused model misses for customer schemas.

Root cause: Schemas can encode domain-specific names that the base prompt does not naturally understand.

Resolution: Pull team-defined Suggested Queries into the context so the model has schema-local guidance.

“guide the model towards more accuracy for schemas with highly custom field names like theirs.”article, stated

Evaluation

Honeycomb evaluated Query Assistant through production interaction capture, SLOs, pricing-tier adoption, manual-query retention, complex-query creation, Board and Trigger creation, Query Assistant retention, helpfulness feedback, customer feedback, and operating-cost/latency monitoring.

Metrics: active teams using Query Assistant by pricing plan · manual querying retention over several weeks · complex query creation · Board creation · Trigger creation · Query Assistant retention · helpfulness feedback · OpenAI API cost · average latency · P99 latency

“To measure the effectiveness of Query Assistant, we looked at several metrics for new teams created after we shipped the feature.”article, stated
“The final hard measure that we track is people sticking with Query Assistant itself.”article, stated

Outcomes

The feature was released to all customers about a month after concept, then iterated from production data; operational cost was only a few hundred dollars per month including Redis.

3 supporting quotes
“ultimately took Query Assistant out of experimentation and turned it into a core product offering.”article, stated
“Paired with our observation that teams who use Query Assistant query manually more often, it’s our belief that users tend to “graduate” from Query Assistant and stick with manual querying.”article, stated
“Query Assistant produced a runnable Honeycomb query for every kind of expression like this. Furthermore, sometimes the user would mark the result as helpful in our product feedback widget.”article, stated