Repository navigation
Extraction is structured output, so format drift gets frozen into the graph #2574
Replies: 2 comments 3 replies
|
My advice: treat extraction quality as a first-class metric. Track parse success, schema compliance, and graph density, and consider constrained decoding to prevent silent format drift. This could help? https://github.com/DimYiannis/Constrained-GraphRag |
|
One addition to question 1, from tool-calling tests we ran this week, so treat it as adjacent evidence for extraction. When you track parse success per model, check whether the failures belong to the model or to the endpoint serving it. Two cases from the same night:
Neither raised an error and both looked like model quality. So for your question 3, I would add a second axis: the same model served by two providers. Our guess is that some of the spread you expect comes from the serving layer's parser, and a per-chunk parse rate with no record of which endpoint produced the chunk would not tell those apart. |
Uh oh!
There was an error while loading. Please reload this page.
Disclosure first: I build Grunz, a hosted chat + coding agent on abliterated open-weight models. Nothing to sell — graph construction has a failure mode that other RAG systems do not, and it is worth naming.
Extraction is structured output, so the graph inherits format drift
The indexing pipeline asks a model to emit entities and relationships in a fixed shape. That is a structured-output contract. Everything downstream — the graph, the communities, the summaries, every query — is built on it.
Which means graphrag is more exposed to output-format degradation than ordinary RAG is, because in ordinary RAG a malformed generation is one bad answer, and here it is a permanent defect baked into the index.
Why this bites harder now
A lot of people index with open-weight models, and a growing share of those are abliterated / decensored checkpoints. On those, the first thing that degrades is not knowledge but instruction-following and output-format adherence. The model still knows what an entity is. It gets worse at emitting it in the shape you specified.
So you do not get loud parse failures. You get a slightly worse graph:
None of this errors. The pipeline completes. You get a graph that is quietly 8% thinner in places that correlate with nothing you can inspect.
Why it is worse than a bad answer
It is frozen. A bad generation at query time is one bad answer. A bad extraction is in the index until you re-run the whole thing.
It is invisible at evaluation. You evaluate query quality, but the defect is in construction. Low recall on a topic looks like a retrieval problem, and the actual cause is that three chunks about that topic failed extraction two hours earlier.
Community summarisation compounds it. Summaries are built from the extracted graph, so a gap in extraction becomes a confident summary of a partial neighbourhood.
Questions
Does indexing report extraction health — records attempted vs parsed, malformed rate per chunk? If that exists I would like to be pointed at it, because it is the number that would catch this. If it does not, it seems like the highest-value observability you could add: a per-chunk parse-success rate would immediately surface a model that is quietly underperforming.
Is there interest in constrained decoding for the extraction step? Grammar-level constraint removes the model's willingness from the equation entirely. For a step whose output is frozen into an index, that seems worth the throughput cost, and it is much more defensible than retrying.
Has anyone compared graph density for the same corpus across extraction models? My expectation is that the spread is wider than people assume, and that it correlates with format compliance rather than with model quality scores.
Happy to be told extraction is already validated strictly and this is a non-issue. I would rather find that out than keep worrying about it.
All reactions