fix(memory.graph): add extract_provider to bypass quality_gate for extraction#3615
Merged
fix(memory.graph): add extract_provider to bypass quality_gate for extraction#3615
Conversation
…traction Graph extraction tasks produce structurally low prompt/response cosine similarity (~0.55-0.70), causing systematic quality_gate false positives when [llm.router] quality_gate is set. All extraction calls failed the gate and fell back through the full provider list on every turn, adding unnecessary latency. Add `extract_provider` field to `GraphConfig` matching the existing pattern in `ReasoningConfig` and `CompressionConfig`. When set to a named provider from `[[llm.providers]]`, graph extraction (and downstream note linking and community summarization) use a provider built via `resolve_background_provider` that bypasses `apply_routing_signals()`. Default (empty string) preserves existing behavior. Closes #3601
dec8b7b to
fd5958f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
[llm.router] quality_gatefired on every graph extraction call because JSON extraction responses have structurally low cosine similarity to the extraction prompt (~0.55–0.70), below the 0.75 thresholdextract_providerfield toGraphConfig, matching the existing pattern inReasoningConfigandCompressionConfigresolve_background_providerthat bypassesapply_routing_signals()and the quality gateTest plan
[memory.graph] extract_provider = "<name>"in.local/config/testing.tomland run a multi-turn session with[memory.graph] enabled = truethompson_quality_fallbacklog entries formemory.graph_extractextract_provider) preserves existing behavior — no regressionsCloses #3601