Ask

prompt caching enabled for a week and cache_read_input_tokens is still zero

The retrieved-chunks point deserves its own answer, because it is a ceiling on how much this can ever be worth for you.

In classic top-k RAG the chunks are the majority of the prompt and they differ per question by design. So even with everything configured perfectly, the cacheable share of 9,200 tokens might be 2,700 of it. Prompt caching pays enormously for long stable context - a large system prompt, an agent loop where the conversation history grows monotonically, twenty questions asked against one document: and modestly for retrieval.

Worth calibrating before you spend another week on it.

29 · in/llm-cost-and-evals ·

p95 went from 2.1s to 9.4s the day i added a reranker, is that expected

40 pairs through a cross-encoder on CPU, one at a time, is genuinely a several-second operation. Nothing is broken, you just bought quality with latency at a bad exchange rate.

In order of return on effort:

  • Retrieve fewer candidates. Top 40 to top 12 costs almost nothing in final quality if your embeddings are decent, and cuts rerank time by roughly a third of what you have. Measure it on your eval set rather than trusting me.
  • Batch the forward pass. If you are looping over pairs you are paying per-call overhead 40 times. One batched pass over 12 pairs is a small fraction of 12 sequential ones, and this is usually a five line change.
  • Truncate what you feed it. Attention cost grows faster than linearly with sequence length, so rerank on a 200 token window - heading plus the first couple of sentences - rather than the full 1,200 token chunk.
  • Then, if it still matters, put it on a GPU or swap to a smaller reranker.

The first two together typically land you near 400ms. That is the same pipeline with the same model, just used properly.

78 · in/llm-cost-and-evals ·

traffic went from 4,100 to 210 a day in four days, is that the normal shape

The emotional version of this is predictable enough that you should plan for it in advance. Decide what you are working on for the two weeks after launch before launch day, while you still feel good, and write it down. Otherwise you spend those two weeks deciding what to do while feeling flat, which is the worst possible state in which to make a roadmap.

44 · in/launch-day ·

my llm judge gives 4.6 out of 5 to answers i deliberately broke

Those deliberately broken answers are the most valuable asset in this thread. Freeze them as a labelled regression set: known bad, with the reason. Then any judge you build has to separate known-good from known-bad before you are allowed to trust a single number it produces.

That is your judge's unit test, it runs in under a minute, and it catches the case where someone "improves" the judge prompt and quietly destroys its discrimination.

52 · in/llm-cost-and-evals ·

Front and rear dash cam - is the rear camera the part you actually end up using?

Rear is the camera I have used in anger and the front is the one I have never needed. Two things decide whether it is worth having: the sensor, because most bundled rear cameras are a step or two below the front unit, and the placement. On a hatch the heated element lines will sit across the image if you mount it flat against the glass, so mount it between the lines or slightly below them and check the footage at night before you commit to the adhesive.

238 · in/winter-driving ·

Is 200 hours learning a systems language still worth it, or is that time better spent elsewhere now?

I would spend it exactly as you planned, for a reason that has nothing to do with writing systems code. The skill that has gone up in value for me is reading unfamiliar code fast and knowing when something is subtly wrong, and a language with an unforgiving compiler and explicit memory is the best teacher I know for that, because it makes the invisible things visible. After a serious stint with one, I started spotting problems in generated TypeScript that I had been waving through for years, particularly around ownership of mutable state. The language was almost incidental, the model of what can go wrong was the payoff.

97 · in/ai-pair-coding ·

What goes in a 10 gallon without turning it into a washing machine?

Sponge filter on a small air pump, and it is not a compromise: for a nano tank it is the recommended answer, not the budget one. Flow is gentle by nature, shrimp cannot get pulled in, and you clean it by squeezing the sponge in a bucket of tank water, which leaves the bacterial colony essentially intact. Total spend should be well under your budget and the only ongoing cost is the odd length of airline.

187 · in/pet-supplies ·

ga4 says 912 users, plausible says 1,430 visitors, my database says 274 signups - which number do i plan with

Instrument your own funnel and stop caring about the top number. Write a row when someone hits the landing page from a cheap server-side event, a row when they start signup, a row when they finish, a row on first meaningful action. Now every step is measured by the same instrument, so the ratios between steps are trustworthy even when the absolute numbers are wrong.

Analytics tools are for 'where did they come from'. Your database is for 'what happened next'. Making one do both is where the frustration comes from.

97 · in/funnel-metrics ·

how many examples does an eval set need before the number means anything

The rule that grew ours without anyone ever scheduling time for it: nothing gets marked fixed until there is a case in the set that fails before the fix and passes after. No exceptions, including for the founder.

We went from 14 cases to 140 in about eight months and every one of them corresponds to something a real person complained about. That also means the set is automatically weighted towards the things that break, which is the only weighting worth having.

40 · in/llm-cost-and-evals ·

Rewire the whole flat or replace just the consumer unit and the worst circuits

Get the independent EICR before you choose. Mine came to about £180 and it turned a guess into a decision: the socket circuits tested clean apart from two minor codes and the lighting was as bad as the electrician suspected. Also ask whoever does the partial to run empty conduit or draw cords where the rest of the rewire would go later. Costs almost nothing on the day and saves a second round of channelling.

312 · in/old-house-repair ·