feat(rag): wire rag_benchmarks into RetrievalLearner feedback loop (#4676)#4979
Merged
mrveiss merged 1 commit intoDev_new_guifrom Apr 17, 2026
Merged
feat(rag): wire rag_benchmarks into RetrievalLearner feedback loop (#4676)#4979mrveiss merged 1 commit intoDev_new_guifrom
mrveiss merged 1 commit intoDev_new_guifrom
Conversation
…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>
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.
Closes #4676
Summary
BenchmarkResultdataclass andrun_benchmark_suite()inrag_benchmarks.pypublish_feedback_events(redis, results)— writesrag:feedback:__global__:{date}stream entries matching the exact schemaRetrievalLearner.consume_feedback_stream()already processesPOST /benchmark/runendpoint inknowledge_rag.py— runs suite viarun_in_executor, injects results into learner streamretrieval_learner_test.pycovering xadd count, schema correctness, namespace, full round-trip, and zero-precision suppressionTest Status
PASS — 5 new tests pass; 1 pre-existing failing test unrelated to this change