The Hidden Complexities of Building Production LLM Features: Lessons from Honeycomb's Query Assistant

honeycomb · Tech · 2024 · source Agentic: no · promotional bias: low · source-backed · extracted with prompt 0.5.6 (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 assistance

Honeycomb wanted a production natural-language Query Assistant that could translate plain English into structured observability queries while dealing with large customer schemas, latency, security, and compliance constraints.

Constraints:

Architecture

Honeycomb built Query Assistant as a focused text box and button in its standard query interface. It assembles prompt context from user input, Honeycomb query structure, domain knowledge, customer schemas, examples, and existing query state; sends that prompt to an LLM; parses and validates the response; then corrects what it can before executing through Honeycomb's query engine.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  honeycomb_query_ui["Honeycomb query UI"] --> prompt_assembly_service["Prompt assembly service"]
  schema_trimming_logic["Schema trimming logic"] --> prompt_assembly_service
  few_shot_examples["Few-shot examples"] --> prompt_assembly_service
  prompt_assembly_service --> llm_query_generator["LLM query generator"]
  llm_query_generator --> output_parser_and_validator["Output parser and validator"]
  output_parser_and_validator --> honeycomb_query_engine["Honeycomb query engine"]
  honeycomb_query_engine --> honeycomb_query_ui
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Honeycomb query UI Provides the minimal textbox-and-button interface for natural-language query requests. Prompt assembly service, Honeycomb query engine
Prompt assembly service Combines user input, query grammar, domain knowledge, schema context, examples, and existing query state. Honeycomb query UI, Schema trimming logic, Few-shot examples, LLM query generator
Schema trimming logic Reduces large customer schemas to fit context limits. Prompt assembly service
Few-shot examples Give the model examples of valid Honeycomb query construction. Prompt assembly service
LLM query generator Generates a Honeycomb query from the assembled prompt. Prompt assembly service, Output parser and validator
Output parser and validator Parses generated output, validates it, and applies safe corrections when possible. LLM query generator, Honeycomb query engine
Honeycomb query engine Executes the validated observability query. Honeycomb query UI, Output parser and validator

Data flow

A user enters a natural-language observability question. Query Assistant builds a prompt containing query grammar, instrumentation knowledge, trimmed schema context, few-shot examples, and current query context. The LLM returns a structured query, which is parsed, validated, corrected where possible, and then executed in the normal Honeycomb interface.

“The prompt includes the user's natural language input, information about Honeycomb query structure (visualization operators, filter operators, clause structure)”summary, stated
“The output from the LLM is parsed, validated, and corrected if possible before executing against Honeycomb's query engine.”summary, stated

Why this architecture

Honeycomb treated the LLM as one feature engine inside a constrained product workflow, because chat UI, chaining, and huge untrimmed schemas were too slow or unreliable for production query generation.

“They addressed these through creative schema trimming, few-shot prompting, output validation, and extensive security controls”summary, stated
“Notably, the team deliberately avoided implementing a chat UI, believing it was the wrong interface for their use case.”summary, stated

Models used: gpt-3.5-turbo · Claude 100k · GPT-4

Scale

Alternatives considered (roads not taken)

Chat-first interface

Rejected because: Honeycomb considered chat the wrong interaction model for this query-building task.

“the team deliberately avoided implementing a chat UI, believing it was the wrong interface for their use case.”summary, stated

Chained LLM calls

Rejected because: Chaining multiplied latency and reduced end-to-end accuracy.

“The team explicitly rejected chaining approaches popularized by frameworks like LangChain.”summary, stated
“a 90% accurate process repeated 5 times results in only 59% accuracy (0.9^5 = 0.59).”summary, stated

Use Claude 100k with full schemas

Rejected because: It was slower and more hallucination-prone than smaller relevant schema subsets.

“The team experimented with Claude 100k's larger context window but found it to be several times slower with full schemas and more prone to hallucinations”summary, stated

Patterns

context-engineering (context management)

Honeycomb curated prompt context by trimming schemas, adding query structure, and providing domain examples rather than dumping full customer schemas into the prompt.

“constraining schemas to fields that received data in the past seven days significantly reduced schema sizes and usually fit within the context window.”summary, stated

structured-output-contract (output validation)

The system parsed and validated structured Honeycomb query output before execution.

“The output from the LLM is parsed, validated, and corrected if possible before executing against Honeycomb's query engine.”summary, stated

safety-policy-enforcement (security)

Security controls addressed prompt injection and compliance risks around production LLM queries.

“prompt injection security concerns, and legal/compliance requirements.”summary, stated

Tradeoffs

Embed query assistance into the existing UI.

Chose A minimal textbox and button in the standard Honeycomb interface over A separate chat experience.

Rationale: The task was query construction, and the existing interface already supported review and execution.

“They opted for minimal UI changes—just a textbox and button—while keeping the rest of the standard Honeycomb interface intact.”summary, stated

Avoid multi-call chains.

Chose A focused prompt plus validation over Chained LLM calls for iterative query construction.

Rationale: Chaining increased latency and reduced compounded accuracy without tangible quality gains.

“While there are mitigation strategies, the team found "no tangible improvements in the ability to generate a Honeycomb query when chaining LLM calls together." The pointed warning: "LangChain won't solve all your life's problems."”summary, stated

Gotchas (what bit them)

Large schemas can exceed LLM context windows.

Root cause: Some observability datasets had thousands of fields.

Resolution: Trim schemas to recently active fields and use relevant subsets instead of full schemas.

“Some Honeycomb customers have schemas with over 5,000 unique fields, far exceeding what can fit in the context window”summary, stated
“constraining schemas to fields that received data in the past seven days significantly reduced schema sizes and usually fit within the context window.”summary, stated

Chaining LLM calls can collapse reliability.

Root cause: Each step adds latency and compounds probability of error.

Resolution: Avoid LangChain-style chained calls when they do not improve query generation.

“Beyond the latency multiplication issue, they highlighted the compound probability problem: a 90% accurate process repeated 5 times results in only 59% accuracy”summary, stated

Large-context models are not automatically better.

Root cause: Full schemas slowed Claude 100k and increased hallucinations.

Resolution: Prefer smaller relevant schema subsets when possible.

“Claude 100k's larger context window but found it to be several times slower with full schemas and more prone to hallucinations compared to using embeddings to select smaller, relevant field subsets.”summary, stated

Evaluation

The case emphasizes production validation and correction rather than reporting a formal benchmark; Honeycomb validated generated query structure before execution and learned from latency/context constraints during development.

Metrics: Schemas with over 5,000 fields. · LLM latency from 2 to 15+ seconds. · Illustrative compounded accuracy drop from 90% per step to 59% after five steps.

“The output from the LLM is parsed, validated, and corrected if possible before executing against Honeycomb's query engine.”summary, stated
“a 90% accurate process repeated 5 times results in only 59% accuracy (0.9^5 = 0.59).”summary, stated

Outcomes

The case cites customer schemas over 5,000 fields and LLM latency from 2 to more than 15 seconds.

“Honeycomb built Query Assistant, a natural language interface that translates user queries into structured observability queries using LLMs.”summary, stated
“ultimately shipping the feature within a month while acknowledging that LLMs are engines for features rather than complete products.”summary, stated