What this is
Needleglass is a client-side workbench. It tokenizes a packed support prompt with the public OpenAI BPE encodings, prices the pack from official list rates, and plots a transparent findability prior based on published long-context research. It does not call a model API.
Tokenization
Token counts use o200k_base and, in the comparison lab, cl100k_base, via the MIT-licensed gpt-tokenizer library, which implements the same BPE ranks as OpenAI’s tiktoken. Chat totals include the public ChatML wrappers and assistant priming tokens. Counts are exact for these encodings, not estimates.
Pricing and windows
List prices and context windows were taken from OpenAI’s public model pages on 27 November 2026. GPT-5.4 prompts with more than 272,000 input tokens are billed at 2× input and 1.5× output for the whole session, as documented on the model page. Cached-input discounts are shown in the catalog but are not assumed in the hero cost.
Findability prior
Liu et al., 2023, “Lost in the Middle: How Language Models Use Long Contexts,” document a U-shaped use of long context: information at the very start or very end is used much more reliably than information buried in the middle. Needleglass draws a U-curve with a midpoint floor of 0.38 and a mild length penalty. This is a lab prior, not a measured accuracy for any one model.
Truncation
When a pack exceeds the model’s input cap, earliest retrieved chunks are dropped first. The system prompt and the user question are kept. If the warranty needle was in a dropped chunk, findability is zero.
Claim support — and a failure case
Sentences in a sample answer are scored by verbatim phrase coverage against the kept context, with a lighter lexical backup. A true paraphrase that shares little wording can be marked weak or unsupported. That is an honest limit of a lexical method, and it is why this lab does not claim to detect hallucinations in general.
Sources