@absolutejs/absolute 0.19.0-beta.633 → 0.19.0-beta.635
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai/client/index.js +59 -3
- package/dist/ai/client/index.js.map +4 -4
- package/dist/ai/client/ui.js +59 -3
- package/dist/ai/client/ui.js.map +4 -4
- package/dist/ai/index.js +132 -9
- package/dist/ai/index.js.map +9 -9
- package/dist/ai/rag/quality.js +59 -3
- package/dist/ai/rag/quality.js.map +4 -4
- package/dist/ai/rag/ui.js +59 -3
- package/dist/ai/rag/ui.js.map +4 -4
- package/dist/angular/ai/index.js +59 -3
- package/dist/angular/ai/index.js.map +4 -4
- package/dist/react/ai/index.js +59 -3
- package/dist/react/ai/index.js.map +4 -4
- package/dist/src/ai/rag/adapters/queryPlanning.d.ts +2 -0
- package/dist/src/react/ai/useRAG.d.ts +4 -0
- package/dist/src/svelte/ai/createRAG.d.ts +4 -0
- package/dist/src/vue/ai/useRAG.d.ts +56 -0
- package/dist/src/vue/ai/useRAGEvaluate.d.ts +32 -0
- package/dist/src/vue/ai/useRAGIndexAdmin.d.ts +16 -0
- package/dist/src/vue/ai/useRAGSearch.d.ts +4 -0
- package/dist/svelte/ai/index.js +59 -3
- package/dist/svelte/ai/index.js.map +4 -4
- package/dist/types/ai.d.ts +28 -0
- package/dist/vue/ai/index.js +59 -3
- package/dist/vue/ai/index.js.map +4 -4
- package/package.json +7 -7
package/dist/ai/index.js
CHANGED
|
@@ -749,7 +749,7 @@ var formatLeadMediaCueSummary = (input) => {
|
|
|
749
749
|
return parts.length > 0 ? parts.join(" \xB7 ") : "none";
|
|
750
750
|
};
|
|
751
751
|
var formatRAGTraceMetadataRow = (key, value) => ({
|
|
752
|
-
label: key === "sqliteQueryMode" ? "SQLite query mode" : key === "postgresQueryMode" ? "Postgres query mode" : key === "sqliteQueryPushdownMode" ? "SQLite pushdown mode" : key === "postgresQueryPushdownMode" ? "Postgres pushdown mode" : key === "sqliteQueryPushdownApplied" ? "SQLite pushdown applied" : key === "postgresQueryPushdownApplied" ? "Postgres pushdown applied" : key === "sqliteQueryPushdownClauseCount" ? "SQLite pushdown clauses" : key === "postgresQueryPushdownClauseCount" ? "Postgres pushdown clauses" : key === "sqliteQueryPushdownCoverageRatio" ? "SQLite pushdown coverage" : key === "postgresQueryPushdownCoverageRatio" ? "Postgres pushdown coverage" : key === "sqliteQueryTotalFilterClauseCount" ? "SQLite total filter clauses" : key === "postgresQueryTotalFilterClauseCount" ? "Postgres total filter clauses" : key === "sqliteQueryJsRemainderClauseCount" ? "SQLite JS remainder clauses" : key === "sqliteQueryMultiplierUsed" ? "SQLite query multiplier" : key === "sqliteQueryCandidateLimitUsed" ? "SQLite candidate limit" : key === "postgresQueryJsRemainderClauseCount" ? "Postgres JS remainder clauses" : key === "postgresQueryMultiplierUsed" ? "Postgres query multiplier" : key === "postgresQueryCandidateLimitUsed" ? "Postgres candidate limit" : key === "sqliteQueryJsRemainderRatio" ? "SQLite JS remainder share" : key === "postgresQueryJsRemainderRatio" ? "Postgres JS remainder share" : key === "sqliteQueryFilteredCandidates" ? "SQLite filtered candidates" : key === "postgresQueryFilteredCandidates" ? "Postgres filtered candidates" : key === "sqliteQueryInitialSearchK" ? "SQLite initial searchK" : key === "postgresQueryInitialSearchK" ? "Postgres initial searchK" : key === "sqliteQueryFinalSearchK" ? "SQLite final searchK" : key === "postgresQueryFinalSearchK" ? "Postgres final searchK" : key === "sqliteQuerySearchExpansionRatio" ? "SQLite search expansion" : key === "postgresQuerySearchExpansionRatio" ? "Postgres search expansion" : key === "sqliteQueryBackfillCount" ? "SQLite backfill count" : key === "postgresQueryBackfillCount" ? "Postgres backfill count" : key === "sqliteQueryReturnedCount" ? "SQLite returned hits" : key === "postgresQueryReturnedCount" ? "Postgres returned hits" : key === "sqliteQueryCandidateYieldRatio" ? "SQLite candidate yield" : key === "postgresQueryCandidateYieldRatio" ? "Postgres candidate yield" : key === "sqliteQueryTopKFillRatio" ? "SQLite topK fill rate" : key === "postgresQueryTopKFillRatio" ? "Postgres topK fill rate" : key === "sqliteQueryUnderfilledTopK" ? "SQLite underfilled topK" : key === "postgresQueryUnderfilledTopK" ? "Postgres underfilled topK" : key === "sqliteQueryCandidateBudgetExhausted" ? "SQLite candidate budget exhausted" : key === "postgresQueryCandidateBudgetExhausted" ? "Postgres candidate budget exhausted" : key === "sqliteQueryCandidateCoverage" ? "SQLite candidate coverage" : key === "postgresQueryCandidateCoverage" ? "Postgres candidate coverage" : key === "leadSpeakerCue" ? "Lead speaker cue" : key === "leadSpeakerAttributionCue" ? "Lead speaker attribution" : key === "leadChannelAttributionCue" ? "Lead channel attribution" : key === "leadChannelCue" ? "Lead channel cue" : key === "leadContinuityCue" ? "Lead continuity cue" : key,
|
|
752
|
+
label: key === "sqliteQueryMode" ? "SQLite query mode" : key === "postgresQueryMode" ? "Postgres query mode" : key === "sqliteQueryPushdownMode" ? "SQLite pushdown mode" : key === "postgresQueryPushdownMode" ? "Postgres pushdown mode" : key === "sqliteQueryPushdownApplied" ? "SQLite pushdown applied" : key === "postgresQueryPushdownApplied" ? "Postgres pushdown applied" : key === "sqliteQueryPushdownClauseCount" ? "SQLite pushdown clauses" : key === "postgresQueryPushdownClauseCount" ? "Postgres pushdown clauses" : key === "sqliteQueryPushdownCoverageRatio" ? "SQLite pushdown coverage" : key === "postgresQueryPushdownCoverageRatio" ? "Postgres pushdown coverage" : key === "sqliteQueryTotalFilterClauseCount" ? "SQLite total filter clauses" : key === "postgresQueryTotalFilterClauseCount" ? "Postgres total filter clauses" : key === "sqliteQueryJsRemainderClauseCount" ? "SQLite JS remainder clauses" : key === "sqliteQueryMultiplierUsed" ? "SQLite query multiplier" : key === "sqliteQueryCandidateLimitUsed" ? "SQLite candidate limit" : key === "sqliteQueryMaxBackfillsUsed" ? "SQLite max backfills" : key === "sqliteQueryMinResultsUsed" ? "SQLite min results" : key === "postgresQueryJsRemainderClauseCount" ? "Postgres JS remainder clauses" : key === "postgresQueryMultiplierUsed" ? "Postgres query multiplier" : key === "postgresQueryCandidateLimitUsed" ? "Postgres candidate limit" : key === "postgresQueryMaxBackfillsUsed" ? "Postgres max backfills" : key === "postgresQueryMinResultsUsed" ? "Postgres min results" : key === "sqliteQueryJsRemainderRatio" ? "SQLite JS remainder share" : key === "postgresQueryJsRemainderRatio" ? "Postgres JS remainder share" : key === "sqliteQueryFilteredCandidates" ? "SQLite filtered candidates" : key === "postgresQueryFilteredCandidates" ? "Postgres filtered candidates" : key === "sqliteQueryInitialSearchK" ? "SQLite initial searchK" : key === "postgresQueryInitialSearchK" ? "Postgres initial searchK" : key === "sqliteQueryFinalSearchK" ? "SQLite final searchK" : key === "postgresQueryFinalSearchK" ? "Postgres final searchK" : key === "sqliteQuerySearchExpansionRatio" ? "SQLite search expansion" : key === "postgresQuerySearchExpansionRatio" ? "Postgres search expansion" : key === "sqliteQueryBackfillCount" ? "SQLite backfill count" : key === "sqliteQueryBackfillLimitReached" ? "SQLite backfill limit reached" : key === "sqliteQueryMinResultsSatisfied" ? "SQLite min results satisfied" : key === "postgresQueryBackfillCount" ? "Postgres backfill count" : key === "postgresQueryBackfillLimitReached" ? "Postgres backfill limit reached" : key === "postgresQueryMinResultsSatisfied" ? "Postgres min results satisfied" : key === "sqliteQueryReturnedCount" ? "SQLite returned hits" : key === "postgresQueryReturnedCount" ? "Postgres returned hits" : key === "sqliteQueryCandidateYieldRatio" ? "SQLite candidate yield" : key === "postgresQueryCandidateYieldRatio" ? "Postgres candidate yield" : key === "sqliteQueryTopKFillRatio" ? "SQLite topK fill rate" : key === "postgresQueryTopKFillRatio" ? "Postgres topK fill rate" : key === "sqliteQueryUnderfilledTopK" ? "SQLite underfilled topK" : key === "postgresQueryUnderfilledTopK" ? "Postgres underfilled topK" : key === "sqliteQueryCandidateBudgetExhausted" ? "SQLite candidate budget exhausted" : key === "postgresQueryCandidateBudgetExhausted" ? "Postgres candidate budget exhausted" : key === "sqliteQueryCandidateCoverage" ? "SQLite candidate coverage" : key === "postgresQueryCandidateCoverage" ? "Postgres candidate coverage" : key === "leadSpeakerCue" ? "Lead speaker cue" : key === "leadSpeakerAttributionCue" ? "Lead speaker attribution" : key === "leadChannelAttributionCue" ? "Lead channel attribution" : key === "leadChannelCue" ? "Lead channel cue" : key === "leadContinuityCue" ? "Lead continuity cue" : key,
|
|
753
753
|
value: key === "sourceAwareChunkReason" ? formatSourceAwareChunkReason(value) ?? formatRAGTraceValue(value) : key === "leadSpeakerAttributionCue" ? formatLeadSpeakerAttributionCue(value) ?? formatRAGTraceValue(value) : key === "leadChannelAttributionCue" ? formatLeadChannelAttributionCue(value) ?? formatRAGTraceValue(value) : key === "leadContinuityCue" ? formatLeadContinuityCue(value) ?? formatRAGTraceValue(value) : formatRAGTraceValue(value)
|
|
754
754
|
});
|
|
755
755
|
var buildRAGRetrievalTracePresentation = (trace) => {
|
|
@@ -2523,12 +2523,16 @@ var formatSQLitePlannerCueSummary = (input) => {
|
|
|
2523
2523
|
typeof input?.sqliteQueryJsRemainderClauseCount === "number" ? `js remainder ${input.sqliteQueryJsRemainderClauseCount}` : undefined,
|
|
2524
2524
|
typeof input?.sqliteQueryMultiplierUsed === "number" ? `x${input.sqliteQueryMultiplierUsed}` : undefined,
|
|
2525
2525
|
typeof input?.sqliteQueryCandidateLimitUsed === "number" ? `cap ${input.sqliteQueryCandidateLimitUsed}` : undefined,
|
|
2526
|
+
typeof input?.sqliteQueryMaxBackfillsUsed === "number" ? `backfills ${input.sqliteQueryMaxBackfillsUsed}` : undefined,
|
|
2527
|
+
typeof input?.sqliteQueryMinResultsUsed === "number" ? `min ${input.sqliteQueryMinResultsUsed}` : undefined,
|
|
2526
2528
|
typeof input?.sqliteQueryJsRemainderRatio === "number" ? `js ${(input.sqliteQueryJsRemainderRatio * 100).toFixed(0)}%` : undefined,
|
|
2527
2529
|
typeof input?.sqliteQueryTotalFilterClauseCount === "number" ? `total clauses ${input.sqliteQueryTotalFilterClauseCount}` : undefined,
|
|
2528
2530
|
typeof input?.sqliteQueryFilteredCandidates === "number" ? `filtered ${input.sqliteQueryFilteredCandidates}` : undefined,
|
|
2529
2531
|
typeof input?.sqliteQueryInitialSearchK === "number" && typeof input?.sqliteQueryFinalSearchK === "number" ? `searchK ${input.sqliteQueryInitialSearchK}->${input.sqliteQueryFinalSearchK}` : typeof input?.sqliteQueryFinalSearchK === "number" ? `searchK ${input.sqliteQueryFinalSearchK}` : undefined,
|
|
2530
2532
|
typeof input?.sqliteQuerySearchExpansionRatio === "number" ? `expand ${(input.sqliteQuerySearchExpansionRatio * 100).toFixed(0)}%` : undefined,
|
|
2531
2533
|
typeof input?.sqliteQueryBackfillCount === "number" ? `backfill ${input.sqliteQueryBackfillCount}` : undefined,
|
|
2534
|
+
typeof input?.sqliteQueryBackfillLimitReached === "boolean" && input.sqliteQueryBackfillLimitReached ? "backfill limit reached" : undefined,
|
|
2535
|
+
typeof input?.sqliteQueryMinResultsSatisfied === "boolean" && input.sqliteQueryMinResultsSatisfied ? "min satisfied" : undefined,
|
|
2532
2536
|
typeof input?.sqliteQueryReturnedCount === "number" ? `returned ${input.sqliteQueryReturnedCount}` : undefined,
|
|
2533
2537
|
typeof input?.sqliteQueryCandidateYieldRatio === "number" ? `yield ${(input.sqliteQueryCandidateYieldRatio * 100).toFixed(0)}%` : undefined,
|
|
2534
2538
|
typeof input?.sqliteQueryTopKFillRatio === "number" ? `fill ${(input.sqliteQueryTopKFillRatio * 100).toFixed(0)}%` : undefined,
|
|
@@ -2550,12 +2554,16 @@ var formatPostgresPlannerCueSummary = (input) => {
|
|
|
2550
2554
|
typeof input?.postgresQueryJsRemainderClauseCount === "number" ? `js remainder ${input.postgresQueryJsRemainderClauseCount}` : undefined,
|
|
2551
2555
|
typeof input?.postgresQueryMultiplierUsed === "number" ? `x${input.postgresQueryMultiplierUsed}` : undefined,
|
|
2552
2556
|
typeof input?.postgresQueryCandidateLimitUsed === "number" ? `cap ${input.postgresQueryCandidateLimitUsed}` : undefined,
|
|
2557
|
+
typeof input?.postgresQueryMaxBackfillsUsed === "number" ? `backfills ${input.postgresQueryMaxBackfillsUsed}` : undefined,
|
|
2558
|
+
typeof input?.postgresQueryMinResultsUsed === "number" ? `min ${input.postgresQueryMinResultsUsed}` : undefined,
|
|
2553
2559
|
typeof input?.postgresQueryJsRemainderRatio === "number" ? `js ${(input.postgresQueryJsRemainderRatio * 100).toFixed(0)}%` : undefined,
|
|
2554
2560
|
typeof input?.postgresQueryTotalFilterClauseCount === "number" ? `total clauses ${input.postgresQueryTotalFilterClauseCount}` : undefined,
|
|
2555
2561
|
typeof input?.postgresQueryFilteredCandidates === "number" ? `filtered ${input.postgresQueryFilteredCandidates}` : undefined,
|
|
2556
2562
|
typeof input?.postgresQueryInitialSearchK === "number" && typeof input?.postgresQueryFinalSearchK === "number" ? `searchK ${input.postgresQueryInitialSearchK}->${input.postgresQueryFinalSearchK}` : typeof input?.postgresQueryFinalSearchK === "number" ? `searchK ${input.postgresQueryFinalSearchK}` : undefined,
|
|
2557
2563
|
typeof input?.postgresQuerySearchExpansionRatio === "number" ? `expand ${(input.postgresQuerySearchExpansionRatio * 100).toFixed(0)}%` : undefined,
|
|
2558
2564
|
typeof input?.postgresQueryBackfillCount === "number" ? `backfill ${input.postgresQueryBackfillCount}` : undefined,
|
|
2565
|
+
typeof input?.postgresQueryBackfillLimitReached === "boolean" && input.postgresQueryBackfillLimitReached ? "backfill limit reached" : undefined,
|
|
2566
|
+
typeof input?.postgresQueryMinResultsSatisfied === "boolean" && input.postgresQueryMinResultsSatisfied ? "min satisfied" : undefined,
|
|
2559
2567
|
typeof input?.postgresQueryReturnedCount === "number" ? `returned ${input.postgresQueryReturnedCount}` : undefined,
|
|
2560
2568
|
typeof input?.postgresQueryCandidateYieldRatio === "number" ? `yield ${(input.postgresQueryCandidateYieldRatio * 100).toFixed(0)}%` : undefined,
|
|
2561
2569
|
typeof input?.postgresQueryTopKFillRatio === "number" ? `fill ${(input.postgresQueryTopKFillRatio * 100).toFixed(0)}%` : undefined,
|
|
@@ -2577,6 +2585,8 @@ var formatComparisonSQLitePlannerCueSummary = (entry) => {
|
|
|
2577
2585
|
sqliteQuerySearchExpansionRatio: snapshot.sqliteQuerySearchExpansionRatio,
|
|
2578
2586
|
sqliteQueryJsRemainderClauseCount: snapshot.sqliteQueryJsRemainderClauseCount,
|
|
2579
2587
|
sqliteQueryCandidateLimitUsed: snapshot.sqliteQueryCandidateLimitUsed,
|
|
2588
|
+
sqliteQueryMaxBackfillsUsed: snapshot.sqliteQueryMaxBackfillsUsed,
|
|
2589
|
+
sqliteQueryMinResultsUsed: snapshot.sqliteQueryMinResultsUsed,
|
|
2580
2590
|
sqliteQueryMode: snapshot.sqliteQueryMode,
|
|
2581
2591
|
sqliteQueryPushdownApplied: snapshot.sqliteQueryPushdownApplied,
|
|
2582
2592
|
sqliteQueryPushdownClauseCount: snapshot.sqliteQueryPushdownClauseCount,
|
|
@@ -2584,6 +2594,8 @@ var formatComparisonSQLitePlannerCueSummary = (entry) => {
|
|
|
2584
2594
|
sqliteQueryPushdownMode: snapshot.sqliteQueryPushdownMode,
|
|
2585
2595
|
sqliteQueryTotalFilterClauseCount: snapshot.sqliteQueryTotalFilterClauseCount,
|
|
2586
2596
|
sqliteQueryReturnedCount: snapshot.sqliteQueryReturnedCount,
|
|
2597
|
+
sqliteQueryBackfillLimitReached: snapshot.sqliteQueryBackfillLimitReached,
|
|
2598
|
+
sqliteQueryMinResultsSatisfied: snapshot.sqliteQueryMinResultsSatisfied,
|
|
2587
2599
|
sqliteQueryCandidateYieldRatio: snapshot.sqliteQueryCandidateYieldRatio,
|
|
2588
2600
|
sqliteQueryTopKFillRatio: snapshot.sqliteQueryTopKFillRatio,
|
|
2589
2601
|
sqliteQueryJsRemainderRatio: snapshot.sqliteQueryJsRemainderRatio,
|
|
@@ -2602,6 +2614,8 @@ var formatComparisonPostgresPlannerCueSummary = (entry) => {
|
|
|
2602
2614
|
postgresQuerySearchExpansionRatio: snapshot.postgresQuerySearchExpansionRatio,
|
|
2603
2615
|
postgresQueryJsRemainderClauseCount: snapshot.postgresQueryJsRemainderClauseCount,
|
|
2604
2616
|
postgresQueryCandidateLimitUsed: snapshot.postgresQueryCandidateLimitUsed,
|
|
2617
|
+
postgresQueryMaxBackfillsUsed: snapshot.postgresQueryMaxBackfillsUsed,
|
|
2618
|
+
postgresQueryMinResultsUsed: snapshot.postgresQueryMinResultsUsed,
|
|
2605
2619
|
postgresQueryMultiplierUsed: snapshot.postgresQueryMultiplierUsed,
|
|
2606
2620
|
postgresQueryMode: snapshot.postgresQueryMode,
|
|
2607
2621
|
postgresQueryPushdownApplied: snapshot.postgresQueryPushdownApplied,
|
|
@@ -2610,6 +2624,8 @@ var formatComparisonPostgresPlannerCueSummary = (entry) => {
|
|
|
2610
2624
|
postgresQueryPushdownMode: snapshot.postgresQueryPushdownMode,
|
|
2611
2625
|
postgresQueryTotalFilterClauseCount: snapshot.postgresQueryTotalFilterClauseCount,
|
|
2612
2626
|
postgresQueryReturnedCount: snapshot.postgresQueryReturnedCount,
|
|
2627
|
+
postgresQueryBackfillLimitReached: snapshot.postgresQueryBackfillLimitReached,
|
|
2628
|
+
postgresQueryMinResultsSatisfied: snapshot.postgresQueryMinResultsSatisfied,
|
|
2613
2629
|
postgresQueryCandidateYieldRatio: snapshot.postgresQueryCandidateYieldRatio,
|
|
2614
2630
|
postgresQueryTopKFillRatio: snapshot.postgresQueryTopKFillRatio,
|
|
2615
2631
|
postgresQueryJsRemainderRatio: snapshot.postgresQueryJsRemainderRatio,
|
|
@@ -2768,6 +2784,8 @@ var formatHistorySQLitePlannerShift = (history) => {
|
|
|
2768
2784
|
sqliteQuerySearchExpansionRatio: entry.previousSqliteQuerySearchExpansionRatio,
|
|
2769
2785
|
sqliteQueryJsRemainderClauseCount: entry.previousSqliteQueryJsRemainderClauseCount,
|
|
2770
2786
|
sqliteQueryCandidateLimitUsed: entry.previousSqliteQueryCandidateLimitUsed,
|
|
2787
|
+
sqliteQueryMaxBackfillsUsed: entry.previousSqliteQueryMaxBackfillsUsed,
|
|
2788
|
+
sqliteQueryMinResultsUsed: entry.previousSqliteQueryMinResultsUsed,
|
|
2771
2789
|
sqliteQueryMode: entry.previousSqliteQueryMode,
|
|
2772
2790
|
sqliteQueryPushdownApplied: entry.previousSqliteQueryPushdownApplied,
|
|
2773
2791
|
sqliteQueryPushdownClauseCount: entry.previousSqliteQueryPushdownClauseCount,
|
|
@@ -2776,6 +2794,8 @@ var formatHistorySQLitePlannerShift = (history) => {
|
|
|
2776
2794
|
sqliteQueryTotalFilterClauseCount: entry.previousSqliteQueryTotalFilterClauseCount,
|
|
2777
2795
|
sqliteQueryJsRemainderRatio: entry.previousSqliteQueryJsRemainderRatio,
|
|
2778
2796
|
sqliteQueryReturnedCount: entry.previousSqliteQueryReturnedCount,
|
|
2797
|
+
sqliteQueryBackfillLimitReached: entry.previousSqliteQueryBackfillLimitReached,
|
|
2798
|
+
sqliteQueryMinResultsSatisfied: entry.previousSqliteQueryMinResultsSatisfied,
|
|
2779
2799
|
sqliteQueryCandidateYieldRatio: entry.previousSqliteQueryCandidateYieldRatio,
|
|
2780
2800
|
sqliteQueryTopKFillRatio: entry.previousSqliteQueryTopKFillRatio,
|
|
2781
2801
|
sqliteQueryUnderfilledTopK: entry.previousSqliteQueryUnderfilledTopK
|
|
@@ -2803,6 +2823,8 @@ var formatHistoryPostgresPlannerShift = (history) => {
|
|
|
2803
2823
|
postgresQuerySearchExpansionRatio: entry.previousPostgresQuerySearchExpansionRatio,
|
|
2804
2824
|
postgresQueryJsRemainderClauseCount: entry.previousPostgresQueryJsRemainderClauseCount,
|
|
2805
2825
|
postgresQueryCandidateLimitUsed: entry.previousPostgresQueryCandidateLimitUsed,
|
|
2826
|
+
postgresQueryMaxBackfillsUsed: entry.previousPostgresQueryMaxBackfillsUsed,
|
|
2827
|
+
postgresQueryMinResultsUsed: entry.previousPostgresQueryMinResultsUsed,
|
|
2806
2828
|
postgresQueryMultiplierUsed: entry.previousPostgresQueryMultiplierUsed,
|
|
2807
2829
|
postgresQueryMode: entry.previousPostgresQueryMode,
|
|
2808
2830
|
postgresQueryPushdownApplied: entry.previousPostgresQueryPushdownApplied,
|
|
@@ -2812,6 +2834,8 @@ var formatHistoryPostgresPlannerShift = (history) => {
|
|
|
2812
2834
|
postgresQueryTotalFilterClauseCount: entry.previousPostgresQueryTotalFilterClauseCount,
|
|
2813
2835
|
postgresQueryJsRemainderRatio: entry.previousPostgresQueryJsRemainderRatio,
|
|
2814
2836
|
postgresQueryReturnedCount: entry.previousPostgresQueryReturnedCount,
|
|
2837
|
+
postgresQueryBackfillLimitReached: entry.previousPostgresQueryBackfillLimitReached,
|
|
2838
|
+
postgresQueryMinResultsSatisfied: entry.previousPostgresQueryMinResultsSatisfied,
|
|
2815
2839
|
postgresQueryCandidateYieldRatio: entry.previousPostgresQueryCandidateYieldRatio,
|
|
2816
2840
|
postgresQueryTopKFillRatio: entry.previousPostgresQueryTopKFillRatio,
|
|
2817
2841
|
postgresQueryUnderfilledTopK: entry.previousPostgresQueryUnderfilledTopK
|
|
@@ -3868,10 +3892,14 @@ var buildEvaluationSQLiteQueryPlanSnapshot = (trace) => {
|
|
|
3868
3892
|
sqliteQueryJsRemainderClauseCount: typeof metadata.sqliteQueryJsRemainderClauseCount === "number" ? metadata.sqliteQueryJsRemainderClauseCount : undefined,
|
|
3869
3893
|
sqliteQueryMultiplierUsed: typeof metadata.sqliteQueryMultiplierUsed === "number" ? metadata.sqliteQueryMultiplierUsed : undefined,
|
|
3870
3894
|
sqliteQueryCandidateLimitUsed: typeof metadata.sqliteQueryCandidateLimitUsed === "number" ? metadata.sqliteQueryCandidateLimitUsed : undefined,
|
|
3895
|
+
sqliteQueryMaxBackfillsUsed: typeof metadata.sqliteQueryMaxBackfillsUsed === "number" ? metadata.sqliteQueryMaxBackfillsUsed : undefined,
|
|
3896
|
+
sqliteQueryMinResultsUsed: typeof metadata.sqliteQueryMinResultsUsed === "number" ? metadata.sqliteQueryMinResultsUsed : undefined,
|
|
3871
3897
|
sqliteQueryPushdownCoverageRatio: typeof metadata.sqliteQueryPushdownCoverageRatio === "number" ? metadata.sqliteQueryPushdownCoverageRatio : undefined,
|
|
3872
3898
|
sqliteQueryJsRemainderRatio: typeof metadata.sqliteQueryJsRemainderRatio === "number" ? metadata.sqliteQueryJsRemainderRatio : undefined,
|
|
3873
3899
|
sqliteQueryReturnedCount: typeof metadata.sqliteQueryReturnedCount === "number" ? metadata.sqliteQueryReturnedCount : undefined,
|
|
3874
3900
|
sqliteQueryCandidateYieldRatio: typeof metadata.sqliteQueryCandidateYieldRatio === "number" ? metadata.sqliteQueryCandidateYieldRatio : undefined,
|
|
3901
|
+
sqliteQueryBackfillLimitReached: typeof metadata.sqliteQueryBackfillLimitReached === "boolean" ? metadata.sqliteQueryBackfillLimitReached : undefined,
|
|
3902
|
+
sqliteQueryMinResultsSatisfied: typeof metadata.sqliteQueryMinResultsSatisfied === "boolean" ? metadata.sqliteQueryMinResultsSatisfied : undefined,
|
|
3875
3903
|
sqliteQueryTopKFillRatio: typeof metadata.sqliteQueryTopKFillRatio === "number" ? metadata.sqliteQueryTopKFillRatio : undefined,
|
|
3876
3904
|
sqliteQueryUnderfilledTopK: typeof metadata.sqliteQueryUnderfilledTopK === "boolean" ? metadata.sqliteQueryUnderfilledTopK : undefined
|
|
3877
3905
|
};
|
|
@@ -3895,10 +3923,14 @@ var buildEvaluationPostgresQueryPlanSnapshot = (trace) => {
|
|
|
3895
3923
|
postgresQueryJsRemainderClauseCount: typeof metadata.postgresQueryJsRemainderClauseCount === "number" ? metadata.postgresQueryJsRemainderClauseCount : undefined,
|
|
3896
3924
|
postgresQueryMultiplierUsed: typeof metadata.postgresQueryMultiplierUsed === "number" ? metadata.postgresQueryMultiplierUsed : undefined,
|
|
3897
3925
|
postgresQueryCandidateLimitUsed: typeof metadata.postgresQueryCandidateLimitUsed === "number" ? metadata.postgresQueryCandidateLimitUsed : undefined,
|
|
3926
|
+
postgresQueryMaxBackfillsUsed: typeof metadata.postgresQueryMaxBackfillsUsed === "number" ? metadata.postgresQueryMaxBackfillsUsed : undefined,
|
|
3927
|
+
postgresQueryMinResultsUsed: typeof metadata.postgresQueryMinResultsUsed === "number" ? metadata.postgresQueryMinResultsUsed : undefined,
|
|
3898
3928
|
postgresQueryPushdownCoverageRatio: typeof metadata.postgresQueryPushdownCoverageRatio === "number" ? metadata.postgresQueryPushdownCoverageRatio : undefined,
|
|
3899
3929
|
postgresQueryJsRemainderRatio: typeof metadata.postgresQueryJsRemainderRatio === "number" ? metadata.postgresQueryJsRemainderRatio : undefined,
|
|
3900
3930
|
postgresQueryReturnedCount: typeof metadata.postgresQueryReturnedCount === "number" ? metadata.postgresQueryReturnedCount : undefined,
|
|
3901
3931
|
postgresQueryCandidateYieldRatio: typeof metadata.postgresQueryCandidateYieldRatio === "number" ? metadata.postgresQueryCandidateYieldRatio : undefined,
|
|
3932
|
+
postgresQueryBackfillLimitReached: typeof metadata.postgresQueryBackfillLimitReached === "boolean" ? metadata.postgresQueryBackfillLimitReached : undefined,
|
|
3933
|
+
postgresQueryMinResultsSatisfied: typeof metadata.postgresQueryMinResultsSatisfied === "boolean" ? metadata.postgresQueryMinResultsSatisfied : undefined,
|
|
3902
3934
|
postgresQueryTopKFillRatio: typeof metadata.postgresQueryTopKFillRatio === "number" ? metadata.postgresQueryTopKFillRatio : undefined,
|
|
3903
3935
|
postgresQueryUnderfilledTopK: typeof metadata.postgresQueryUnderfilledTopK === "boolean" ? metadata.postgresQueryUnderfilledTopK : undefined
|
|
3904
3936
|
};
|
|
@@ -5151,6 +5183,8 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5151
5183
|
const sqliteQueryJsRemainderClauseCount = currentSQLiteQueryPlanSnapshot.sqliteQueryJsRemainderClauseCount ?? currentSnapshot?.sqliteQueryJsRemainderClauseCount;
|
|
5152
5184
|
const sqliteQueryMultiplierUsed = currentSQLiteQueryPlanSnapshot.sqliteQueryMultiplierUsed ?? currentSnapshot?.sqliteQueryMultiplierUsed;
|
|
5153
5185
|
const sqliteQueryCandidateLimitUsed = currentSQLiteQueryPlanSnapshot.sqliteQueryCandidateLimitUsed ?? currentSnapshot?.sqliteQueryCandidateLimitUsed;
|
|
5186
|
+
const sqliteQueryMaxBackfillsUsed = currentSQLiteQueryPlanSnapshot.sqliteQueryMaxBackfillsUsed ?? currentSnapshot?.sqliteQueryMaxBackfillsUsed;
|
|
5187
|
+
const sqliteQueryMinResultsUsed = currentSQLiteQueryPlanSnapshot.sqliteQueryMinResultsUsed ?? currentSnapshot?.sqliteQueryMinResultsUsed;
|
|
5154
5188
|
const sqliteQueryPushdownCoverageRatio = currentSQLiteQueryPlanSnapshot.sqliteQueryPushdownCoverageRatio ?? currentSnapshot?.sqliteQueryPushdownCoverageRatio;
|
|
5155
5189
|
const sqliteQueryJsRemainderRatio = currentSQLiteQueryPlanSnapshot.sqliteQueryJsRemainderRatio ?? currentSnapshot?.sqliteQueryJsRemainderRatio;
|
|
5156
5190
|
const sqliteQueryFilteredCandidates = currentSQLiteQueryPlanSnapshot.sqliteQueryFilteredCandidates ?? currentSnapshot?.sqliteQueryFilteredCandidates;
|
|
@@ -5158,6 +5192,8 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5158
5192
|
const sqliteQueryFinalSearchK = currentSQLiteQueryPlanSnapshot.sqliteQueryFinalSearchK ?? currentSnapshot?.sqliteQueryFinalSearchK;
|
|
5159
5193
|
const sqliteQuerySearchExpansionRatio = currentSQLiteQueryPlanSnapshot.sqliteQuerySearchExpansionRatio ?? currentSnapshot?.sqliteQuerySearchExpansionRatio;
|
|
5160
5194
|
const sqliteQueryBackfillCount = currentSQLiteQueryPlanSnapshot.sqliteQueryBackfillCount ?? currentSnapshot?.sqliteQueryBackfillCount;
|
|
5195
|
+
const sqliteQueryBackfillLimitReached = currentSQLiteQueryPlanSnapshot.sqliteQueryBackfillLimitReached ?? currentSnapshot?.sqliteQueryBackfillLimitReached;
|
|
5196
|
+
const sqliteQueryMinResultsSatisfied = currentSQLiteQueryPlanSnapshot.sqliteQueryMinResultsSatisfied ?? currentSnapshot?.sqliteQueryMinResultsSatisfied;
|
|
5161
5197
|
const sqliteQueryReturnedCount = currentSQLiteQueryPlanSnapshot.sqliteQueryReturnedCount ?? currentSnapshot?.sqliteQueryReturnedCount;
|
|
5162
5198
|
const sqliteQueryCandidateYieldRatio = currentSQLiteQueryPlanSnapshot.sqliteQueryCandidateYieldRatio ?? currentSnapshot?.sqliteQueryCandidateYieldRatio;
|
|
5163
5199
|
const sqliteQueryTopKFillRatio = currentSQLiteQueryPlanSnapshot.sqliteQueryTopKFillRatio ?? currentSnapshot?.sqliteQueryTopKFillRatio;
|
|
@@ -5172,6 +5208,8 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5172
5208
|
const postgresQueryJsRemainderClauseCount = currentPostgresQueryPlanSnapshot.postgresQueryJsRemainderClauseCount ?? currentSnapshot?.postgresQueryJsRemainderClauseCount;
|
|
5173
5209
|
const postgresQueryMultiplierUsed = currentPostgresQueryPlanSnapshot.postgresQueryMultiplierUsed ?? currentSnapshot?.postgresQueryMultiplierUsed;
|
|
5174
5210
|
const postgresQueryCandidateLimitUsed = currentPostgresQueryPlanSnapshot.postgresQueryCandidateLimitUsed ?? currentSnapshot?.postgresQueryCandidateLimitUsed;
|
|
5211
|
+
const postgresQueryMaxBackfillsUsed = currentPostgresQueryPlanSnapshot.postgresQueryMaxBackfillsUsed ?? currentSnapshot?.postgresQueryMaxBackfillsUsed;
|
|
5212
|
+
const postgresQueryMinResultsUsed = currentPostgresQueryPlanSnapshot.postgresQueryMinResultsUsed ?? currentSnapshot?.postgresQueryMinResultsUsed;
|
|
5175
5213
|
const postgresQueryPushdownCoverageRatio = currentPostgresQueryPlanSnapshot.postgresQueryPushdownCoverageRatio ?? currentSnapshot?.postgresQueryPushdownCoverageRatio;
|
|
5176
5214
|
const postgresQueryJsRemainderRatio = currentPostgresQueryPlanSnapshot.postgresQueryJsRemainderRatio ?? currentSnapshot?.postgresQueryJsRemainderRatio;
|
|
5177
5215
|
const postgresQueryFilteredCandidates = currentPostgresQueryPlanSnapshot.postgresQueryFilteredCandidates ?? currentSnapshot?.postgresQueryFilteredCandidates;
|
|
@@ -5179,6 +5217,8 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5179
5217
|
const postgresQueryFinalSearchK = currentPostgresQueryPlanSnapshot.postgresQueryFinalSearchK ?? currentSnapshot?.postgresQueryFinalSearchK;
|
|
5180
5218
|
const postgresQuerySearchExpansionRatio = currentPostgresQueryPlanSnapshot.postgresQuerySearchExpansionRatio ?? currentSnapshot?.postgresQuerySearchExpansionRatio;
|
|
5181
5219
|
const postgresQueryBackfillCount = currentPostgresQueryPlanSnapshot.postgresQueryBackfillCount ?? currentSnapshot?.postgresQueryBackfillCount;
|
|
5220
|
+
const postgresQueryBackfillLimitReached = currentPostgresQueryPlanSnapshot.postgresQueryBackfillLimitReached ?? currentSnapshot?.postgresQueryBackfillLimitReached;
|
|
5221
|
+
const postgresQueryMinResultsSatisfied = currentPostgresQueryPlanSnapshot.postgresQueryMinResultsSatisfied ?? currentSnapshot?.postgresQueryMinResultsSatisfied;
|
|
5182
5222
|
const postgresQueryReturnedCount = currentPostgresQueryPlanSnapshot.postgresQueryReturnedCount ?? currentSnapshot?.postgresQueryReturnedCount;
|
|
5183
5223
|
const postgresQueryCandidateYieldRatio = currentPostgresQueryPlanSnapshot.postgresQueryCandidateYieldRatio ?? currentSnapshot?.postgresQueryCandidateYieldRatio;
|
|
5184
5224
|
const postgresQueryTopKFillRatio = currentPostgresQueryPlanSnapshot.postgresQueryTopKFillRatio ?? currentSnapshot?.postgresQueryTopKFillRatio;
|
|
@@ -5189,7 +5229,7 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5189
5229
|
const previousFilterSignature = JSON.stringify(previousTrace?.inputFilter ?? undefined);
|
|
5190
5230
|
const currentRetrievalSignature = JSON.stringify(retrieval ?? undefined);
|
|
5191
5231
|
const previousRetrievalSignature = JSON.stringify(previousTrace?.inputRetrieval ?? undefined);
|
|
5192
|
-
const traceChange = !previousTrace ? currentTrace ? "new" : "unchanged" : previousTrace.traceMode !== currentTrace?.mode || previousFilterSignature !== currentFilterSignature || previousRetrievalSignature !== currentRetrievalSignature || previousTrace.sourceBalanceStrategy !== currentTrace?.sourceBalanceStrategy || previousTrace.transformedQuery !== (currentTrace?.transformedQuery || undefined) || previousTrace.variantQueries.join("|") !== (currentTrace?.variantQueries ?? []).join("|") || previousTrace.finalCount !== (currentTrace?.resultCounts.final ?? 0) || previousTrace.vectorCount !== (currentTrace?.resultCounts.vector ?? 0) || previousTrace.lexicalCount !== (currentTrace?.resultCounts.lexical ?? 0) || previousTrace.candidateTopK !== (currentTrace?.candidateTopK ?? 0) || previousTrace.lexicalTopK !== (currentTrace?.lexicalTopK ?? 0) || previousTrace.topContextLabel !== topContextLabel || previousTrace.topLocatorLabel !== topLocatorLabel || previousTrace.sourceAwareChunkReasonLabel !== sourceAwareChunkReasonLabel || previousTrace.sourceAwareUnitScopeLabel !== sourceAwareUnitScopeLabel || previousTrace.leadSpeakerCue !== leadSpeakerCue || previousTrace.leadSpeakerAttributionCue !== leadSpeakerAttributionCue || previousTrace.leadChannelCue !== leadChannelCue || previousTrace.leadChannelAttributionCue !== leadChannelAttributionCue || previousTrace.leadContinuityCue !== leadContinuityCue || previousTrace.sqliteQueryMode !== sqliteQueryMode || previousTrace.sqliteQueryPushdownMode !== sqliteQueryPushdownMode || previousTrace.sqliteQueryPushdownApplied !== sqliteQueryPushdownApplied || previousTrace.sqliteQueryPushdownClauseCount !== sqliteQueryPushdownClauseCount || previousTrace.sqliteQueryTotalFilterClauseCount !== sqliteQueryTotalFilterClauseCount || previousTrace.sqliteQueryJsRemainderClauseCount !== sqliteQueryJsRemainderClauseCount || previousTrace.sqliteQueryMultiplierUsed !== sqliteQueryMultiplierUsed || previousTrace.sqliteQueryCandidateLimitUsed !== sqliteQueryCandidateLimitUsed || previousTrace.sqliteQueryPushdownCoverageRatio !== sqliteQueryPushdownCoverageRatio || previousTrace.sqliteQueryJsRemainderRatio !== sqliteQueryJsRemainderRatio || previousTrace.sqliteQueryFilteredCandidates !== sqliteQueryFilteredCandidates || previousTrace.sqliteQueryInitialSearchK !== sqliteQueryInitialSearchK || previousTrace.sqliteQueryFinalSearchK !== sqliteQueryFinalSearchK || previousTrace.sqliteQuerySearchExpansionRatio !== sqliteQuerySearchExpansionRatio || previousTrace.sqliteQueryBackfillCount !== sqliteQueryBackfillCount || previousTrace.sqliteQueryReturnedCount !== sqliteQueryReturnedCount || previousTrace.sqliteQueryCandidateYieldRatio !== sqliteQueryCandidateYieldRatio || previousTrace.sqliteQueryTopKFillRatio !== sqliteQueryTopKFillRatio || previousTrace.sqliteQueryUnderfilledTopK !== sqliteQueryUnderfilledTopK || previousTrace.sqliteQueryCandidateBudgetExhausted !== sqliteQueryCandidateBudgetExhausted || previousTrace.sqliteQueryCandidateCoverage !== sqliteQueryCandidateCoverage || previousTrace.postgresQueryMode !== postgresQueryMode || previousTrace.postgresQueryPushdownMode !== postgresQueryPushdownMode || previousTrace.postgresQueryPushdownApplied !== postgresQueryPushdownApplied || previousTrace.postgresQueryPushdownClauseCount !== postgresQueryPushdownClauseCount || previousTrace.postgresQueryTotalFilterClauseCount !== postgresQueryTotalFilterClauseCount || previousTrace.postgresQueryJsRemainderClauseCount !== postgresQueryJsRemainderClauseCount || previousTrace.postgresQueryMultiplierUsed !== postgresQueryMultiplierUsed || previousTrace.postgresQueryCandidateLimitUsed !== postgresQueryCandidateLimitUsed || previousTrace.postgresQueryPushdownCoverageRatio !== postgresQueryPushdownCoverageRatio || previousTrace.postgresQueryJsRemainderRatio !== postgresQueryJsRemainderRatio || previousTrace.postgresQueryFilteredCandidates !== postgresQueryFilteredCandidates || previousTrace.postgresQueryInitialSearchK !== postgresQueryInitialSearchK || previousTrace.postgresQueryFinalSearchK !== postgresQueryFinalSearchK || previousTrace.postgresQuerySearchExpansionRatio !== postgresQuerySearchExpansionRatio || previousTrace.postgresQueryBackfillCount !== postgresQueryBackfillCount || previousTrace.postgresQueryReturnedCount !== postgresQueryReturnedCount || previousTrace.postgresQueryCandidateYieldRatio !== postgresQueryCandidateYieldRatio || previousTrace.postgresQueryTopKFillRatio !== postgresQueryTopKFillRatio || previousTrace.postgresQueryUnderfilledTopK !== postgresQueryUnderfilledTopK || previousTrace.postgresQueryCandidateBudgetExhausted !== postgresQueryCandidateBudgetExhausted || previousTrace.postgresQueryCandidateCoverage !== postgresQueryCandidateCoverage || !areStageCountsEqual(previousStageCounts, stageCounts) ? "changed" : "unchanged";
|
|
5232
|
+
const traceChange = !previousTrace ? currentTrace ? "new" : "unchanged" : previousTrace.traceMode !== currentTrace?.mode || previousFilterSignature !== currentFilterSignature || previousRetrievalSignature !== currentRetrievalSignature || previousTrace.sourceBalanceStrategy !== currentTrace?.sourceBalanceStrategy || previousTrace.transformedQuery !== (currentTrace?.transformedQuery || undefined) || previousTrace.variantQueries.join("|") !== (currentTrace?.variantQueries ?? []).join("|") || previousTrace.finalCount !== (currentTrace?.resultCounts.final ?? 0) || previousTrace.vectorCount !== (currentTrace?.resultCounts.vector ?? 0) || previousTrace.lexicalCount !== (currentTrace?.resultCounts.lexical ?? 0) || previousTrace.candidateTopK !== (currentTrace?.candidateTopK ?? 0) || previousTrace.lexicalTopK !== (currentTrace?.lexicalTopK ?? 0) || previousTrace.topContextLabel !== topContextLabel || previousTrace.topLocatorLabel !== topLocatorLabel || previousTrace.sourceAwareChunkReasonLabel !== sourceAwareChunkReasonLabel || previousTrace.sourceAwareUnitScopeLabel !== sourceAwareUnitScopeLabel || previousTrace.leadSpeakerCue !== leadSpeakerCue || previousTrace.leadSpeakerAttributionCue !== leadSpeakerAttributionCue || previousTrace.leadChannelCue !== leadChannelCue || previousTrace.leadChannelAttributionCue !== leadChannelAttributionCue || previousTrace.leadContinuityCue !== leadContinuityCue || previousTrace.sqliteQueryMode !== sqliteQueryMode || previousTrace.sqliteQueryPushdownMode !== sqliteQueryPushdownMode || previousTrace.sqliteQueryPushdownApplied !== sqliteQueryPushdownApplied || previousTrace.sqliteQueryPushdownClauseCount !== sqliteQueryPushdownClauseCount || previousTrace.sqliteQueryTotalFilterClauseCount !== sqliteQueryTotalFilterClauseCount || previousTrace.sqliteQueryJsRemainderClauseCount !== sqliteQueryJsRemainderClauseCount || previousTrace.sqliteQueryMultiplierUsed !== sqliteQueryMultiplierUsed || previousTrace.sqliteQueryCandidateLimitUsed !== sqliteQueryCandidateLimitUsed || previousTrace.sqliteQueryMaxBackfillsUsed !== sqliteQueryMaxBackfillsUsed || previousTrace.sqliteQueryMinResultsUsed !== sqliteQueryMinResultsUsed || previousTrace.sqliteQueryPushdownCoverageRatio !== sqliteQueryPushdownCoverageRatio || previousTrace.sqliteQueryJsRemainderRatio !== sqliteQueryJsRemainderRatio || previousTrace.sqliteQueryFilteredCandidates !== sqliteQueryFilteredCandidates || previousTrace.sqliteQueryInitialSearchK !== sqliteQueryInitialSearchK || previousTrace.sqliteQueryFinalSearchK !== sqliteQueryFinalSearchK || previousTrace.sqliteQuerySearchExpansionRatio !== sqliteQuerySearchExpansionRatio || previousTrace.sqliteQueryBackfillCount !== sqliteQueryBackfillCount || previousTrace.sqliteQueryBackfillLimitReached !== sqliteQueryBackfillLimitReached || previousTrace.sqliteQueryMinResultsSatisfied !== sqliteQueryMinResultsSatisfied || previousTrace.sqliteQueryReturnedCount !== sqliteQueryReturnedCount || previousTrace.sqliteQueryCandidateYieldRatio !== sqliteQueryCandidateYieldRatio || previousTrace.sqliteQueryTopKFillRatio !== sqliteQueryTopKFillRatio || previousTrace.sqliteQueryUnderfilledTopK !== sqliteQueryUnderfilledTopK || previousTrace.sqliteQueryCandidateBudgetExhausted !== sqliteQueryCandidateBudgetExhausted || previousTrace.sqliteQueryCandidateCoverage !== sqliteQueryCandidateCoverage || previousTrace.postgresQueryMode !== postgresQueryMode || previousTrace.postgresQueryPushdownMode !== postgresQueryPushdownMode || previousTrace.postgresQueryPushdownApplied !== postgresQueryPushdownApplied || previousTrace.postgresQueryPushdownClauseCount !== postgresQueryPushdownClauseCount || previousTrace.postgresQueryTotalFilterClauseCount !== postgresQueryTotalFilterClauseCount || previousTrace.postgresQueryJsRemainderClauseCount !== postgresQueryJsRemainderClauseCount || previousTrace.postgresQueryMultiplierUsed !== postgresQueryMultiplierUsed || previousTrace.postgresQueryCandidateLimitUsed !== postgresQueryCandidateLimitUsed || previousTrace.postgresQueryMaxBackfillsUsed !== postgresQueryMaxBackfillsUsed || previousTrace.postgresQueryMinResultsUsed !== postgresQueryMinResultsUsed || previousTrace.postgresQueryPushdownCoverageRatio !== postgresQueryPushdownCoverageRatio || previousTrace.postgresQueryJsRemainderRatio !== postgresQueryJsRemainderRatio || previousTrace.postgresQueryFilteredCandidates !== postgresQueryFilteredCandidates || previousTrace.postgresQueryInitialSearchK !== postgresQueryInitialSearchK || previousTrace.postgresQueryFinalSearchK !== postgresQueryFinalSearchK || previousTrace.postgresQuerySearchExpansionRatio !== postgresQuerySearchExpansionRatio || previousTrace.postgresQueryBackfillCount !== postgresQueryBackfillCount || previousTrace.postgresQueryBackfillLimitReached !== postgresQueryBackfillLimitReached || previousTrace.postgresQueryMinResultsSatisfied !== postgresQueryMinResultsSatisfied || previousTrace.postgresQueryReturnedCount !== postgresQueryReturnedCount || previousTrace.postgresQueryCandidateYieldRatio !== postgresQueryCandidateYieldRatio || previousTrace.postgresQueryTopKFillRatio !== postgresQueryTopKFillRatio || previousTrace.postgresQueryUnderfilledTopK !== postgresQueryUnderfilledTopK || previousTrace.postgresQueryCandidateBudgetExhausted !== postgresQueryCandidateBudgetExhausted || previousTrace.postgresQueryCandidateCoverage !== postgresQueryCandidateCoverage || !areStageCountsEqual(previousStageCounts, stageCounts) ? "changed" : "unchanged";
|
|
5193
5233
|
return {
|
|
5194
5234
|
candidateTopK: currentTrace?.candidateTopK ?? 0,
|
|
5195
5235
|
caseId: caseResult.caseId,
|
|
@@ -5212,6 +5252,8 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5212
5252
|
previousLeadSpeakerAttributionCue: previousTrace?.leadSpeakerAttributionCue,
|
|
5213
5253
|
previousLeadSpeakerCue: previousTrace?.leadSpeakerCue,
|
|
5214
5254
|
previousSqliteQueryBackfillCount: previousTrace?.sqliteQueryBackfillCount,
|
|
5255
|
+
previousSqliteQueryBackfillLimitReached: previousTrace?.sqliteQueryBackfillLimitReached,
|
|
5256
|
+
previousSqliteQueryMinResultsSatisfied: previousTrace?.sqliteQueryMinResultsSatisfied,
|
|
5215
5257
|
previousSqliteQueryCandidateBudgetExhausted: previousTrace?.sqliteQueryCandidateBudgetExhausted,
|
|
5216
5258
|
previousSqliteQueryCandidateCoverage: previousTrace?.sqliteQueryCandidateCoverage,
|
|
5217
5259
|
previousSqliteQueryFilteredCandidates: previousTrace?.sqliteQueryFilteredCandidates,
|
|
@@ -5226,6 +5268,8 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5226
5268
|
previousSqliteQueryJsRemainderClauseCount: previousTrace?.sqliteQueryJsRemainderClauseCount,
|
|
5227
5269
|
previousSqliteQueryMultiplierUsed: previousTrace?.sqliteQueryMultiplierUsed,
|
|
5228
5270
|
previousSqliteQueryCandidateLimitUsed: previousTrace?.sqliteQueryCandidateLimitUsed,
|
|
5271
|
+
previousSqliteQueryMaxBackfillsUsed: previousTrace?.sqliteQueryMaxBackfillsUsed,
|
|
5272
|
+
previousSqliteQueryMinResultsUsed: previousTrace?.sqliteQueryMinResultsUsed,
|
|
5229
5273
|
previousSqliteQueryPushdownCoverageRatio: previousTrace?.sqliteQueryPushdownCoverageRatio,
|
|
5230
5274
|
previousSqliteQueryJsRemainderRatio: previousTrace?.sqliteQueryJsRemainderRatio,
|
|
5231
5275
|
previousSqliteQueryReturnedCount: previousTrace?.sqliteQueryReturnedCount,
|
|
@@ -5233,6 +5277,8 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5233
5277
|
previousSqliteQueryTopKFillRatio: previousTrace?.sqliteQueryTopKFillRatio,
|
|
5234
5278
|
previousSqliteQueryUnderfilledTopK: previousTrace?.sqliteQueryUnderfilledTopK,
|
|
5235
5279
|
previousPostgresQueryBackfillCount: previousTrace?.postgresQueryBackfillCount,
|
|
5280
|
+
previousPostgresQueryBackfillLimitReached: previousTrace?.postgresQueryBackfillLimitReached,
|
|
5281
|
+
previousPostgresQueryMinResultsSatisfied: previousTrace?.postgresQueryMinResultsSatisfied,
|
|
5236
5282
|
previousPostgresQueryCandidateBudgetExhausted: previousTrace?.postgresQueryCandidateBudgetExhausted,
|
|
5237
5283
|
previousPostgresQueryCandidateCoverage: previousTrace?.postgresQueryCandidateCoverage,
|
|
5238
5284
|
previousPostgresQueryFilteredCandidates: previousTrace?.postgresQueryFilteredCandidates,
|
|
@@ -5247,6 +5293,8 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5247
5293
|
previousPostgresQueryJsRemainderClauseCount: previousTrace?.postgresQueryJsRemainderClauseCount,
|
|
5248
5294
|
previousPostgresQueryMultiplierUsed: previousTrace?.postgresQueryMultiplierUsed,
|
|
5249
5295
|
previousPostgresQueryCandidateLimitUsed: previousTrace?.postgresQueryCandidateLimitUsed,
|
|
5296
|
+
previousPostgresQueryMaxBackfillsUsed: previousTrace?.postgresQueryMaxBackfillsUsed,
|
|
5297
|
+
previousPostgresQueryMinResultsUsed: previousTrace?.postgresQueryMinResultsUsed,
|
|
5250
5298
|
previousPostgresQueryPushdownCoverageRatio: previousTrace?.postgresQueryPushdownCoverageRatio,
|
|
5251
5299
|
previousPostgresQueryJsRemainderRatio: previousTrace?.postgresQueryJsRemainderRatio,
|
|
5252
5300
|
previousPostgresQueryReturnedCount: previousTrace?.postgresQueryReturnedCount,
|
|
@@ -5270,6 +5318,8 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5270
5318
|
leadSpeakerAttributionCue,
|
|
5271
5319
|
leadSpeakerCue,
|
|
5272
5320
|
sqliteQueryBackfillCount,
|
|
5321
|
+
sqliteQueryBackfillLimitReached,
|
|
5322
|
+
sqliteQueryMinResultsSatisfied,
|
|
5273
5323
|
sqliteQueryCandidateBudgetExhausted,
|
|
5274
5324
|
sqliteQueryCandidateCoverage,
|
|
5275
5325
|
sqliteQueryFilteredCandidates,
|
|
@@ -5284,6 +5334,8 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5284
5334
|
sqliteQueryJsRemainderClauseCount,
|
|
5285
5335
|
sqliteQueryMultiplierUsed,
|
|
5286
5336
|
sqliteQueryCandidateLimitUsed,
|
|
5337
|
+
sqliteQueryMaxBackfillsUsed,
|
|
5338
|
+
sqliteQueryMinResultsUsed,
|
|
5287
5339
|
sqliteQueryPushdownCoverageRatio,
|
|
5288
5340
|
sqliteQueryJsRemainderRatio,
|
|
5289
5341
|
sqliteQueryReturnedCount,
|
|
@@ -5291,6 +5343,8 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5291
5343
|
sqliteQueryTopKFillRatio,
|
|
5292
5344
|
sqliteQueryUnderfilledTopK,
|
|
5293
5345
|
postgresQueryBackfillCount,
|
|
5346
|
+
postgresQueryBackfillLimitReached,
|
|
5347
|
+
postgresQueryMinResultsSatisfied,
|
|
5294
5348
|
postgresQueryCandidateBudgetExhausted,
|
|
5295
5349
|
postgresQueryCandidateCoverage,
|
|
5296
5350
|
postgresQueryFilteredCandidates,
|
|
@@ -5305,6 +5359,8 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5305
5359
|
postgresQueryJsRemainderClauseCount,
|
|
5306
5360
|
postgresQueryMultiplierUsed,
|
|
5307
5361
|
postgresQueryCandidateLimitUsed,
|
|
5362
|
+
postgresQueryMaxBackfillsUsed,
|
|
5363
|
+
postgresQueryMinResultsUsed,
|
|
5308
5364
|
postgresQueryPushdownCoverageRatio,
|
|
5309
5365
|
postgresQueryJsRemainderRatio,
|
|
5310
5366
|
postgresQueryReturnedCount,
|
|
@@ -16922,9 +16978,13 @@ var buildStoreQueryPlanTraceMetadata = (store) => {
|
|
|
16922
16978
|
sqliteQueryJsRemainderClauseCount: sqliteNativePlan.jsRemainderClauseCount,
|
|
16923
16979
|
sqliteQueryMultiplierUsed: sqliteNativePlan.queryMultiplierUsed ?? null,
|
|
16924
16980
|
sqliteQueryCandidateLimitUsed: sqliteNativePlan.candidateLimitUsed ?? null,
|
|
16981
|
+
sqliteQueryMaxBackfillsUsed: sqliteNativePlan.maxBackfillsUsed ?? null,
|
|
16982
|
+
sqliteQueryMinResultsUsed: sqliteNativePlan.minResultsUsed ?? null,
|
|
16925
16983
|
sqliteQueryJsRemainderRatio: sqliteNativePlan.jsRemainderRatio ?? null,
|
|
16926
16984
|
sqliteQueryCandidateYieldRatio: sqliteNativePlan.candidateYieldRatio ?? null,
|
|
16927
16985
|
sqliteQueryReturnedCount: sqliteNativePlan.returnedCount ?? null,
|
|
16986
|
+
sqliteQueryBackfillLimitReached: sqliteNativePlan.backfillLimitReached ?? null,
|
|
16987
|
+
sqliteQueryMinResultsSatisfied: sqliteNativePlan.minResultsSatisfied ?? null,
|
|
16928
16988
|
sqliteQueryTopKFillRatio: sqliteNativePlan.topKFillRatio ?? null,
|
|
16929
16989
|
sqliteQueryUnderfilledTopK: sqliteNativePlan.underfilledTopK ?? null
|
|
16930
16990
|
};
|
|
@@ -16950,9 +17010,13 @@ var buildStoreQueryPlanTraceMetadata = (store) => {
|
|
|
16950
17010
|
postgresQueryJsRemainderClauseCount: postgresNativePlan.jsRemainderClauseCount,
|
|
16951
17011
|
postgresQueryMultiplierUsed: postgresNativePlan.queryMultiplierUsed ?? null,
|
|
16952
17012
|
postgresQueryCandidateLimitUsed: postgresNativePlan.candidateLimitUsed ?? null,
|
|
17013
|
+
postgresQueryMaxBackfillsUsed: postgresNativePlan.maxBackfillsUsed ?? null,
|
|
17014
|
+
postgresQueryMinResultsUsed: postgresNativePlan.minResultsUsed ?? null,
|
|
16953
17015
|
postgresQueryJsRemainderRatio: postgresNativePlan.jsRemainderRatio ?? null,
|
|
16954
17016
|
postgresQueryCandidateYieldRatio: postgresNativePlan.candidateYieldRatio ?? null,
|
|
16955
17017
|
postgresQueryReturnedCount: postgresNativePlan.returnedCount ?? null,
|
|
17018
|
+
postgresQueryBackfillLimitReached: postgresNativePlan.backfillLimitReached ?? null,
|
|
17019
|
+
postgresQueryMinResultsSatisfied: postgresNativePlan.minResultsSatisfied ?? null,
|
|
16956
17020
|
postgresQueryTopKFillRatio: postgresNativePlan.topKFillRatio ?? null,
|
|
16957
17021
|
postgresQueryUnderfilledTopK: postgresNativePlan.underfilledTopK ?? null
|
|
16958
17022
|
};
|
|
@@ -17082,6 +17146,8 @@ var createRAGCollection = (options) => {
|
|
|
17082
17146
|
}, "query").then((nextQueryVector) => options.store.query({
|
|
17083
17147
|
filter: input.filter,
|
|
17084
17148
|
candidateLimit: input.nativeCandidateLimit,
|
|
17149
|
+
maxBackfills: input.nativeMaxBackfills,
|
|
17150
|
+
minResults: input.nativeMinResults,
|
|
17085
17151
|
queryMultiplier: input.nativeQueryMultiplier,
|
|
17086
17152
|
queryVector: nextQueryVector,
|
|
17087
17153
|
topK: candidateTopK
|
|
@@ -22073,6 +22139,8 @@ var ragChat = (config) => {
|
|
|
22073
22139
|
const input = {
|
|
22074
22140
|
filter: getObjectProperty(body, "filter"),
|
|
22075
22141
|
nativeCandidateLimit: typeof body.nativeCandidateLimit === "number" ? body.nativeCandidateLimit : undefined,
|
|
22142
|
+
nativeMaxBackfills: typeof body.nativeMaxBackfills === "number" ? body.nativeMaxBackfills : undefined,
|
|
22143
|
+
nativeMinResults: typeof body.nativeMinResults === "number" ? body.nativeMinResults : undefined,
|
|
22076
22144
|
nativeQueryMultiplier: typeof body.nativeQueryMultiplier === "number" ? body.nativeQueryMultiplier : undefined,
|
|
22077
22145
|
retrieval: undefined,
|
|
22078
22146
|
model: getStringProperty(body, "model"),
|
|
@@ -28759,6 +28827,9 @@ var planNativeCandidateSearchK = (input) => {
|
|
|
28759
28827
|
return Math.min(base, filtered);
|
|
28760
28828
|
};
|
|
28761
28829
|
var planNativeCandidateSearchBackfillK = (input) => {
|
|
28830
|
+
if (typeof input.maxBackfills === "number" && Number.isFinite(input.maxBackfills) && (input.backfillCount ?? 0) >= Math.max(0, Math.floor(input.maxBackfills))) {
|
|
28831
|
+
return input.currentSearchK;
|
|
28832
|
+
}
|
|
28762
28833
|
const cappedLimit = input.filteredCandidateCount === undefined || !Number.isFinite(input.filteredCandidateCount) ? input.candidateLimit : Math.min(input.candidateLimit, Math.max(0, Math.floor(input.filteredCandidateCount)));
|
|
28763
28834
|
if (input.currentSearchK >= cappedLimit) {
|
|
28764
28835
|
return input.currentSearchK;
|
|
@@ -29017,6 +29088,18 @@ var normalizeCandidateLimit = (value) => {
|
|
|
29017
29088
|
}
|
|
29018
29089
|
return Math.min(RAG_NATIVE_QUERY_CANDIDATE_LIMIT, Math.max(1, Math.floor(value)));
|
|
29019
29090
|
};
|
|
29091
|
+
var normalizeMaxBackfills = (value) => {
|
|
29092
|
+
if (value === undefined || !Number.isFinite(value)) {
|
|
29093
|
+
return;
|
|
29094
|
+
}
|
|
29095
|
+
return Math.max(0, Math.floor(value));
|
|
29096
|
+
};
|
|
29097
|
+
var normalizeMinResults = (value, topK) => {
|
|
29098
|
+
if (value === undefined || !Number.isFinite(value)) {
|
|
29099
|
+
return topK;
|
|
29100
|
+
}
|
|
29101
|
+
return Math.min(topK, Math.max(1, Math.floor(value)));
|
|
29102
|
+
};
|
|
29020
29103
|
var toQualifiedTableName = (schemaName, tableName) => `${schemaName}.${tableName}`;
|
|
29021
29104
|
var toVectorLiteral = (vector) => `[${vector.join(",")}]`;
|
|
29022
29105
|
var parseMetadata = (value) => {
|
|
@@ -29105,6 +29188,8 @@ var updatePostgresLastQueryPlan = (input) => {
|
|
|
29105
29188
|
initialSearchK: input.initialSearchK,
|
|
29106
29189
|
searchExpansionRatio: typeof input.initialSearchK === "number" && typeof input.finalSearchK === "number" && input.initialSearchK > 0 ? input.finalSearchK / input.initialSearchK : undefined,
|
|
29107
29190
|
candidateLimitUsed: input.candidateLimitUsed,
|
|
29191
|
+
maxBackfillsUsed: input.maxBackfillsUsed,
|
|
29192
|
+
minResultsUsed: input.minResultsUsed,
|
|
29108
29193
|
jsRemainderClauseCount: pushdown.jsRemainderClauseCount,
|
|
29109
29194
|
queryMultiplierUsed: input.queryMultiplierUsed,
|
|
29110
29195
|
jsRemainderRatio: pushdown.jsRemainderRatio,
|
|
@@ -29115,6 +29200,8 @@ var updatePostgresLastQueryPlan = (input) => {
|
|
|
29115
29200
|
queryMode: "native_pgvector",
|
|
29116
29201
|
candidateYieldRatio: typeof input.returnedCount === "number" && typeof input.finalSearchK === "number" && input.finalSearchK > 0 ? input.returnedCount / input.finalSearchK : undefined,
|
|
29117
29202
|
returnedCount: input.returnedCount,
|
|
29203
|
+
backfillLimitReached: input.backfillLimitReached,
|
|
29204
|
+
minResultsSatisfied: input.minResultsSatisfied,
|
|
29118
29205
|
topKFillRatio: typeof input.returnedCount === "number" && input.topK > 0 ? input.returnedCount / input.topK : undefined,
|
|
29119
29206
|
totalFilterClauseCount: pushdown.totalFilterClauseCount,
|
|
29120
29207
|
underfilledTopK: input.underfilledTopK
|
|
@@ -29198,6 +29285,8 @@ var createPostgresRAGStore = (options = {}) => {
|
|
|
29198
29285
|
const queryVector = normalizeVector(input.queryVector);
|
|
29199
29286
|
const queryMultiplier2 = normalizeQueryMultiplier(input.queryMultiplier ?? options.queryMultiplier);
|
|
29200
29287
|
const candidateLimit = normalizeCandidateLimit(input.candidateLimit);
|
|
29288
|
+
const maxBackfills = normalizeMaxBackfills(input.maxBackfills);
|
|
29289
|
+
const minResults = normalizeMinResults(input.minResults, input.topK);
|
|
29201
29290
|
const queryVectorLiteral = toVectorLiteral(queryVector);
|
|
29202
29291
|
const pushdownFilter = buildPostgresPushdownFilter(input.filter);
|
|
29203
29292
|
const countFilterPlan = buildPostgresFilterPlan(pushdownFilter);
|
|
@@ -29226,6 +29315,7 @@ var createPostgresRAGStore = (options = {}) => {
|
|
|
29226
29315
|
let currentSearchK = initialSearchK;
|
|
29227
29316
|
let backfillCount = 0;
|
|
29228
29317
|
let candidateBudgetExhausted = false;
|
|
29318
|
+
let backfillLimitReached = false;
|
|
29229
29319
|
let effectiveFilteredCandidateCount = plannedFilteredCandidateCount;
|
|
29230
29320
|
let mapped = [];
|
|
29231
29321
|
for (;; ) {
|
|
@@ -29255,16 +29345,19 @@ var createPostgresRAGStore = (options = {}) => {
|
|
|
29255
29345
|
source: entry.chunk.source,
|
|
29256
29346
|
title: entry.chunk.title
|
|
29257
29347
|
})).sort((left, right) => right.score - left.score);
|
|
29258
|
-
if (mapped.length >=
|
|
29348
|
+
if (mapped.length >= minResults) {
|
|
29259
29349
|
break;
|
|
29260
29350
|
}
|
|
29261
29351
|
const nextSearchK = planNativeCandidateSearchBackfillK({
|
|
29352
|
+
backfillCount,
|
|
29262
29353
|
candidateLimit,
|
|
29263
29354
|
currentSearchK,
|
|
29264
|
-
filteredCandidateCount: effectiveFilteredCandidateCount
|
|
29355
|
+
filteredCandidateCount: effectiveFilteredCandidateCount,
|
|
29356
|
+
maxBackfills
|
|
29265
29357
|
});
|
|
29266
29358
|
if (nextSearchK <= currentSearchK) {
|
|
29267
|
-
|
|
29359
|
+
backfillLimitReached = typeof maxBackfills === "number" && backfillCount >= maxBackfills && mapped.length < minResults;
|
|
29360
|
+
candidateBudgetExhausted = mapped.length < minResults;
|
|
29268
29361
|
break;
|
|
29269
29362
|
}
|
|
29270
29363
|
currentSearchK = nextSearchK;
|
|
@@ -29274,8 +29367,11 @@ var createPostgresRAGStore = (options = {}) => {
|
|
|
29274
29367
|
const returned = mapped.slice(0, input.topK);
|
|
29275
29368
|
updatePostgresLastQueryPlan({
|
|
29276
29369
|
backfillCount,
|
|
29370
|
+
backfillLimitReached,
|
|
29277
29371
|
candidateBudgetExhausted,
|
|
29278
29372
|
candidateLimitUsed: candidateLimit,
|
|
29373
|
+
maxBackfillsUsed: maxBackfills,
|
|
29374
|
+
minResultsUsed: minResults,
|
|
29279
29375
|
filter: input.filter,
|
|
29280
29376
|
pushdownFilter,
|
|
29281
29377
|
queryMultiplierUsed: queryMultiplier2,
|
|
@@ -29283,6 +29379,7 @@ var createPostgresRAGStore = (options = {}) => {
|
|
|
29283
29379
|
finalSearchK: currentSearchK,
|
|
29284
29380
|
initialSearchK,
|
|
29285
29381
|
nativeDiagnostics,
|
|
29382
|
+
minResultsSatisfied: returned.length >= minResults,
|
|
29286
29383
|
returnedCount: returned.length,
|
|
29287
29384
|
topK: input.topK,
|
|
29288
29385
|
underfilledTopK: returned.length < input.topK
|
|
@@ -29496,6 +29593,18 @@ var normalizeCandidateLimit2 = (value) => {
|
|
|
29496
29593
|
}
|
|
29497
29594
|
return Math.min(RAG_NATIVE_QUERY_CANDIDATE_LIMIT, Math.max(1, Math.floor(value)));
|
|
29498
29595
|
};
|
|
29596
|
+
var normalizeMaxBackfills2 = (value) => {
|
|
29597
|
+
if (value === undefined || !Number.isFinite(value)) {
|
|
29598
|
+
return;
|
|
29599
|
+
}
|
|
29600
|
+
return Math.max(0, Math.floor(value));
|
|
29601
|
+
};
|
|
29602
|
+
var normalizeMinResults2 = (value, topK) => {
|
|
29603
|
+
if (value === undefined || !Number.isFinite(value)) {
|
|
29604
|
+
return topK;
|
|
29605
|
+
}
|
|
29606
|
+
return Math.min(topK, Math.max(1, Math.floor(value)));
|
|
29607
|
+
};
|
|
29499
29608
|
var toJSONString = (metadata) => metadata === undefined ? null : JSON.stringify(metadata);
|
|
29500
29609
|
var parseMetadata2 = (value) => {
|
|
29501
29610
|
if (value === null) {
|
|
@@ -30074,6 +30183,8 @@ var updateSQLiteLastQueryPlan = (input) => {
|
|
|
30074
30183
|
searchExpansionRatio: typeof input.initialSearchK === "number" && typeof input.finalSearchK === "number" && input.initialSearchK > 0 ? input.finalSearchK / input.initialSearchK : undefined,
|
|
30075
30184
|
jsRemainderClauseCount: pushdown.jsRemainderClauseCount,
|
|
30076
30185
|
candidateLimitUsed: input.candidateLimitUsed,
|
|
30186
|
+
maxBackfillsUsed: input.maxBackfillsUsed,
|
|
30187
|
+
minResultsUsed: input.minResultsUsed,
|
|
30077
30188
|
queryMultiplierUsed: input.queryMultiplierUsed,
|
|
30078
30189
|
jsRemainderRatio: pushdown.jsRemainderRatio,
|
|
30079
30190
|
pushdownApplied: pushdown.pushdownClauseCount > 0,
|
|
@@ -30083,6 +30194,8 @@ var updateSQLiteLastQueryPlan = (input) => {
|
|
|
30083
30194
|
queryMode: input.queryMode,
|
|
30084
30195
|
candidateYieldRatio: typeof input.returnedCount === "number" && typeof input.finalSearchK === "number" && input.finalSearchK > 0 ? input.returnedCount / input.finalSearchK : undefined,
|
|
30085
30196
|
returnedCount: input.returnedCount,
|
|
30197
|
+
backfillLimitReached: input.backfillLimitReached,
|
|
30198
|
+
minResultsSatisfied: input.minResultsSatisfied,
|
|
30086
30199
|
topKFillRatio: typeof input.returnedCount === "number" && input.topK > 0 ? input.returnedCount / input.topK : undefined,
|
|
30087
30200
|
totalFilterClauseCount: pushdown.totalFilterClauseCount,
|
|
30088
30201
|
underfilledTopK: input.underfilledTopK
|
|
@@ -30241,6 +30354,8 @@ var createSQLiteRAGStore = (options = {}) => {
|
|
|
30241
30354
|
}
|
|
30242
30355
|
const queryMultiplier = normalizeQueryMultiplier2(input.queryMultiplier ?? nativeConfig?.queryMultiplier);
|
|
30243
30356
|
const candidateLimit = normalizeCandidateLimit2(input.candidateLimit);
|
|
30357
|
+
const maxBackfills = normalizeMaxBackfills2(input.maxBackfills);
|
|
30358
|
+
const minResults = normalizeMinResults2(input.minResults, input.topK);
|
|
30244
30359
|
const queryVector = normalizeVector(input.queryVector);
|
|
30245
30360
|
const queryVectorText = toVectorText(queryVector);
|
|
30246
30361
|
const pushdownFilter = buildSQLitePushdownFilter(input.filter);
|
|
@@ -30264,6 +30379,7 @@ var createSQLiteRAGStore = (options = {}) => {
|
|
|
30264
30379
|
let currentSearchK = searchK;
|
|
30265
30380
|
let backfillCount = 0;
|
|
30266
30381
|
let candidateBudgetExhausted = false;
|
|
30382
|
+
let backfillLimitReached = false;
|
|
30267
30383
|
let mapped = [];
|
|
30268
30384
|
for (;; ) {
|
|
30269
30385
|
const rawRows = runNativeQuery(currentSearchK);
|
|
@@ -30289,16 +30405,19 @@ var createSQLiteRAGStore = (options = {}) => {
|
|
|
30289
30405
|
source: entry.chunk.source,
|
|
30290
30406
|
title: entry.chunk.title
|
|
30291
30407
|
})).sort((left, right) => right.score - left.score);
|
|
30292
|
-
if (mapped.length >=
|
|
30408
|
+
if (mapped.length >= minResults) {
|
|
30293
30409
|
break;
|
|
30294
30410
|
}
|
|
30295
30411
|
const nextSearchK = planNativeCandidateSearchBackfillK({
|
|
30412
|
+
backfillCount,
|
|
30296
30413
|
candidateLimit,
|
|
30297
30414
|
currentSearchK,
|
|
30298
|
-
filteredCandidateCount
|
|
30415
|
+
filteredCandidateCount,
|
|
30416
|
+
maxBackfills
|
|
30299
30417
|
});
|
|
30300
30418
|
if (nextSearchK <= currentSearchK) {
|
|
30301
|
-
|
|
30419
|
+
backfillLimitReached = typeof maxBackfills === "number" && backfillCount >= maxBackfills && mapped.length < minResults;
|
|
30420
|
+
candidateBudgetExhausted = mapped.length < minResults;
|
|
30302
30421
|
break;
|
|
30303
30422
|
}
|
|
30304
30423
|
currentSearchK = nextSearchK;
|
|
@@ -30306,6 +30425,7 @@ var createSQLiteRAGStore = (options = {}) => {
|
|
|
30306
30425
|
}
|
|
30307
30426
|
updateSQLiteLastQueryPlan({
|
|
30308
30427
|
backfillCount,
|
|
30428
|
+
backfillLimitReached,
|
|
30309
30429
|
candidateBudgetExhausted,
|
|
30310
30430
|
filter: input.filter,
|
|
30311
30431
|
filteredCandidateCount,
|
|
@@ -30314,9 +30434,12 @@ var createSQLiteRAGStore = (options = {}) => {
|
|
|
30314
30434
|
nativeDiagnostics,
|
|
30315
30435
|
pushdownFilter,
|
|
30316
30436
|
candidateLimitUsed: candidateLimit,
|
|
30437
|
+
maxBackfillsUsed: maxBackfills,
|
|
30438
|
+
minResultsUsed: minResults,
|
|
30317
30439
|
queryMultiplierUsed: queryMultiplier,
|
|
30318
30440
|
queryMode: "native_vec0",
|
|
30319
30441
|
returnedCount: Math.min(mapped.length, input.topK),
|
|
30442
|
+
minResultsSatisfied: mapped.length >= minResults,
|
|
30320
30443
|
topK: input.topK,
|
|
30321
30444
|
underfilledTopK: mapped.length < input.topK
|
|
30322
30445
|
});
|
|
@@ -32484,5 +32607,5 @@ export {
|
|
|
32484
32607
|
addRAGEvaluationSuiteCase
|
|
32485
32608
|
};
|
|
32486
32609
|
|
|
32487
|
-
//# debugId=
|
|
32610
|
+
//# debugId=320F9912162970CC64756E2164756E21
|
|
32488
32611
|
//# sourceMappingURL=index.js.map
|