Add advanced-rag module: Easy RAG, query compression and expansion, routing, minScore, content injection, chat-memory cost and sources, each with a captured transcript

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b85ApxQRK2Z8yuzC5r
This commit is contained in:
Claude
2026-11-17 00:59:39 +05:30
parent da39f6437a
commit ae8fe985b4
27 changed files with 1195 additions and 0 deletions
+62
View File
@@ -0,0 +1,62 @@
=== Case 1: a query whose wording misses the document ===
Original query: I shipped a bad release, can I undo it?
Single-query top 3:
0.807 hardware-returns.txt
0.790 webhooks.txt
0.780 refund-policy.txt
Queries produced: 3
"How can I revert a faulty release?"
0.798 deployments.txt
0.781 hardware-returns.txt
0.779 refund-policy.txt
"Is it possible to roll back a bad deployment?"
0.858 deployments.txt
0.779 webhooks.txt
0.776 refund-policy.txt
"What is the way to reverse a release that went wrong?"
0.788 deployments.txt
0.779 refund-policy.txt
0.774 hardware-returns.txt
After DefaultContentAggregator (reciprocal rank fusion): 4 unique segments, in this order:
deployments.txt
refund-policy.txt
hardware-returns.txt
webhooks.txt
=== Case 2: a query that was already fine ===
Original query: How do I get my money back?
Single-query top 3:
0.852 refund-policy.txt
0.804 hardware-returns.txt
0.763 webhooks.txt
Queries produced: 3
"What is the process for requesting a refund?"
0.866 refund-policy.txt
0.818 hardware-returns.txt
0.787 webhooks.txt
"How can I be reimbursed for a purchase?"
0.852 refund-policy.txt
0.805 hardware-returns.txt
0.764 webhooks.txt
"Steps to cancel and receive a refund"
0.872 refund-policy.txt
0.817 hardware-returns.txt
0.797 webhooks.txt
After DefaultContentAggregator (reciprocal rank fusion): 3 unique segments, in this order:
refund-policy.txt
hardware-returns.txt
webhooks.txt
Prompt ExpandingQueryTransformer sent to the expander:
Generate 3 different versions of a provided user query. Each version should be worded differently, using synonyms or alternative sentence structures, but they should all retain the original meaning. These versions will be used to retrieve relevant documents. It is very important to provide each query version on a separate line, without enumerations, hyphens, or any additional formatting!
User query: I shipped a bad release, can I undo it?