@absolutejs/absolute 0.19.0-beta.634 → 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 +39 -3
- package/dist/ai/client/index.js.map +4 -4
- package/dist/ai/client/ui.js +39 -3
- package/dist/ai/client/ui.js.map +4 -4
- package/dist/ai/index.js +73 -9
- package/dist/ai/index.js.map +8 -8
- package/dist/ai/rag/quality.js +39 -3
- package/dist/ai/rag/quality.js.map +4 -4
- package/dist/ai/rag/ui.js +39 -3
- package/dist/ai/rag/ui.js.map +4 -4
- package/dist/angular/ai/index.js +39 -3
- package/dist/angular/ai/index.js.map +4 -4
- package/dist/react/ai/index.js +39 -3
- package/dist/react/ai/index.js.map +4 -4
- package/dist/src/react/ai/useRAG.d.ts +2 -0
- package/dist/src/svelte/ai/createRAG.d.ts +2 -0
- package/dist/src/vue/ai/useRAG.d.ts +28 -0
- package/dist/src/vue/ai/useRAGEvaluate.d.ts +16 -0
- package/dist/src/vue/ai/useRAGIndexAdmin.d.ts +8 -0
- package/dist/src/vue/ai/useRAGSearch.d.ts +2 -0
- package/dist/svelte/ai/index.js +39 -3
- package/dist/svelte/ai/index.js.map +4 -4
- package/dist/types/ai.d.ts +14 -0
- package/dist/vue/ai/index.js +39 -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 === "sqliteQueryMaxBackfillsUsed" ? "SQLite max backfills" : key === "postgresQueryJsRemainderClauseCount" ? "Postgres JS remainder clauses" : key === "postgresQueryMultiplierUsed" ? "Postgres query multiplier" : key === "postgresQueryCandidateLimitUsed" ? "Postgres candidate limit" : key === "postgresQueryMaxBackfillsUsed" ? "Postgres max backfills" : 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 === "postgresQueryBackfillCount" ? "Postgres backfill count" : key === "postgresQueryBackfillLimitReached" ? "Postgres backfill limit reached" : 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) => {
|
|
@@ -2524,6 +2524,7 @@ var formatSQLitePlannerCueSummary = (input) => {
|
|
|
2524
2524
|
typeof input?.sqliteQueryMultiplierUsed === "number" ? `x${input.sqliteQueryMultiplierUsed}` : undefined,
|
|
2525
2525
|
typeof input?.sqliteQueryCandidateLimitUsed === "number" ? `cap ${input.sqliteQueryCandidateLimitUsed}` : undefined,
|
|
2526
2526
|
typeof input?.sqliteQueryMaxBackfillsUsed === "number" ? `backfills ${input.sqliteQueryMaxBackfillsUsed}` : undefined,
|
|
2527
|
+
typeof input?.sqliteQueryMinResultsUsed === "number" ? `min ${input.sqliteQueryMinResultsUsed}` : undefined,
|
|
2527
2528
|
typeof input?.sqliteQueryJsRemainderRatio === "number" ? `js ${(input.sqliteQueryJsRemainderRatio * 100).toFixed(0)}%` : undefined,
|
|
2528
2529
|
typeof input?.sqliteQueryTotalFilterClauseCount === "number" ? `total clauses ${input.sqliteQueryTotalFilterClauseCount}` : undefined,
|
|
2529
2530
|
typeof input?.sqliteQueryFilteredCandidates === "number" ? `filtered ${input.sqliteQueryFilteredCandidates}` : undefined,
|
|
@@ -2531,6 +2532,7 @@ var formatSQLitePlannerCueSummary = (input) => {
|
|
|
2531
2532
|
typeof input?.sqliteQuerySearchExpansionRatio === "number" ? `expand ${(input.sqliteQuerySearchExpansionRatio * 100).toFixed(0)}%` : undefined,
|
|
2532
2533
|
typeof input?.sqliteQueryBackfillCount === "number" ? `backfill ${input.sqliteQueryBackfillCount}` : undefined,
|
|
2533
2534
|
typeof input?.sqliteQueryBackfillLimitReached === "boolean" && input.sqliteQueryBackfillLimitReached ? "backfill limit reached" : undefined,
|
|
2535
|
+
typeof input?.sqliteQueryMinResultsSatisfied === "boolean" && input.sqliteQueryMinResultsSatisfied ? "min satisfied" : undefined,
|
|
2534
2536
|
typeof input?.sqliteQueryReturnedCount === "number" ? `returned ${input.sqliteQueryReturnedCount}` : undefined,
|
|
2535
2537
|
typeof input?.sqliteQueryCandidateYieldRatio === "number" ? `yield ${(input.sqliteQueryCandidateYieldRatio * 100).toFixed(0)}%` : undefined,
|
|
2536
2538
|
typeof input?.sqliteQueryTopKFillRatio === "number" ? `fill ${(input.sqliteQueryTopKFillRatio * 100).toFixed(0)}%` : undefined,
|
|
@@ -2553,6 +2555,7 @@ var formatPostgresPlannerCueSummary = (input) => {
|
|
|
2553
2555
|
typeof input?.postgresQueryMultiplierUsed === "number" ? `x${input.postgresQueryMultiplierUsed}` : undefined,
|
|
2554
2556
|
typeof input?.postgresQueryCandidateLimitUsed === "number" ? `cap ${input.postgresQueryCandidateLimitUsed}` : undefined,
|
|
2555
2557
|
typeof input?.postgresQueryMaxBackfillsUsed === "number" ? `backfills ${input.postgresQueryMaxBackfillsUsed}` : undefined,
|
|
2558
|
+
typeof input?.postgresQueryMinResultsUsed === "number" ? `min ${input.postgresQueryMinResultsUsed}` : undefined,
|
|
2556
2559
|
typeof input?.postgresQueryJsRemainderRatio === "number" ? `js ${(input.postgresQueryJsRemainderRatio * 100).toFixed(0)}%` : undefined,
|
|
2557
2560
|
typeof input?.postgresQueryTotalFilterClauseCount === "number" ? `total clauses ${input.postgresQueryTotalFilterClauseCount}` : undefined,
|
|
2558
2561
|
typeof input?.postgresQueryFilteredCandidates === "number" ? `filtered ${input.postgresQueryFilteredCandidates}` : undefined,
|
|
@@ -2560,6 +2563,7 @@ var formatPostgresPlannerCueSummary = (input) => {
|
|
|
2560
2563
|
typeof input?.postgresQuerySearchExpansionRatio === "number" ? `expand ${(input.postgresQuerySearchExpansionRatio * 100).toFixed(0)}%` : undefined,
|
|
2561
2564
|
typeof input?.postgresQueryBackfillCount === "number" ? `backfill ${input.postgresQueryBackfillCount}` : undefined,
|
|
2562
2565
|
typeof input?.postgresQueryBackfillLimitReached === "boolean" && input.postgresQueryBackfillLimitReached ? "backfill limit reached" : undefined,
|
|
2566
|
+
typeof input?.postgresQueryMinResultsSatisfied === "boolean" && input.postgresQueryMinResultsSatisfied ? "min satisfied" : undefined,
|
|
2563
2567
|
typeof input?.postgresQueryReturnedCount === "number" ? `returned ${input.postgresQueryReturnedCount}` : undefined,
|
|
2564
2568
|
typeof input?.postgresQueryCandidateYieldRatio === "number" ? `yield ${(input.postgresQueryCandidateYieldRatio * 100).toFixed(0)}%` : undefined,
|
|
2565
2569
|
typeof input?.postgresQueryTopKFillRatio === "number" ? `fill ${(input.postgresQueryTopKFillRatio * 100).toFixed(0)}%` : undefined,
|
|
@@ -2581,6 +2585,8 @@ var formatComparisonSQLitePlannerCueSummary = (entry) => {
|
|
|
2581
2585
|
sqliteQuerySearchExpansionRatio: snapshot.sqliteQuerySearchExpansionRatio,
|
|
2582
2586
|
sqliteQueryJsRemainderClauseCount: snapshot.sqliteQueryJsRemainderClauseCount,
|
|
2583
2587
|
sqliteQueryCandidateLimitUsed: snapshot.sqliteQueryCandidateLimitUsed,
|
|
2588
|
+
sqliteQueryMaxBackfillsUsed: snapshot.sqliteQueryMaxBackfillsUsed,
|
|
2589
|
+
sqliteQueryMinResultsUsed: snapshot.sqliteQueryMinResultsUsed,
|
|
2584
2590
|
sqliteQueryMode: snapshot.sqliteQueryMode,
|
|
2585
2591
|
sqliteQueryPushdownApplied: snapshot.sqliteQueryPushdownApplied,
|
|
2586
2592
|
sqliteQueryPushdownClauseCount: snapshot.sqliteQueryPushdownClauseCount,
|
|
@@ -2588,6 +2594,8 @@ var formatComparisonSQLitePlannerCueSummary = (entry) => {
|
|
|
2588
2594
|
sqliteQueryPushdownMode: snapshot.sqliteQueryPushdownMode,
|
|
2589
2595
|
sqliteQueryTotalFilterClauseCount: snapshot.sqliteQueryTotalFilterClauseCount,
|
|
2590
2596
|
sqliteQueryReturnedCount: snapshot.sqliteQueryReturnedCount,
|
|
2597
|
+
sqliteQueryBackfillLimitReached: snapshot.sqliteQueryBackfillLimitReached,
|
|
2598
|
+
sqliteQueryMinResultsSatisfied: snapshot.sqliteQueryMinResultsSatisfied,
|
|
2591
2599
|
sqliteQueryCandidateYieldRatio: snapshot.sqliteQueryCandidateYieldRatio,
|
|
2592
2600
|
sqliteQueryTopKFillRatio: snapshot.sqliteQueryTopKFillRatio,
|
|
2593
2601
|
sqliteQueryJsRemainderRatio: snapshot.sqliteQueryJsRemainderRatio,
|
|
@@ -2606,6 +2614,8 @@ var formatComparisonPostgresPlannerCueSummary = (entry) => {
|
|
|
2606
2614
|
postgresQuerySearchExpansionRatio: snapshot.postgresQuerySearchExpansionRatio,
|
|
2607
2615
|
postgresQueryJsRemainderClauseCount: snapshot.postgresQueryJsRemainderClauseCount,
|
|
2608
2616
|
postgresQueryCandidateLimitUsed: snapshot.postgresQueryCandidateLimitUsed,
|
|
2617
|
+
postgresQueryMaxBackfillsUsed: snapshot.postgresQueryMaxBackfillsUsed,
|
|
2618
|
+
postgresQueryMinResultsUsed: snapshot.postgresQueryMinResultsUsed,
|
|
2609
2619
|
postgresQueryMultiplierUsed: snapshot.postgresQueryMultiplierUsed,
|
|
2610
2620
|
postgresQueryMode: snapshot.postgresQueryMode,
|
|
2611
2621
|
postgresQueryPushdownApplied: snapshot.postgresQueryPushdownApplied,
|
|
@@ -2614,6 +2624,8 @@ var formatComparisonPostgresPlannerCueSummary = (entry) => {
|
|
|
2614
2624
|
postgresQueryPushdownMode: snapshot.postgresQueryPushdownMode,
|
|
2615
2625
|
postgresQueryTotalFilterClauseCount: snapshot.postgresQueryTotalFilterClauseCount,
|
|
2616
2626
|
postgresQueryReturnedCount: snapshot.postgresQueryReturnedCount,
|
|
2627
|
+
postgresQueryBackfillLimitReached: snapshot.postgresQueryBackfillLimitReached,
|
|
2628
|
+
postgresQueryMinResultsSatisfied: snapshot.postgresQueryMinResultsSatisfied,
|
|
2617
2629
|
postgresQueryCandidateYieldRatio: snapshot.postgresQueryCandidateYieldRatio,
|
|
2618
2630
|
postgresQueryTopKFillRatio: snapshot.postgresQueryTopKFillRatio,
|
|
2619
2631
|
postgresQueryJsRemainderRatio: snapshot.postgresQueryJsRemainderRatio,
|
|
@@ -2772,6 +2784,8 @@ var formatHistorySQLitePlannerShift = (history) => {
|
|
|
2772
2784
|
sqliteQuerySearchExpansionRatio: entry.previousSqliteQuerySearchExpansionRatio,
|
|
2773
2785
|
sqliteQueryJsRemainderClauseCount: entry.previousSqliteQueryJsRemainderClauseCount,
|
|
2774
2786
|
sqliteQueryCandidateLimitUsed: entry.previousSqliteQueryCandidateLimitUsed,
|
|
2787
|
+
sqliteQueryMaxBackfillsUsed: entry.previousSqliteQueryMaxBackfillsUsed,
|
|
2788
|
+
sqliteQueryMinResultsUsed: entry.previousSqliteQueryMinResultsUsed,
|
|
2775
2789
|
sqliteQueryMode: entry.previousSqliteQueryMode,
|
|
2776
2790
|
sqliteQueryPushdownApplied: entry.previousSqliteQueryPushdownApplied,
|
|
2777
2791
|
sqliteQueryPushdownClauseCount: entry.previousSqliteQueryPushdownClauseCount,
|
|
@@ -2780,6 +2794,8 @@ var formatHistorySQLitePlannerShift = (history) => {
|
|
|
2780
2794
|
sqliteQueryTotalFilterClauseCount: entry.previousSqliteQueryTotalFilterClauseCount,
|
|
2781
2795
|
sqliteQueryJsRemainderRatio: entry.previousSqliteQueryJsRemainderRatio,
|
|
2782
2796
|
sqliteQueryReturnedCount: entry.previousSqliteQueryReturnedCount,
|
|
2797
|
+
sqliteQueryBackfillLimitReached: entry.previousSqliteQueryBackfillLimitReached,
|
|
2798
|
+
sqliteQueryMinResultsSatisfied: entry.previousSqliteQueryMinResultsSatisfied,
|
|
2783
2799
|
sqliteQueryCandidateYieldRatio: entry.previousSqliteQueryCandidateYieldRatio,
|
|
2784
2800
|
sqliteQueryTopKFillRatio: entry.previousSqliteQueryTopKFillRatio,
|
|
2785
2801
|
sqliteQueryUnderfilledTopK: entry.previousSqliteQueryUnderfilledTopK
|
|
@@ -2807,6 +2823,8 @@ var formatHistoryPostgresPlannerShift = (history) => {
|
|
|
2807
2823
|
postgresQuerySearchExpansionRatio: entry.previousPostgresQuerySearchExpansionRatio,
|
|
2808
2824
|
postgresQueryJsRemainderClauseCount: entry.previousPostgresQueryJsRemainderClauseCount,
|
|
2809
2825
|
postgresQueryCandidateLimitUsed: entry.previousPostgresQueryCandidateLimitUsed,
|
|
2826
|
+
postgresQueryMaxBackfillsUsed: entry.previousPostgresQueryMaxBackfillsUsed,
|
|
2827
|
+
postgresQueryMinResultsUsed: entry.previousPostgresQueryMinResultsUsed,
|
|
2810
2828
|
postgresQueryMultiplierUsed: entry.previousPostgresQueryMultiplierUsed,
|
|
2811
2829
|
postgresQueryMode: entry.previousPostgresQueryMode,
|
|
2812
2830
|
postgresQueryPushdownApplied: entry.previousPostgresQueryPushdownApplied,
|
|
@@ -2816,6 +2834,8 @@ var formatHistoryPostgresPlannerShift = (history) => {
|
|
|
2816
2834
|
postgresQueryTotalFilterClauseCount: entry.previousPostgresQueryTotalFilterClauseCount,
|
|
2817
2835
|
postgresQueryJsRemainderRatio: entry.previousPostgresQueryJsRemainderRatio,
|
|
2818
2836
|
postgresQueryReturnedCount: entry.previousPostgresQueryReturnedCount,
|
|
2837
|
+
postgresQueryBackfillLimitReached: entry.previousPostgresQueryBackfillLimitReached,
|
|
2838
|
+
postgresQueryMinResultsSatisfied: entry.previousPostgresQueryMinResultsSatisfied,
|
|
2819
2839
|
postgresQueryCandidateYieldRatio: entry.previousPostgresQueryCandidateYieldRatio,
|
|
2820
2840
|
postgresQueryTopKFillRatio: entry.previousPostgresQueryTopKFillRatio,
|
|
2821
2841
|
postgresQueryUnderfilledTopK: entry.previousPostgresQueryUnderfilledTopK
|
|
@@ -3873,11 +3893,13 @@ var buildEvaluationSQLiteQueryPlanSnapshot = (trace) => {
|
|
|
3873
3893
|
sqliteQueryMultiplierUsed: typeof metadata.sqliteQueryMultiplierUsed === "number" ? metadata.sqliteQueryMultiplierUsed : undefined,
|
|
3874
3894
|
sqliteQueryCandidateLimitUsed: typeof metadata.sqliteQueryCandidateLimitUsed === "number" ? metadata.sqliteQueryCandidateLimitUsed : undefined,
|
|
3875
3895
|
sqliteQueryMaxBackfillsUsed: typeof metadata.sqliteQueryMaxBackfillsUsed === "number" ? metadata.sqliteQueryMaxBackfillsUsed : undefined,
|
|
3896
|
+
sqliteQueryMinResultsUsed: typeof metadata.sqliteQueryMinResultsUsed === "number" ? metadata.sqliteQueryMinResultsUsed : undefined,
|
|
3876
3897
|
sqliteQueryPushdownCoverageRatio: typeof metadata.sqliteQueryPushdownCoverageRatio === "number" ? metadata.sqliteQueryPushdownCoverageRatio : undefined,
|
|
3877
3898
|
sqliteQueryJsRemainderRatio: typeof metadata.sqliteQueryJsRemainderRatio === "number" ? metadata.sqliteQueryJsRemainderRatio : undefined,
|
|
3878
3899
|
sqliteQueryReturnedCount: typeof metadata.sqliteQueryReturnedCount === "number" ? metadata.sqliteQueryReturnedCount : undefined,
|
|
3879
3900
|
sqliteQueryCandidateYieldRatio: typeof metadata.sqliteQueryCandidateYieldRatio === "number" ? metadata.sqliteQueryCandidateYieldRatio : undefined,
|
|
3880
3901
|
sqliteQueryBackfillLimitReached: typeof metadata.sqliteQueryBackfillLimitReached === "boolean" ? metadata.sqliteQueryBackfillLimitReached : undefined,
|
|
3902
|
+
sqliteQueryMinResultsSatisfied: typeof metadata.sqliteQueryMinResultsSatisfied === "boolean" ? metadata.sqliteQueryMinResultsSatisfied : undefined,
|
|
3881
3903
|
sqliteQueryTopKFillRatio: typeof metadata.sqliteQueryTopKFillRatio === "number" ? metadata.sqliteQueryTopKFillRatio : undefined,
|
|
3882
3904
|
sqliteQueryUnderfilledTopK: typeof metadata.sqliteQueryUnderfilledTopK === "boolean" ? metadata.sqliteQueryUnderfilledTopK : undefined
|
|
3883
3905
|
};
|
|
@@ -3902,11 +3924,13 @@ var buildEvaluationPostgresQueryPlanSnapshot = (trace) => {
|
|
|
3902
3924
|
postgresQueryMultiplierUsed: typeof metadata.postgresQueryMultiplierUsed === "number" ? metadata.postgresQueryMultiplierUsed : undefined,
|
|
3903
3925
|
postgresQueryCandidateLimitUsed: typeof metadata.postgresQueryCandidateLimitUsed === "number" ? metadata.postgresQueryCandidateLimitUsed : undefined,
|
|
3904
3926
|
postgresQueryMaxBackfillsUsed: typeof metadata.postgresQueryMaxBackfillsUsed === "number" ? metadata.postgresQueryMaxBackfillsUsed : undefined,
|
|
3927
|
+
postgresQueryMinResultsUsed: typeof metadata.postgresQueryMinResultsUsed === "number" ? metadata.postgresQueryMinResultsUsed : undefined,
|
|
3905
3928
|
postgresQueryPushdownCoverageRatio: typeof metadata.postgresQueryPushdownCoverageRatio === "number" ? metadata.postgresQueryPushdownCoverageRatio : undefined,
|
|
3906
3929
|
postgresQueryJsRemainderRatio: typeof metadata.postgresQueryJsRemainderRatio === "number" ? metadata.postgresQueryJsRemainderRatio : undefined,
|
|
3907
3930
|
postgresQueryReturnedCount: typeof metadata.postgresQueryReturnedCount === "number" ? metadata.postgresQueryReturnedCount : undefined,
|
|
3908
3931
|
postgresQueryCandidateYieldRatio: typeof metadata.postgresQueryCandidateYieldRatio === "number" ? metadata.postgresQueryCandidateYieldRatio : undefined,
|
|
3909
3932
|
postgresQueryBackfillLimitReached: typeof metadata.postgresQueryBackfillLimitReached === "boolean" ? metadata.postgresQueryBackfillLimitReached : undefined,
|
|
3933
|
+
postgresQueryMinResultsSatisfied: typeof metadata.postgresQueryMinResultsSatisfied === "boolean" ? metadata.postgresQueryMinResultsSatisfied : undefined,
|
|
3910
3934
|
postgresQueryTopKFillRatio: typeof metadata.postgresQueryTopKFillRatio === "number" ? metadata.postgresQueryTopKFillRatio : undefined,
|
|
3911
3935
|
postgresQueryUnderfilledTopK: typeof metadata.postgresQueryUnderfilledTopK === "boolean" ? metadata.postgresQueryUnderfilledTopK : undefined
|
|
3912
3936
|
};
|
|
@@ -5160,6 +5184,7 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5160
5184
|
const sqliteQueryMultiplierUsed = currentSQLiteQueryPlanSnapshot.sqliteQueryMultiplierUsed ?? currentSnapshot?.sqliteQueryMultiplierUsed;
|
|
5161
5185
|
const sqliteQueryCandidateLimitUsed = currentSQLiteQueryPlanSnapshot.sqliteQueryCandidateLimitUsed ?? currentSnapshot?.sqliteQueryCandidateLimitUsed;
|
|
5162
5186
|
const sqliteQueryMaxBackfillsUsed = currentSQLiteQueryPlanSnapshot.sqliteQueryMaxBackfillsUsed ?? currentSnapshot?.sqliteQueryMaxBackfillsUsed;
|
|
5187
|
+
const sqliteQueryMinResultsUsed = currentSQLiteQueryPlanSnapshot.sqliteQueryMinResultsUsed ?? currentSnapshot?.sqliteQueryMinResultsUsed;
|
|
5163
5188
|
const sqliteQueryPushdownCoverageRatio = currentSQLiteQueryPlanSnapshot.sqliteQueryPushdownCoverageRatio ?? currentSnapshot?.sqliteQueryPushdownCoverageRatio;
|
|
5164
5189
|
const sqliteQueryJsRemainderRatio = currentSQLiteQueryPlanSnapshot.sqliteQueryJsRemainderRatio ?? currentSnapshot?.sqliteQueryJsRemainderRatio;
|
|
5165
5190
|
const sqliteQueryFilteredCandidates = currentSQLiteQueryPlanSnapshot.sqliteQueryFilteredCandidates ?? currentSnapshot?.sqliteQueryFilteredCandidates;
|
|
@@ -5168,6 +5193,7 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5168
5193
|
const sqliteQuerySearchExpansionRatio = currentSQLiteQueryPlanSnapshot.sqliteQuerySearchExpansionRatio ?? currentSnapshot?.sqliteQuerySearchExpansionRatio;
|
|
5169
5194
|
const sqliteQueryBackfillCount = currentSQLiteQueryPlanSnapshot.sqliteQueryBackfillCount ?? currentSnapshot?.sqliteQueryBackfillCount;
|
|
5170
5195
|
const sqliteQueryBackfillLimitReached = currentSQLiteQueryPlanSnapshot.sqliteQueryBackfillLimitReached ?? currentSnapshot?.sqliteQueryBackfillLimitReached;
|
|
5196
|
+
const sqliteQueryMinResultsSatisfied = currentSQLiteQueryPlanSnapshot.sqliteQueryMinResultsSatisfied ?? currentSnapshot?.sqliteQueryMinResultsSatisfied;
|
|
5171
5197
|
const sqliteQueryReturnedCount = currentSQLiteQueryPlanSnapshot.sqliteQueryReturnedCount ?? currentSnapshot?.sqliteQueryReturnedCount;
|
|
5172
5198
|
const sqliteQueryCandidateYieldRatio = currentSQLiteQueryPlanSnapshot.sqliteQueryCandidateYieldRatio ?? currentSnapshot?.sqliteQueryCandidateYieldRatio;
|
|
5173
5199
|
const sqliteQueryTopKFillRatio = currentSQLiteQueryPlanSnapshot.sqliteQueryTopKFillRatio ?? currentSnapshot?.sqliteQueryTopKFillRatio;
|
|
@@ -5183,6 +5209,7 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5183
5209
|
const postgresQueryMultiplierUsed = currentPostgresQueryPlanSnapshot.postgresQueryMultiplierUsed ?? currentSnapshot?.postgresQueryMultiplierUsed;
|
|
5184
5210
|
const postgresQueryCandidateLimitUsed = currentPostgresQueryPlanSnapshot.postgresQueryCandidateLimitUsed ?? currentSnapshot?.postgresQueryCandidateLimitUsed;
|
|
5185
5211
|
const postgresQueryMaxBackfillsUsed = currentPostgresQueryPlanSnapshot.postgresQueryMaxBackfillsUsed ?? currentSnapshot?.postgresQueryMaxBackfillsUsed;
|
|
5212
|
+
const postgresQueryMinResultsUsed = currentPostgresQueryPlanSnapshot.postgresQueryMinResultsUsed ?? currentSnapshot?.postgresQueryMinResultsUsed;
|
|
5186
5213
|
const postgresQueryPushdownCoverageRatio = currentPostgresQueryPlanSnapshot.postgresQueryPushdownCoverageRatio ?? currentSnapshot?.postgresQueryPushdownCoverageRatio;
|
|
5187
5214
|
const postgresQueryJsRemainderRatio = currentPostgresQueryPlanSnapshot.postgresQueryJsRemainderRatio ?? currentSnapshot?.postgresQueryJsRemainderRatio;
|
|
5188
5215
|
const postgresQueryFilteredCandidates = currentPostgresQueryPlanSnapshot.postgresQueryFilteredCandidates ?? currentSnapshot?.postgresQueryFilteredCandidates;
|
|
@@ -5191,6 +5218,7 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5191
5218
|
const postgresQuerySearchExpansionRatio = currentPostgresQueryPlanSnapshot.postgresQuerySearchExpansionRatio ?? currentSnapshot?.postgresQuerySearchExpansionRatio;
|
|
5192
5219
|
const postgresQueryBackfillCount = currentPostgresQueryPlanSnapshot.postgresQueryBackfillCount ?? currentSnapshot?.postgresQueryBackfillCount;
|
|
5193
5220
|
const postgresQueryBackfillLimitReached = currentPostgresQueryPlanSnapshot.postgresQueryBackfillLimitReached ?? currentSnapshot?.postgresQueryBackfillLimitReached;
|
|
5221
|
+
const postgresQueryMinResultsSatisfied = currentPostgresQueryPlanSnapshot.postgresQueryMinResultsSatisfied ?? currentSnapshot?.postgresQueryMinResultsSatisfied;
|
|
5194
5222
|
const postgresQueryReturnedCount = currentPostgresQueryPlanSnapshot.postgresQueryReturnedCount ?? currentSnapshot?.postgresQueryReturnedCount;
|
|
5195
5223
|
const postgresQueryCandidateYieldRatio = currentPostgresQueryPlanSnapshot.postgresQueryCandidateYieldRatio ?? currentSnapshot?.postgresQueryCandidateYieldRatio;
|
|
5196
5224
|
const postgresQueryTopKFillRatio = currentPostgresQueryPlanSnapshot.postgresQueryTopKFillRatio ?? currentSnapshot?.postgresQueryTopKFillRatio;
|
|
@@ -5201,7 +5229,7 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5201
5229
|
const previousFilterSignature = JSON.stringify(previousTrace?.inputFilter ?? undefined);
|
|
5202
5230
|
const currentRetrievalSignature = JSON.stringify(retrieval ?? undefined);
|
|
5203
5231
|
const previousRetrievalSignature = JSON.stringify(previousTrace?.inputRetrieval ?? undefined);
|
|
5204
|
-
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.sqliteQueryPushdownCoverageRatio !== sqliteQueryPushdownCoverageRatio || previousTrace.sqliteQueryJsRemainderRatio !== sqliteQueryJsRemainderRatio || previousTrace.sqliteQueryFilteredCandidates !== sqliteQueryFilteredCandidates || previousTrace.sqliteQueryInitialSearchK !== sqliteQueryInitialSearchK || previousTrace.sqliteQueryFinalSearchK !== sqliteQueryFinalSearchK || previousTrace.sqliteQuerySearchExpansionRatio !== sqliteQuerySearchExpansionRatio || previousTrace.sqliteQueryBackfillCount !== sqliteQueryBackfillCount || previousTrace.sqliteQueryBackfillLimitReached !== sqliteQueryBackfillLimitReached || 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.postgresQueryPushdownCoverageRatio !== postgresQueryPushdownCoverageRatio || previousTrace.postgresQueryJsRemainderRatio !== postgresQueryJsRemainderRatio || previousTrace.postgresQueryFilteredCandidates !== postgresQueryFilteredCandidates || previousTrace.postgresQueryInitialSearchK !== postgresQueryInitialSearchK || previousTrace.postgresQueryFinalSearchK !== postgresQueryFinalSearchK || previousTrace.postgresQuerySearchExpansionRatio !== postgresQuerySearchExpansionRatio || previousTrace.postgresQueryBackfillCount !== postgresQueryBackfillCount || previousTrace.postgresQueryBackfillLimitReached !== postgresQueryBackfillLimitReached || 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";
|
|
5205
5233
|
return {
|
|
5206
5234
|
candidateTopK: currentTrace?.candidateTopK ?? 0,
|
|
5207
5235
|
caseId: caseResult.caseId,
|
|
@@ -5225,6 +5253,7 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5225
5253
|
previousLeadSpeakerCue: previousTrace?.leadSpeakerCue,
|
|
5226
5254
|
previousSqliteQueryBackfillCount: previousTrace?.sqliteQueryBackfillCount,
|
|
5227
5255
|
previousSqliteQueryBackfillLimitReached: previousTrace?.sqliteQueryBackfillLimitReached,
|
|
5256
|
+
previousSqliteQueryMinResultsSatisfied: previousTrace?.sqliteQueryMinResultsSatisfied,
|
|
5228
5257
|
previousSqliteQueryCandidateBudgetExhausted: previousTrace?.sqliteQueryCandidateBudgetExhausted,
|
|
5229
5258
|
previousSqliteQueryCandidateCoverage: previousTrace?.sqliteQueryCandidateCoverage,
|
|
5230
5259
|
previousSqliteQueryFilteredCandidates: previousTrace?.sqliteQueryFilteredCandidates,
|
|
@@ -5240,6 +5269,7 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5240
5269
|
previousSqliteQueryMultiplierUsed: previousTrace?.sqliteQueryMultiplierUsed,
|
|
5241
5270
|
previousSqliteQueryCandidateLimitUsed: previousTrace?.sqliteQueryCandidateLimitUsed,
|
|
5242
5271
|
previousSqliteQueryMaxBackfillsUsed: previousTrace?.sqliteQueryMaxBackfillsUsed,
|
|
5272
|
+
previousSqliteQueryMinResultsUsed: previousTrace?.sqliteQueryMinResultsUsed,
|
|
5243
5273
|
previousSqliteQueryPushdownCoverageRatio: previousTrace?.sqliteQueryPushdownCoverageRatio,
|
|
5244
5274
|
previousSqliteQueryJsRemainderRatio: previousTrace?.sqliteQueryJsRemainderRatio,
|
|
5245
5275
|
previousSqliteQueryReturnedCount: previousTrace?.sqliteQueryReturnedCount,
|
|
@@ -5248,6 +5278,7 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5248
5278
|
previousSqliteQueryUnderfilledTopK: previousTrace?.sqliteQueryUnderfilledTopK,
|
|
5249
5279
|
previousPostgresQueryBackfillCount: previousTrace?.postgresQueryBackfillCount,
|
|
5250
5280
|
previousPostgresQueryBackfillLimitReached: previousTrace?.postgresQueryBackfillLimitReached,
|
|
5281
|
+
previousPostgresQueryMinResultsSatisfied: previousTrace?.postgresQueryMinResultsSatisfied,
|
|
5251
5282
|
previousPostgresQueryCandidateBudgetExhausted: previousTrace?.postgresQueryCandidateBudgetExhausted,
|
|
5252
5283
|
previousPostgresQueryCandidateCoverage: previousTrace?.postgresQueryCandidateCoverage,
|
|
5253
5284
|
previousPostgresQueryFilteredCandidates: previousTrace?.postgresQueryFilteredCandidates,
|
|
@@ -5263,6 +5294,7 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5263
5294
|
previousPostgresQueryMultiplierUsed: previousTrace?.postgresQueryMultiplierUsed,
|
|
5264
5295
|
previousPostgresQueryCandidateLimitUsed: previousTrace?.postgresQueryCandidateLimitUsed,
|
|
5265
5296
|
previousPostgresQueryMaxBackfillsUsed: previousTrace?.postgresQueryMaxBackfillsUsed,
|
|
5297
|
+
previousPostgresQueryMinResultsUsed: previousTrace?.postgresQueryMinResultsUsed,
|
|
5266
5298
|
previousPostgresQueryPushdownCoverageRatio: previousTrace?.postgresQueryPushdownCoverageRatio,
|
|
5267
5299
|
previousPostgresQueryJsRemainderRatio: previousTrace?.postgresQueryJsRemainderRatio,
|
|
5268
5300
|
previousPostgresQueryReturnedCount: previousTrace?.postgresQueryReturnedCount,
|
|
@@ -5287,6 +5319,7 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5287
5319
|
leadSpeakerCue,
|
|
5288
5320
|
sqliteQueryBackfillCount,
|
|
5289
5321
|
sqliteQueryBackfillLimitReached,
|
|
5322
|
+
sqliteQueryMinResultsSatisfied,
|
|
5290
5323
|
sqliteQueryCandidateBudgetExhausted,
|
|
5291
5324
|
sqliteQueryCandidateCoverage,
|
|
5292
5325
|
sqliteQueryFilteredCandidates,
|
|
@@ -5302,6 +5335,7 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5302
5335
|
sqliteQueryMultiplierUsed,
|
|
5303
5336
|
sqliteQueryCandidateLimitUsed,
|
|
5304
5337
|
sqliteQueryMaxBackfillsUsed,
|
|
5338
|
+
sqliteQueryMinResultsUsed,
|
|
5305
5339
|
sqliteQueryPushdownCoverageRatio,
|
|
5306
5340
|
sqliteQueryJsRemainderRatio,
|
|
5307
5341
|
sqliteQueryReturnedCount,
|
|
@@ -5310,6 +5344,7 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5310
5344
|
sqliteQueryUnderfilledTopK,
|
|
5311
5345
|
postgresQueryBackfillCount,
|
|
5312
5346
|
postgresQueryBackfillLimitReached,
|
|
5347
|
+
postgresQueryMinResultsSatisfied,
|
|
5313
5348
|
postgresQueryCandidateBudgetExhausted,
|
|
5314
5349
|
postgresQueryCandidateCoverage,
|
|
5315
5350
|
postgresQueryFilteredCandidates,
|
|
@@ -5325,6 +5360,7 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5325
5360
|
postgresQueryMultiplierUsed,
|
|
5326
5361
|
postgresQueryCandidateLimitUsed,
|
|
5327
5362
|
postgresQueryMaxBackfillsUsed,
|
|
5363
|
+
postgresQueryMinResultsUsed,
|
|
5328
5364
|
postgresQueryPushdownCoverageRatio,
|
|
5329
5365
|
postgresQueryJsRemainderRatio,
|
|
5330
5366
|
postgresQueryReturnedCount,
|
|
@@ -16943,10 +16979,12 @@ var buildStoreQueryPlanTraceMetadata = (store) => {
|
|
|
16943
16979
|
sqliteQueryMultiplierUsed: sqliteNativePlan.queryMultiplierUsed ?? null,
|
|
16944
16980
|
sqliteQueryCandidateLimitUsed: sqliteNativePlan.candidateLimitUsed ?? null,
|
|
16945
16981
|
sqliteQueryMaxBackfillsUsed: sqliteNativePlan.maxBackfillsUsed ?? null,
|
|
16982
|
+
sqliteQueryMinResultsUsed: sqliteNativePlan.minResultsUsed ?? null,
|
|
16946
16983
|
sqliteQueryJsRemainderRatio: sqliteNativePlan.jsRemainderRatio ?? null,
|
|
16947
16984
|
sqliteQueryCandidateYieldRatio: sqliteNativePlan.candidateYieldRatio ?? null,
|
|
16948
16985
|
sqliteQueryReturnedCount: sqliteNativePlan.returnedCount ?? null,
|
|
16949
16986
|
sqliteQueryBackfillLimitReached: sqliteNativePlan.backfillLimitReached ?? null,
|
|
16987
|
+
sqliteQueryMinResultsSatisfied: sqliteNativePlan.minResultsSatisfied ?? null,
|
|
16950
16988
|
sqliteQueryTopKFillRatio: sqliteNativePlan.topKFillRatio ?? null,
|
|
16951
16989
|
sqliteQueryUnderfilledTopK: sqliteNativePlan.underfilledTopK ?? null
|
|
16952
16990
|
};
|
|
@@ -16973,10 +17011,12 @@ var buildStoreQueryPlanTraceMetadata = (store) => {
|
|
|
16973
17011
|
postgresQueryMultiplierUsed: postgresNativePlan.queryMultiplierUsed ?? null,
|
|
16974
17012
|
postgresQueryCandidateLimitUsed: postgresNativePlan.candidateLimitUsed ?? null,
|
|
16975
17013
|
postgresQueryMaxBackfillsUsed: postgresNativePlan.maxBackfillsUsed ?? null,
|
|
17014
|
+
postgresQueryMinResultsUsed: postgresNativePlan.minResultsUsed ?? null,
|
|
16976
17015
|
postgresQueryJsRemainderRatio: postgresNativePlan.jsRemainderRatio ?? null,
|
|
16977
17016
|
postgresQueryCandidateYieldRatio: postgresNativePlan.candidateYieldRatio ?? null,
|
|
16978
17017
|
postgresQueryReturnedCount: postgresNativePlan.returnedCount ?? null,
|
|
16979
17018
|
postgresQueryBackfillLimitReached: postgresNativePlan.backfillLimitReached ?? null,
|
|
17019
|
+
postgresQueryMinResultsSatisfied: postgresNativePlan.minResultsSatisfied ?? null,
|
|
16980
17020
|
postgresQueryTopKFillRatio: postgresNativePlan.topKFillRatio ?? null,
|
|
16981
17021
|
postgresQueryUnderfilledTopK: postgresNativePlan.underfilledTopK ?? null
|
|
16982
17022
|
};
|
|
@@ -17107,6 +17147,7 @@ var createRAGCollection = (options) => {
|
|
|
17107
17147
|
filter: input.filter,
|
|
17108
17148
|
candidateLimit: input.nativeCandidateLimit,
|
|
17109
17149
|
maxBackfills: input.nativeMaxBackfills,
|
|
17150
|
+
minResults: input.nativeMinResults,
|
|
17110
17151
|
queryMultiplier: input.nativeQueryMultiplier,
|
|
17111
17152
|
queryVector: nextQueryVector,
|
|
17112
17153
|
topK: candidateTopK
|
|
@@ -22099,6 +22140,7 @@ var ragChat = (config) => {
|
|
|
22099
22140
|
filter: getObjectProperty(body, "filter"),
|
|
22100
22141
|
nativeCandidateLimit: typeof body.nativeCandidateLimit === "number" ? body.nativeCandidateLimit : undefined,
|
|
22101
22142
|
nativeMaxBackfills: typeof body.nativeMaxBackfills === "number" ? body.nativeMaxBackfills : undefined,
|
|
22143
|
+
nativeMinResults: typeof body.nativeMinResults === "number" ? body.nativeMinResults : undefined,
|
|
22102
22144
|
nativeQueryMultiplier: typeof body.nativeQueryMultiplier === "number" ? body.nativeQueryMultiplier : undefined,
|
|
22103
22145
|
retrieval: undefined,
|
|
22104
22146
|
model: getStringProperty(body, "model"),
|
|
@@ -29052,6 +29094,12 @@ var normalizeMaxBackfills = (value) => {
|
|
|
29052
29094
|
}
|
|
29053
29095
|
return Math.max(0, Math.floor(value));
|
|
29054
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
|
+
};
|
|
29055
29103
|
var toQualifiedTableName = (schemaName, tableName) => `${schemaName}.${tableName}`;
|
|
29056
29104
|
var toVectorLiteral = (vector) => `[${vector.join(",")}]`;
|
|
29057
29105
|
var parseMetadata = (value) => {
|
|
@@ -29141,6 +29189,7 @@ var updatePostgresLastQueryPlan = (input) => {
|
|
|
29141
29189
|
searchExpansionRatio: typeof input.initialSearchK === "number" && typeof input.finalSearchK === "number" && input.initialSearchK > 0 ? input.finalSearchK / input.initialSearchK : undefined,
|
|
29142
29190
|
candidateLimitUsed: input.candidateLimitUsed,
|
|
29143
29191
|
maxBackfillsUsed: input.maxBackfillsUsed,
|
|
29192
|
+
minResultsUsed: input.minResultsUsed,
|
|
29144
29193
|
jsRemainderClauseCount: pushdown.jsRemainderClauseCount,
|
|
29145
29194
|
queryMultiplierUsed: input.queryMultiplierUsed,
|
|
29146
29195
|
jsRemainderRatio: pushdown.jsRemainderRatio,
|
|
@@ -29152,6 +29201,7 @@ var updatePostgresLastQueryPlan = (input) => {
|
|
|
29152
29201
|
candidateYieldRatio: typeof input.returnedCount === "number" && typeof input.finalSearchK === "number" && input.finalSearchK > 0 ? input.returnedCount / input.finalSearchK : undefined,
|
|
29153
29202
|
returnedCount: input.returnedCount,
|
|
29154
29203
|
backfillLimitReached: input.backfillLimitReached,
|
|
29204
|
+
minResultsSatisfied: input.minResultsSatisfied,
|
|
29155
29205
|
topKFillRatio: typeof input.returnedCount === "number" && input.topK > 0 ? input.returnedCount / input.topK : undefined,
|
|
29156
29206
|
totalFilterClauseCount: pushdown.totalFilterClauseCount,
|
|
29157
29207
|
underfilledTopK: input.underfilledTopK
|
|
@@ -29236,6 +29286,7 @@ var createPostgresRAGStore = (options = {}) => {
|
|
|
29236
29286
|
const queryMultiplier2 = normalizeQueryMultiplier(input.queryMultiplier ?? options.queryMultiplier);
|
|
29237
29287
|
const candidateLimit = normalizeCandidateLimit(input.candidateLimit);
|
|
29238
29288
|
const maxBackfills = normalizeMaxBackfills(input.maxBackfills);
|
|
29289
|
+
const minResults = normalizeMinResults(input.minResults, input.topK);
|
|
29239
29290
|
const queryVectorLiteral = toVectorLiteral(queryVector);
|
|
29240
29291
|
const pushdownFilter = buildPostgresPushdownFilter(input.filter);
|
|
29241
29292
|
const countFilterPlan = buildPostgresFilterPlan(pushdownFilter);
|
|
@@ -29294,7 +29345,7 @@ var createPostgresRAGStore = (options = {}) => {
|
|
|
29294
29345
|
source: entry.chunk.source,
|
|
29295
29346
|
title: entry.chunk.title
|
|
29296
29347
|
})).sort((left, right) => right.score - left.score);
|
|
29297
|
-
if (mapped.length >=
|
|
29348
|
+
if (mapped.length >= minResults) {
|
|
29298
29349
|
break;
|
|
29299
29350
|
}
|
|
29300
29351
|
const nextSearchK = planNativeCandidateSearchBackfillK({
|
|
@@ -29305,8 +29356,8 @@ var createPostgresRAGStore = (options = {}) => {
|
|
|
29305
29356
|
maxBackfills
|
|
29306
29357
|
});
|
|
29307
29358
|
if (nextSearchK <= currentSearchK) {
|
|
29308
|
-
backfillLimitReached = typeof maxBackfills === "number" && backfillCount >= maxBackfills && mapped.length <
|
|
29309
|
-
candidateBudgetExhausted = mapped.length <
|
|
29359
|
+
backfillLimitReached = typeof maxBackfills === "number" && backfillCount >= maxBackfills && mapped.length < minResults;
|
|
29360
|
+
candidateBudgetExhausted = mapped.length < minResults;
|
|
29310
29361
|
break;
|
|
29311
29362
|
}
|
|
29312
29363
|
currentSearchK = nextSearchK;
|
|
@@ -29320,6 +29371,7 @@ var createPostgresRAGStore = (options = {}) => {
|
|
|
29320
29371
|
candidateBudgetExhausted,
|
|
29321
29372
|
candidateLimitUsed: candidateLimit,
|
|
29322
29373
|
maxBackfillsUsed: maxBackfills,
|
|
29374
|
+
minResultsUsed: minResults,
|
|
29323
29375
|
filter: input.filter,
|
|
29324
29376
|
pushdownFilter,
|
|
29325
29377
|
queryMultiplierUsed: queryMultiplier2,
|
|
@@ -29327,6 +29379,7 @@ var createPostgresRAGStore = (options = {}) => {
|
|
|
29327
29379
|
finalSearchK: currentSearchK,
|
|
29328
29380
|
initialSearchK,
|
|
29329
29381
|
nativeDiagnostics,
|
|
29382
|
+
minResultsSatisfied: returned.length >= minResults,
|
|
29330
29383
|
returnedCount: returned.length,
|
|
29331
29384
|
topK: input.topK,
|
|
29332
29385
|
underfilledTopK: returned.length < input.topK
|
|
@@ -29546,6 +29599,12 @@ var normalizeMaxBackfills2 = (value) => {
|
|
|
29546
29599
|
}
|
|
29547
29600
|
return Math.max(0, Math.floor(value));
|
|
29548
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
|
+
};
|
|
29549
29608
|
var toJSONString = (metadata) => metadata === undefined ? null : JSON.stringify(metadata);
|
|
29550
29609
|
var parseMetadata2 = (value) => {
|
|
29551
29610
|
if (value === null) {
|
|
@@ -30125,6 +30184,7 @@ var updateSQLiteLastQueryPlan = (input) => {
|
|
|
30125
30184
|
jsRemainderClauseCount: pushdown.jsRemainderClauseCount,
|
|
30126
30185
|
candidateLimitUsed: input.candidateLimitUsed,
|
|
30127
30186
|
maxBackfillsUsed: input.maxBackfillsUsed,
|
|
30187
|
+
minResultsUsed: input.minResultsUsed,
|
|
30128
30188
|
queryMultiplierUsed: input.queryMultiplierUsed,
|
|
30129
30189
|
jsRemainderRatio: pushdown.jsRemainderRatio,
|
|
30130
30190
|
pushdownApplied: pushdown.pushdownClauseCount > 0,
|
|
@@ -30135,6 +30195,7 @@ var updateSQLiteLastQueryPlan = (input) => {
|
|
|
30135
30195
|
candidateYieldRatio: typeof input.returnedCount === "number" && typeof input.finalSearchK === "number" && input.finalSearchK > 0 ? input.returnedCount / input.finalSearchK : undefined,
|
|
30136
30196
|
returnedCount: input.returnedCount,
|
|
30137
30197
|
backfillLimitReached: input.backfillLimitReached,
|
|
30198
|
+
minResultsSatisfied: input.minResultsSatisfied,
|
|
30138
30199
|
topKFillRatio: typeof input.returnedCount === "number" && input.topK > 0 ? input.returnedCount / input.topK : undefined,
|
|
30139
30200
|
totalFilterClauseCount: pushdown.totalFilterClauseCount,
|
|
30140
30201
|
underfilledTopK: input.underfilledTopK
|
|
@@ -30294,6 +30355,7 @@ var createSQLiteRAGStore = (options = {}) => {
|
|
|
30294
30355
|
const queryMultiplier = normalizeQueryMultiplier2(input.queryMultiplier ?? nativeConfig?.queryMultiplier);
|
|
30295
30356
|
const candidateLimit = normalizeCandidateLimit2(input.candidateLimit);
|
|
30296
30357
|
const maxBackfills = normalizeMaxBackfills2(input.maxBackfills);
|
|
30358
|
+
const minResults = normalizeMinResults2(input.minResults, input.topK);
|
|
30297
30359
|
const queryVector = normalizeVector(input.queryVector);
|
|
30298
30360
|
const queryVectorText = toVectorText(queryVector);
|
|
30299
30361
|
const pushdownFilter = buildSQLitePushdownFilter(input.filter);
|
|
@@ -30343,7 +30405,7 @@ var createSQLiteRAGStore = (options = {}) => {
|
|
|
30343
30405
|
source: entry.chunk.source,
|
|
30344
30406
|
title: entry.chunk.title
|
|
30345
30407
|
})).sort((left, right) => right.score - left.score);
|
|
30346
|
-
if (mapped.length >=
|
|
30408
|
+
if (mapped.length >= minResults) {
|
|
30347
30409
|
break;
|
|
30348
30410
|
}
|
|
30349
30411
|
const nextSearchK = planNativeCandidateSearchBackfillK({
|
|
@@ -30354,8 +30416,8 @@ var createSQLiteRAGStore = (options = {}) => {
|
|
|
30354
30416
|
maxBackfills
|
|
30355
30417
|
});
|
|
30356
30418
|
if (nextSearchK <= currentSearchK) {
|
|
30357
|
-
backfillLimitReached = typeof maxBackfills === "number" && backfillCount >= maxBackfills && mapped.length <
|
|
30358
|
-
candidateBudgetExhausted = mapped.length <
|
|
30419
|
+
backfillLimitReached = typeof maxBackfills === "number" && backfillCount >= maxBackfills && mapped.length < minResults;
|
|
30420
|
+
candidateBudgetExhausted = mapped.length < minResults;
|
|
30359
30421
|
break;
|
|
30360
30422
|
}
|
|
30361
30423
|
currentSearchK = nextSearchK;
|
|
@@ -30373,9 +30435,11 @@ var createSQLiteRAGStore = (options = {}) => {
|
|
|
30373
30435
|
pushdownFilter,
|
|
30374
30436
|
candidateLimitUsed: candidateLimit,
|
|
30375
30437
|
maxBackfillsUsed: maxBackfills,
|
|
30438
|
+
minResultsUsed: minResults,
|
|
30376
30439
|
queryMultiplierUsed: queryMultiplier,
|
|
30377
30440
|
queryMode: "native_vec0",
|
|
30378
30441
|
returnedCount: Math.min(mapped.length, input.topK),
|
|
30442
|
+
minResultsSatisfied: mapped.length >= minResults,
|
|
30379
30443
|
topK: input.topK,
|
|
30380
30444
|
underfilledTopK: mapped.length < input.topK
|
|
30381
30445
|
});
|
|
@@ -32543,5 +32607,5 @@ export {
|
|
|
32543
32607
|
addRAGEvaluationSuiteCase
|
|
32544
32608
|
};
|
|
32545
32609
|
|
|
32546
|
-
//# debugId=
|
|
32610
|
+
//# debugId=320F9912162970CC64756E2164756E21
|
|
32547
32611
|
//# sourceMappingURL=index.js.map
|