Long Prompting Experiment

August 19, 2025 · View on GitHub

Modern LLMs demonstrate increasingly powerful abilities to handle large context windows. While research has shown that inference coherence can degrade with longer prompts, this degradation curve is expected to flatten progressively with model improvements.

Context Window Utilization:

  • Gemini 2.5 Lite supports ~1 million tokens maximum context
  • Raw transcript prompt: 0.35% of context window
  • AI-enhanced prompt: 0.17% of context window

Research Question

Does prompt optimization through AI-assisted refinement improve inference quality compared to raw voice-to-text input and minimal prompts?


Experiment Design

This experiment compares inference quality across three distinct prompting approaches for a technical consultation scenario:

Run TypeDescriptionPrompt Source
ControlMinimalist "low effort" prompt reflecting typical casual LLM usageHand-crafted
OptimizedVoice prompt processed by specialized refinement agentAI-enhanced
RawUnprocessed speech-to-text transcript fed directly to LLMVoice transcript

Standardized Conditions

  • Model: Gemini 2.5 Lite
  • System Prompt: Identical across all runs
  • Temperature: 1.0 (default)
  • Domain: Home automation & baby monitoring consultation

Results

alt text

alt text

alt text

titleTotal Prompt (System + User Prompt)OutputOutput/Prompt Ratio
Control Run72527223.75
Optimised Run163038432.36
Raw Run332243361.31

AI Analysis (First Pass)

Hypothesis One: The AI agent that “preprocessed” the raw voice prompt achieved a better output

Evidence

  • Run 3 (raw voice prompt): The input is long, conversational, and somewhat unstructured. The output (truncated in your file) reflects that looseness — the model struggles with clarity because the framing is diffuse and lacks a hierarchy of requirements.
  • Run 2 (optimised via preprocessing): The preprocessor reorganized the raw voice input into a well-structured document: project overview, context, hardware, challenges, etc. The AI response is correspondingly more detailed, coherent, and better aligned with the user’s goals.
  • Run 1 (control, casual short prompt): Shows that a concise but shallow prompt can still yield a solid response — but it lacks the specificity and depth of Run 2.

Analysis

The preprocessing step works because large language models respond better to:

  1. Structure – clear sections reduce ambiguity and encourage the model to cover all key points.
  2. Specificity – defined sub-questions help avoid generic advice.
  3. Context anchoring – narrative elements (why the project matters, local constraints) are explicit rather than implied.

Thus, it is fair to say the preprocessed version produced a “better” output: richer in technical precision, more tailored to constraints (Israeli hardware availability, SIDS-related monitoring), and more actionable.

Conclusion (Hypothesis One): Supported. Preprocessing improved quality by transforming an unstructured voice dump into a structured, model-friendly format.


Hypothesis Two: Both the preprocessed and the structured runs produced superior outputs compared to the casual short prompt

Evidence

  • Run 1 (casual short): The user’s input was ~30 words; the model produced a long technical answer (2,700+ words) by filling gaps with general knowledge. This answer is solid but not deeply customized — it assumes certain constraints and may overprescribe (e.g., focusing heavily on Coral TPUs without knowing Coral is unavailable locally).
  • Run 2 (optimised): The structured input led to a response that was more personally relevant and constraint-aware, with attention to hardware availability in Israel, parental motivations, and nuanced detection requirements.
  • Run 3 (raw voice): Less clear than Run 2, but still better than Run 1 in terms of context richness — because even messy details carry more signal than a stripped-down query.

Analysis

The short prompt was efficient, but it forced the model to make assumptions. Both the raw voice prompt and the optimised one gave the model more “handles” — specific facts and goals — which allowed for more tailored, practically useful guidance. The optimised version clearly outperformed both, but even the raw verbose voice prompt carried advantages over the minimal query.

Conclusion (Hypothesis Two): Supported. Both enriched prompts produced more useful answers than the casual minimal one, though the optimised/preprocessed version was strongest.


Final Assessment

  • Hypothesis One: True. Preprocessing improved clarity and yielded a better output.
  • Hypothesis Two: True. Both verbose and preprocessed prompts outperformed the casual short prompt, though preprocessing provided the highest quality.