Skip to content

feat(rag): wire rag_benchmarks into RetrievalLearner feedback loop (#4676)#4979

Merged
mrveiss merged 1 commit intoDev_new_guifrom
issue-4676
Apr 17, 2026
Merged

feat(rag): wire rag_benchmarks into RetrievalLearner feedback loop (#4676)#4979
mrveiss merged 1 commit intoDev_new_guifrom
issue-4676

Conversation

@mrveiss
Copy link
Copy Markdown
Owner

@mrveiss mrveiss commented Apr 17, 2026

Closes #4676

Summary

  • Added BenchmarkResult dataclass and run_benchmark_suite() in rag_benchmarks.py
  • Added publish_feedback_events(redis, results) — writes rag:feedback:__global__:{date} stream entries matching the exact schema RetrievalLearner.consume_feedback_stream() already processes
  • Added POST /benchmark/run endpoint in knowledge_rag.py — runs suite via run_in_executor, injects results into learner stream
  • 5 new tests in retrieval_learner_test.py covering xadd count, schema correctness, namespace, full round-trip, and zero-precision suppression

Test Status

PASS — 5 new tests pass; 1 pre-existing failing test unrelated to this change

…4676)

Add publish_feedback_events() evaluator adapter to rag_benchmarks.py that
publishes synthetic rag:feedback:__global__:{date} Redis stream entries from
precision@k benchmark results, plus run_benchmark_suite() to execute the
benchmark against an ephemeral ChromaDB collection. Add POST /rag/benchmark/run
endpoint in knowledge_rag.py so the suite can be triggered manually or via
scheduler. RetrievalLearner.consume_feedback_stream() picks up these events
unchanged (no schema modifications). Five new unit tests cover the full
benchmark → feedback → pattern-distillation round-trip.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mrveiss mrveiss merged commit c613b64 into Dev_new_gui Apr 17, 2026
1 of 3 checks passed
@mrveiss mrveiss deleted the issue-4676 branch April 17, 2026 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant