Skip to content

fix(memory.graph): add extract_provider to bypass quality_gate for extraction#3615

Merged
bug-ops merged 1 commit intomainfrom
3601-memory-graph-quality-gate
May 5, 2026
Merged

fix(memory.graph): add extract_provider to bypass quality_gate for extraction#3615
bug-ops merged 1 commit intomainfrom
3601-memory-graph-quality-gate

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented May 5, 2026

Summary

  • [llm.router] quality_gate fired 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 threshold
  • Added extract_provider field to GraphConfig, matching the existing pattern in ReasoningConfig and CompressionConfig
  • When set, graph extraction (and downstream note linking and community summarization) use a clean provider built via resolve_background_provider that bypasses apply_routing_signals() and the quality gate

Test plan

  • Set [memory.graph] extract_provider = "<name>" in .local/config/testing.toml and run a multi-turn session with [memory.graph] enabled = true
  • Verify no thompson_quality_fallback log entries for memory.graph_extract
  • Verify graph extraction completes without provider cycling
  • Verify default (empty extract_provider) preserves existing behavior — no regressions

Closes #3601

@github-actions github-actions Bot added bug Something isn't working size/M Medium PR (51-200 lines) documentation Improvements or additions to documentation memory zeph-memory crate (SQLite) rust Rust code changes core zeph-core crate config Configuration file changes labels May 5, 2026
@bug-ops bug-ops enabled auto-merge (squash) May 5, 2026 16:52
…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
@bug-ops bug-ops force-pushed the 3601-memory-graph-quality-gate branch from dec8b7b to fd5958f Compare May 5, 2026 16:56
@bug-ops bug-ops merged commit d41491f into main May 5, 2026
32 checks passed
@bug-ops bug-ops deleted the 3601-memory-graph-quality-gate branch May 5, 2026 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working config Configuration file changes core zeph-core crate documentation Improvements or additions to documentation memory zeph-memory crate (SQLite) rust Rust code changes size/M Medium PR (51-200 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

memory.graph: quality_gate fires on JSON extraction responses (false positive)

1 participant