Ask

every question returns the same three chunks after i moved to 1500 token chunks

Bigger chunks average the signal away. One 1500-token chunk covers six topics, so its vector sits near the middle of everything, which makes it a decent match for every query and a good match for none. The bunched distance range is the fingerprint of exactly that, your scores have stopped carrying information.

What I would do:

  • Embed small, return big. Index 300-500 token units, store a pointer to the section they came from, and expand to the surrounding text when you build the prompt. You get precise retrieval and complete context, which is what you were actually chasing when you went to 1500.
  • Strip boilerplate before embedding. Nav, footers, "was this article helpful", the glossary block that appears on every page. That shared text is often the entire reason one page looks similar to everything.

103 · in/rag-that-works ·

Which habit was doing the most damage in hindsight - heat, the towel, or brushing it wet?

I cut heat out entirely for four months to prove a point to myself and my hair looked no better. What did change things was replacing a cotton pillowcase with a smooth one and stopping sleeping with it loose and getting wrapped around itself.

So my honest experience is that the overnight friction was doing more than the dryer, and I gave up three months of not-blow-drying to learn it. Change one thing at a time like you said, I changed two and had to redo it.

74 · in/hair-science ·

unrelated paragraphs score 0.86 cosine with text-embedding-3-small, is my index broken

Nothing is broken. Cosine similarity from these models lives in a narrow band, anything in the same language and roughly the same domain lands somewhere around 0.75 to 0.90, because a large part of the vector encodes "this is English business prose" and not the topic.

The absolute number is meaningless. Only the ordering within a single query means anything, and even that is weak. So:

  • Never threshold on a global constant. It will either fire on everything or nothing, and which one changes when you switch models.
  • If you need an abstain signal, use the shape of the results - the gap between rank 1 and rank 10 - or calibrate against a labelled set and recompute when anything changes.
  • Better: let a reranker produce the score you threshold on. Its scores actually spread out.

96 · in/rag-that-works ·

Cold brew with the beans I use for filter comes out flat and papery - water temp or grind?

Numbers from a weekend of being annoying about this. Same medium roast, 1 to 5 concentrate, room temperature, tasted a sample at 8, 12, 16 and 24 hours. Eight was thin, twelve was pleasant, sixteen was the best of the four with actual sweetness, twenty four had gone woody and slightly savoury. So there is a window, it is not longer is stronger forever, and mine closed somewhere before the twenty hour mark.

106 · in/coffee-brewing ·

pgvector p95 went from 40ms to 3.1s after we crossed 800k rows on ivfflat

Two things, and the second one is the real one.

First, lists was sized for a 20k table. The usual rule is rows/1000 up to about a million, so 820k wants somewhere near 800 lists. If you are on the default of 100, each probe is scanning ~8,000 vectors instead of ~1,000.

Second and worse: an ivfflat index is built from the data present when you build it. The centroids came from your 20k rows. Everything you have inserted since has been assigned to clusters that were fitted to a fortieth of your current data. Reindexing is not optional maintenance here, it is the whole mechanism.

Given you have to rebuild anyway, build hnsw instead. It has no lists parameter to get wrong, it degrades gracefully as the table grows, and ef_search gives you a per-query recall/latency dial. You pay with a slower build and more memory.

134 · in/rag-that-works ·

Vinegar in the rinse cycle hasn't fixed my musty towels after three washes

You're doing it wrong, but the tip is also oversold. Two problems with what you've described.

First, the vinegar is going in with the detergent still in the water. Detergent is alkaline, vinegar is acid, and they largely cancel each other out, so half a cup of it in a full drum of soapy water is doing very little. If you use vinegar at all it needs to be in a rinse with nothing else in the machine.

Second, warm isn't hot enough and vinegar isn't the right tool anyway. What's in the towels is a mix of body oils, detergent residue and bacteria that live in it. The thing that actually removes it is oxygen bleach, sodium percarbonate, dissolved in genuinely hot water.

What worked here: wash the towels on the hottest cycle the machine offers with a scoop of oxygen bleach and no detergent, no softener. Then a second normal wash with a correct dose of detergent. Then dry them completely, straight away. Mine came back from that and haven't smelled since.

641 · in/practical-tips ·

First three months - machines to build confidence or straight onto the barbells?

Disagreeing with machines first. The pattern is the skill, and you learn it by doing it under a load light enough to think about. An empty bar is 20 kg, or 15 for a women's bar, and most gyms have lighter technique bars too, so nobody is asking you to be strong on day one.

Machines for accessories, absolutely. But spend the first three months learning to squat, hinge, press and row with the bar and dumbbells, because you will be doing those movements for the next thirty years and the technique you build now is what you keep.

193 · in/womens-lifting ·

bm25 hybrid or a reranker first, 12k docs and about $40 a month to spend

Reranking is the bigger single win, but you cannot choose between them without one measurement, and it takes an hour.

Take 30 questions where you know which document should answer them. Retrieve the top 50 by vector and check whether the correct chunk is in there at all: ignore the ordering entirely.

  • Recall@50 below about 0.9: your problem is recall, and a reranker cannot fix it, because it only reorders what you gave it. Add keyword search. Embeddings are weakest exactly where internal knowledge bases are strongest: part numbers, error codes, product names, people's names, anything where the exact string matters.
  • Recall@50 fine, top 5 wrong: that is a reranker's entire job. Cross-encode the 50 candidates, keep 8.

On cost, reranking 50 candidates is a fraction of a cent per query at hosted prices. At your volume $40 is not the constraint, your time is.

121 · in/rag-that-works ·

chunk by heading or fixed 512 with overlap for 300 page pdf manuals

Heading-aware with a size cap: split on headings, then split any section over ~700 tokens on paragraph boundaries so one enormous section does not become one useless chunk.

But the thing that will move your numbers most is smaller than either option, prefix every chunk with its heading path.

3. Hydraulics > 3.4 Bleeding the system
<chunk text>

It gives the embedding topic context that the paragraph itself often omits ("then turn the valve clockwise" means nothing standalone), and it gives the model a breadcrumb to cite. Costs 15 tokens a chunk.

And before any of this: look at what your PDF extractor produces. Two-column pages and tables are where naive extraction turns text into nonsense, and no chunking strategy recovers from that.

97 · in/rag-that-works ·