[{"data":1,"prerenderedAt":12},["ShallowReactive",2],{"blog-post-why-spreadsheets-break-rag-and-what-to-do-about-it":3},{"success":4,"post":5},true,{"id":6,"slug":7,"title":8,"content":9,"meta_description":10,"created_at":11,"updated_at":11},"452c0f20-bd83-4e7d-aaa5-d862980905b6","why-spreadsheets-break-rag-and-what-to-do-about-it","Why spreadsheets break RAG, and what to do about it","\u003Cp>A spreadsheet loses most of its meaning the moment you treat it as text. The number in a cell means something because of the column header above it, the row label beside it, and the sheet it sits on. Chop the file into fixed-size chunks the way you would a report, and the model receives a grid of numbers whose headers fell into the previous chunk. It will still answer. That is the problem.\u003C\u002Fp>\n\n\u003Ch2>The specific failure\u003C\u002Fh2>\n\n\u003Cp>Retrieval over documents works because a paragraph is self-contained. Lift it out of the file and it still says what it said. A block of thirty spreadsheet rows is not self-contained: it says \u003Ccode>4,120\u003C\u002Fcode> and \u003Ccode>Q3\u003C\u002Fcode> and \u003Ccode>Northern\u003C\u002Fcode> without the header row that would have told you those were units shipped, a fiscal quarter, and a region rather than a customer name.\u003C\u002Fp>\n\n\u003Cp>Worse, the failure is silent and looks like success. The model retrieves the block, sees numbers, and produces a fluent answer with a figure in it. Nobody reading the answer can tell that the column it read was last year's forecast rather than this year's actual, because both columns are just numbers once the headers are gone.\u003C\u002Fp>\n\n\u003Ch2>Repeat the headers into every chunk\u003C\u002Fh2>\n\n\u003Cp>The single highest-value fix is to carry the context down. When you split a sheet, prepend the sheet name and the header row to every chunk, and keep the row label with each row. The chunk becomes verbose and slightly redundant, which is a fair price for each fragment being independently interpretable.\u003C\u002Fp>\n\n\u003Cp>The same applies to merged title cells above a table, units declared once in a corner, and currency stated in a note rather than in the cells. Anything that appears once and governs everything below it has to be duplicated into each piece, or it exists only in the chunk that happened to contain it.\u003C\u002Fp>\n\n\u003Ch2>Serialise rows as records, not as a grid\u003C\u002Fh2>\n\n\u003Cp>Retrieval works on meaning, and a row reads more meaningfully as a sentence-like record than as tab-separated values. Rendering each row as a sequence of \u003Ccode>header: value\u003C\u002Fcode> pairs gives the embedding something to match against, and it gives the model a shape it can read back correctly.\u003C\u002Fp>\n\n\u003Cp>This costs tokens. A wide sheet with forty columns produces long records, and repeating headers per row multiplies that. For wide tables, keep the identifying columns in every record and split the remaining columns into grouped records that share the same row key, so the row can be reassembled from several matches.\u003C\u002Fp>\n\n\u003Ch2>The parts a text extractor drops\u003C\u002Fh2>\n\n\u003Cp>Ordinary extraction reads values, and values are not all a spreadsheet contains. Formulas disappear, leaving the result without the logic that produced it, which matters when the question is why a figure looks the way it does. Cell comments and notes vanish, and those are frequently where the caveat lives. Formatting carries meaning that has no textual form: the red cells, the strikethrough row that was superseded, the hidden columns someone left in place.\u003C\u002Fp>\n\n\u003Cp>Hidden rows deserve particular attention. If a sheet has filters applied, the visible view and the underlying data are different things. Extraction usually takes everything, so the assistant answers from rows the author considered excluded. Decide deliberately which one you index, and prefer to keep hidden rows out unless you have a reason.\u003C\u002Fp>\n\n\u003Ch2>Multi-sheet workbooks need per-sheet identity\u003C\u002Fh2>\n\n\u003Cp>Workbooks accumulate tabs: raw data, a pivot, a summary, an old version somebody kept, and a scratch tab. Indexed as one document, all of it merges into a single pool where the summary and the raw data are indistinguishable, and a query matches whichever chunk is worded most similarly rather than whichever is authoritative.\u003C\u002Fp>\n\n\u003Cp>Index sheets as separate units with the sheet name attached, and tag the workbook so people can tell what they are looking at. A store that accepts xlsx, xls, xlsm, ods and csv alongside documents — as \u003Ca href=\"\u002F\">Nodus Veritatis\u003C\u002Fa> does, with tagging for type, domain and status — makes it possible to mark the superseded workbook as superseded rather than hoping nobody's question happens to match it.\u003C\u002Fp>\n\n\u003Ch2>Know which questions retrieval cannot answer\u003C\u002Fh2>\n\n\u003Cp>Retrieval finds relevant fragments. It does not compute over a whole table. \"What was the figure for the northern region in Q3\" is a lookup and works well. \"What is the total across all regions\" requires reading every row, and the retriever will hand back a handful of chunks from which the model produces a number that looks like a total and is not one.\u003C\u002Fp>\n\n\u003Cp>This is the most dangerous class of question, because the answer is confident and arithmetically plausible. Answer aggregate questions in the spreadsheet, with a formula, and use retrieval for locating and explaining rather than for summing. If your users keep asking for totals, that is a signal to build a query path over the actual data, not to tune the chunker.\u003C\u002Fp>\n\n\u003Ch2>A practical checklist\u003C\u002Fh2>\n\n\u003Cp>Repeat sheet name and headers into every chunk. Serialise rows as labelled records. Keep row keys with every fragment. Index sheets separately. Preserve units and currency wherever they are declared. Decide explicitly about hidden and filtered rows. Tag superseded workbooks so they are identifiable. And require answers to cite the file and sheet they came from, so a wrong number can be traced back to the cell that produced it instead of being argued about.\u003C\u002Fp>\n\n\u003Cp>Most of the difficulty here is not modelling. It is refusing to pretend a spreadsheet is prose.\u003C\u002Fp>","Spreadsheets carry meaning in structure, not prose. Chunking a sheet like a document loses the header row and produces confident wrong answers.","2026-08-12T15:08:37.595152",1793193755694]