@absolutejs/absolute 0.19.0-beta.632 → 0.19.0-beta.634
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 +37 -3
- package/dist/ai/client/index.js.map +4 -4
- package/dist/ai/client/ui.js +37 -3
- package/dist/ai/client/ui.js.map +4 -4
- package/dist/ai/index.js +104 -9
- package/dist/ai/index.js.map +9 -9
- package/dist/ai/rag/quality.js +37 -3
- package/dist/ai/rag/quality.js.map +4 -4
- package/dist/ai/rag/ui.js +37 -3
- package/dist/ai/rag/ui.js.map +4 -4
- package/dist/angular/ai/index.js +37 -3
- package/dist/angular/ai/index.js.map +4 -4
- package/dist/react/ai/index.js +37 -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 +44 -0
- package/dist/src/vue/ai/useRAGEvaluate.d.ts +24 -0
- package/dist/src/vue/ai/useRAGIndexAdmin.d.ts +12 -0
- package/dist/src/vue/ai/useRAGSearch.d.ts +4 -0
- package/dist/svelte/ai/index.js +37 -3
- package/dist/svelte/ai/index.js.map +4 -4
- package/dist/types/ai.d.ts +22 -0
- package/dist/vue/ai/index.js +37 -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 === "postgresQueryJsRemainderClauseCount" ? "Postgres JS remainder clauses" : key === "postgresQueryMultiplierUsed" ? "Postgres query multiplier" : 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 === "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,
|
|
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) => {
|
|
@@ -2522,12 +2522,15 @@ var formatSQLitePlannerCueSummary = (input) => {
|
|
|
2522
2522
|
typeof input?.sqliteQueryPushdownCoverageRatio === "number" ? `pushdown ${(input.sqliteQueryPushdownCoverageRatio * 100).toFixed(0)}%` : undefined,
|
|
2523
2523
|
typeof input?.sqliteQueryJsRemainderClauseCount === "number" ? `js remainder ${input.sqliteQueryJsRemainderClauseCount}` : undefined,
|
|
2524
2524
|
typeof input?.sqliteQueryMultiplierUsed === "number" ? `x${input.sqliteQueryMultiplierUsed}` : undefined,
|
|
2525
|
+
typeof input?.sqliteQueryCandidateLimitUsed === "number" ? `cap ${input.sqliteQueryCandidateLimitUsed}` : undefined,
|
|
2526
|
+
typeof input?.sqliteQueryMaxBackfillsUsed === "number" ? `backfills ${input.sqliteQueryMaxBackfillsUsed}` : undefined,
|
|
2525
2527
|
typeof input?.sqliteQueryJsRemainderRatio === "number" ? `js ${(input.sqliteQueryJsRemainderRatio * 100).toFixed(0)}%` : undefined,
|
|
2526
2528
|
typeof input?.sqliteQueryTotalFilterClauseCount === "number" ? `total clauses ${input.sqliteQueryTotalFilterClauseCount}` : undefined,
|
|
2527
2529
|
typeof input?.sqliteQueryFilteredCandidates === "number" ? `filtered ${input.sqliteQueryFilteredCandidates}` : undefined,
|
|
2528
2530
|
typeof input?.sqliteQueryInitialSearchK === "number" && typeof input?.sqliteQueryFinalSearchK === "number" ? `searchK ${input.sqliteQueryInitialSearchK}->${input.sqliteQueryFinalSearchK}` : typeof input?.sqliteQueryFinalSearchK === "number" ? `searchK ${input.sqliteQueryFinalSearchK}` : undefined,
|
|
2529
2531
|
typeof input?.sqliteQuerySearchExpansionRatio === "number" ? `expand ${(input.sqliteQuerySearchExpansionRatio * 100).toFixed(0)}%` : undefined,
|
|
2530
2532
|
typeof input?.sqliteQueryBackfillCount === "number" ? `backfill ${input.sqliteQueryBackfillCount}` : undefined,
|
|
2533
|
+
typeof input?.sqliteQueryBackfillLimitReached === "boolean" && input.sqliteQueryBackfillLimitReached ? "backfill limit reached" : undefined,
|
|
2531
2534
|
typeof input?.sqliteQueryReturnedCount === "number" ? `returned ${input.sqliteQueryReturnedCount}` : undefined,
|
|
2532
2535
|
typeof input?.sqliteQueryCandidateYieldRatio === "number" ? `yield ${(input.sqliteQueryCandidateYieldRatio * 100).toFixed(0)}%` : undefined,
|
|
2533
2536
|
typeof input?.sqliteQueryTopKFillRatio === "number" ? `fill ${(input.sqliteQueryTopKFillRatio * 100).toFixed(0)}%` : undefined,
|
|
@@ -2548,12 +2551,15 @@ var formatPostgresPlannerCueSummary = (input) => {
|
|
|
2548
2551
|
typeof input?.postgresQueryPushdownCoverageRatio === "number" ? `pushdown ${(input.postgresQueryPushdownCoverageRatio * 100).toFixed(0)}%` : undefined,
|
|
2549
2552
|
typeof input?.postgresQueryJsRemainderClauseCount === "number" ? `js remainder ${input.postgresQueryJsRemainderClauseCount}` : undefined,
|
|
2550
2553
|
typeof input?.postgresQueryMultiplierUsed === "number" ? `x${input.postgresQueryMultiplierUsed}` : undefined,
|
|
2554
|
+
typeof input?.postgresQueryCandidateLimitUsed === "number" ? `cap ${input.postgresQueryCandidateLimitUsed}` : undefined,
|
|
2555
|
+
typeof input?.postgresQueryMaxBackfillsUsed === "number" ? `backfills ${input.postgresQueryMaxBackfillsUsed}` : undefined,
|
|
2551
2556
|
typeof input?.postgresQueryJsRemainderRatio === "number" ? `js ${(input.postgresQueryJsRemainderRatio * 100).toFixed(0)}%` : undefined,
|
|
2552
2557
|
typeof input?.postgresQueryTotalFilterClauseCount === "number" ? `total clauses ${input.postgresQueryTotalFilterClauseCount}` : undefined,
|
|
2553
2558
|
typeof input?.postgresQueryFilteredCandidates === "number" ? `filtered ${input.postgresQueryFilteredCandidates}` : undefined,
|
|
2554
2559
|
typeof input?.postgresQueryInitialSearchK === "number" && typeof input?.postgresQueryFinalSearchK === "number" ? `searchK ${input.postgresQueryInitialSearchK}->${input.postgresQueryFinalSearchK}` : typeof input?.postgresQueryFinalSearchK === "number" ? `searchK ${input.postgresQueryFinalSearchK}` : undefined,
|
|
2555
2560
|
typeof input?.postgresQuerySearchExpansionRatio === "number" ? `expand ${(input.postgresQuerySearchExpansionRatio * 100).toFixed(0)}%` : undefined,
|
|
2556
2561
|
typeof input?.postgresQueryBackfillCount === "number" ? `backfill ${input.postgresQueryBackfillCount}` : undefined,
|
|
2562
|
+
typeof input?.postgresQueryBackfillLimitReached === "boolean" && input.postgresQueryBackfillLimitReached ? "backfill limit reached" : undefined,
|
|
2557
2563
|
typeof input?.postgresQueryReturnedCount === "number" ? `returned ${input.postgresQueryReturnedCount}` : undefined,
|
|
2558
2564
|
typeof input?.postgresQueryCandidateYieldRatio === "number" ? `yield ${(input.postgresQueryCandidateYieldRatio * 100).toFixed(0)}%` : undefined,
|
|
2559
2565
|
typeof input?.postgresQueryTopKFillRatio === "number" ? `fill ${(input.postgresQueryTopKFillRatio * 100).toFixed(0)}%` : undefined,
|
|
@@ -2574,6 +2580,7 @@ var formatComparisonSQLitePlannerCueSummary = (entry) => {
|
|
|
2574
2580
|
sqliteQueryInitialSearchK: snapshot.sqliteQueryInitialSearchK,
|
|
2575
2581
|
sqliteQuerySearchExpansionRatio: snapshot.sqliteQuerySearchExpansionRatio,
|
|
2576
2582
|
sqliteQueryJsRemainderClauseCount: snapshot.sqliteQueryJsRemainderClauseCount,
|
|
2583
|
+
sqliteQueryCandidateLimitUsed: snapshot.sqliteQueryCandidateLimitUsed,
|
|
2577
2584
|
sqliteQueryMode: snapshot.sqliteQueryMode,
|
|
2578
2585
|
sqliteQueryPushdownApplied: snapshot.sqliteQueryPushdownApplied,
|
|
2579
2586
|
sqliteQueryPushdownClauseCount: snapshot.sqliteQueryPushdownClauseCount,
|
|
@@ -2598,6 +2605,7 @@ var formatComparisonPostgresPlannerCueSummary = (entry) => {
|
|
|
2598
2605
|
postgresQueryInitialSearchK: snapshot.postgresQueryInitialSearchK,
|
|
2599
2606
|
postgresQuerySearchExpansionRatio: snapshot.postgresQuerySearchExpansionRatio,
|
|
2600
2607
|
postgresQueryJsRemainderClauseCount: snapshot.postgresQueryJsRemainderClauseCount,
|
|
2608
|
+
postgresQueryCandidateLimitUsed: snapshot.postgresQueryCandidateLimitUsed,
|
|
2601
2609
|
postgresQueryMultiplierUsed: snapshot.postgresQueryMultiplierUsed,
|
|
2602
2610
|
postgresQueryMode: snapshot.postgresQueryMode,
|
|
2603
2611
|
postgresQueryPushdownApplied: snapshot.postgresQueryPushdownApplied,
|
|
@@ -2763,6 +2771,7 @@ var formatHistorySQLitePlannerShift = (history) => {
|
|
|
2763
2771
|
sqliteQueryInitialSearchK: entry.previousSqliteQueryInitialSearchK,
|
|
2764
2772
|
sqliteQuerySearchExpansionRatio: entry.previousSqliteQuerySearchExpansionRatio,
|
|
2765
2773
|
sqliteQueryJsRemainderClauseCount: entry.previousSqliteQueryJsRemainderClauseCount,
|
|
2774
|
+
sqliteQueryCandidateLimitUsed: entry.previousSqliteQueryCandidateLimitUsed,
|
|
2766
2775
|
sqliteQueryMode: entry.previousSqliteQueryMode,
|
|
2767
2776
|
sqliteQueryPushdownApplied: entry.previousSqliteQueryPushdownApplied,
|
|
2768
2777
|
sqliteQueryPushdownClauseCount: entry.previousSqliteQueryPushdownClauseCount,
|
|
@@ -2797,6 +2806,7 @@ var formatHistoryPostgresPlannerShift = (history) => {
|
|
|
2797
2806
|
postgresQueryInitialSearchK: entry.previousPostgresQueryInitialSearchK,
|
|
2798
2807
|
postgresQuerySearchExpansionRatio: entry.previousPostgresQuerySearchExpansionRatio,
|
|
2799
2808
|
postgresQueryJsRemainderClauseCount: entry.previousPostgresQueryJsRemainderClauseCount,
|
|
2809
|
+
postgresQueryCandidateLimitUsed: entry.previousPostgresQueryCandidateLimitUsed,
|
|
2800
2810
|
postgresQueryMultiplierUsed: entry.previousPostgresQueryMultiplierUsed,
|
|
2801
2811
|
postgresQueryMode: entry.previousPostgresQueryMode,
|
|
2802
2812
|
postgresQueryPushdownApplied: entry.previousPostgresQueryPushdownApplied,
|
|
@@ -3861,10 +3871,13 @@ var buildEvaluationSQLiteQueryPlanSnapshot = (trace) => {
|
|
|
3861
3871
|
sqliteQueryTotalFilterClauseCount: typeof metadata.sqliteQueryTotalFilterClauseCount === "number" ? metadata.sqliteQueryTotalFilterClauseCount : undefined,
|
|
3862
3872
|
sqliteQueryJsRemainderClauseCount: typeof metadata.sqliteQueryJsRemainderClauseCount === "number" ? metadata.sqliteQueryJsRemainderClauseCount : undefined,
|
|
3863
3873
|
sqliteQueryMultiplierUsed: typeof metadata.sqliteQueryMultiplierUsed === "number" ? metadata.sqliteQueryMultiplierUsed : undefined,
|
|
3874
|
+
sqliteQueryCandidateLimitUsed: typeof metadata.sqliteQueryCandidateLimitUsed === "number" ? metadata.sqliteQueryCandidateLimitUsed : undefined,
|
|
3875
|
+
sqliteQueryMaxBackfillsUsed: typeof metadata.sqliteQueryMaxBackfillsUsed === "number" ? metadata.sqliteQueryMaxBackfillsUsed : undefined,
|
|
3864
3876
|
sqliteQueryPushdownCoverageRatio: typeof metadata.sqliteQueryPushdownCoverageRatio === "number" ? metadata.sqliteQueryPushdownCoverageRatio : undefined,
|
|
3865
3877
|
sqliteQueryJsRemainderRatio: typeof metadata.sqliteQueryJsRemainderRatio === "number" ? metadata.sqliteQueryJsRemainderRatio : undefined,
|
|
3866
3878
|
sqliteQueryReturnedCount: typeof metadata.sqliteQueryReturnedCount === "number" ? metadata.sqliteQueryReturnedCount : undefined,
|
|
3867
3879
|
sqliteQueryCandidateYieldRatio: typeof metadata.sqliteQueryCandidateYieldRatio === "number" ? metadata.sqliteQueryCandidateYieldRatio : undefined,
|
|
3880
|
+
sqliteQueryBackfillLimitReached: typeof metadata.sqliteQueryBackfillLimitReached === "boolean" ? metadata.sqliteQueryBackfillLimitReached : undefined,
|
|
3868
3881
|
sqliteQueryTopKFillRatio: typeof metadata.sqliteQueryTopKFillRatio === "number" ? metadata.sqliteQueryTopKFillRatio : undefined,
|
|
3869
3882
|
sqliteQueryUnderfilledTopK: typeof metadata.sqliteQueryUnderfilledTopK === "boolean" ? metadata.sqliteQueryUnderfilledTopK : undefined
|
|
3870
3883
|
};
|
|
@@ -3887,10 +3900,13 @@ var buildEvaluationPostgresQueryPlanSnapshot = (trace) => {
|
|
|
3887
3900
|
postgresQueryTotalFilterClauseCount: typeof metadata.postgresQueryTotalFilterClauseCount === "number" ? metadata.postgresQueryTotalFilterClauseCount : undefined,
|
|
3888
3901
|
postgresQueryJsRemainderClauseCount: typeof metadata.postgresQueryJsRemainderClauseCount === "number" ? metadata.postgresQueryJsRemainderClauseCount : undefined,
|
|
3889
3902
|
postgresQueryMultiplierUsed: typeof metadata.postgresQueryMultiplierUsed === "number" ? metadata.postgresQueryMultiplierUsed : undefined,
|
|
3903
|
+
postgresQueryCandidateLimitUsed: typeof metadata.postgresQueryCandidateLimitUsed === "number" ? metadata.postgresQueryCandidateLimitUsed : undefined,
|
|
3904
|
+
postgresQueryMaxBackfillsUsed: typeof metadata.postgresQueryMaxBackfillsUsed === "number" ? metadata.postgresQueryMaxBackfillsUsed : undefined,
|
|
3890
3905
|
postgresQueryPushdownCoverageRatio: typeof metadata.postgresQueryPushdownCoverageRatio === "number" ? metadata.postgresQueryPushdownCoverageRatio : undefined,
|
|
3891
3906
|
postgresQueryJsRemainderRatio: typeof metadata.postgresQueryJsRemainderRatio === "number" ? metadata.postgresQueryJsRemainderRatio : undefined,
|
|
3892
3907
|
postgresQueryReturnedCount: typeof metadata.postgresQueryReturnedCount === "number" ? metadata.postgresQueryReturnedCount : undefined,
|
|
3893
3908
|
postgresQueryCandidateYieldRatio: typeof metadata.postgresQueryCandidateYieldRatio === "number" ? metadata.postgresQueryCandidateYieldRatio : undefined,
|
|
3909
|
+
postgresQueryBackfillLimitReached: typeof metadata.postgresQueryBackfillLimitReached === "boolean" ? metadata.postgresQueryBackfillLimitReached : undefined,
|
|
3894
3910
|
postgresQueryTopKFillRatio: typeof metadata.postgresQueryTopKFillRatio === "number" ? metadata.postgresQueryTopKFillRatio : undefined,
|
|
3895
3911
|
postgresQueryUnderfilledTopK: typeof metadata.postgresQueryUnderfilledTopK === "boolean" ? metadata.postgresQueryUnderfilledTopK : undefined
|
|
3896
3912
|
};
|
|
@@ -5142,6 +5158,8 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5142
5158
|
const sqliteQueryTotalFilterClauseCount = currentSQLiteQueryPlanSnapshot.sqliteQueryTotalFilterClauseCount ?? currentSnapshot?.sqliteQueryTotalFilterClauseCount;
|
|
5143
5159
|
const sqliteQueryJsRemainderClauseCount = currentSQLiteQueryPlanSnapshot.sqliteQueryJsRemainderClauseCount ?? currentSnapshot?.sqliteQueryJsRemainderClauseCount;
|
|
5144
5160
|
const sqliteQueryMultiplierUsed = currentSQLiteQueryPlanSnapshot.sqliteQueryMultiplierUsed ?? currentSnapshot?.sqliteQueryMultiplierUsed;
|
|
5161
|
+
const sqliteQueryCandidateLimitUsed = currentSQLiteQueryPlanSnapshot.sqliteQueryCandidateLimitUsed ?? currentSnapshot?.sqliteQueryCandidateLimitUsed;
|
|
5162
|
+
const sqliteQueryMaxBackfillsUsed = currentSQLiteQueryPlanSnapshot.sqliteQueryMaxBackfillsUsed ?? currentSnapshot?.sqliteQueryMaxBackfillsUsed;
|
|
5145
5163
|
const sqliteQueryPushdownCoverageRatio = currentSQLiteQueryPlanSnapshot.sqliteQueryPushdownCoverageRatio ?? currentSnapshot?.sqliteQueryPushdownCoverageRatio;
|
|
5146
5164
|
const sqliteQueryJsRemainderRatio = currentSQLiteQueryPlanSnapshot.sqliteQueryJsRemainderRatio ?? currentSnapshot?.sqliteQueryJsRemainderRatio;
|
|
5147
5165
|
const sqliteQueryFilteredCandidates = currentSQLiteQueryPlanSnapshot.sqliteQueryFilteredCandidates ?? currentSnapshot?.sqliteQueryFilteredCandidates;
|
|
@@ -5149,6 +5167,7 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5149
5167
|
const sqliteQueryFinalSearchK = currentSQLiteQueryPlanSnapshot.sqliteQueryFinalSearchK ?? currentSnapshot?.sqliteQueryFinalSearchK;
|
|
5150
5168
|
const sqliteQuerySearchExpansionRatio = currentSQLiteQueryPlanSnapshot.sqliteQuerySearchExpansionRatio ?? currentSnapshot?.sqliteQuerySearchExpansionRatio;
|
|
5151
5169
|
const sqliteQueryBackfillCount = currentSQLiteQueryPlanSnapshot.sqliteQueryBackfillCount ?? currentSnapshot?.sqliteQueryBackfillCount;
|
|
5170
|
+
const sqliteQueryBackfillLimitReached = currentSQLiteQueryPlanSnapshot.sqliteQueryBackfillLimitReached ?? currentSnapshot?.sqliteQueryBackfillLimitReached;
|
|
5152
5171
|
const sqliteQueryReturnedCount = currentSQLiteQueryPlanSnapshot.sqliteQueryReturnedCount ?? currentSnapshot?.sqliteQueryReturnedCount;
|
|
5153
5172
|
const sqliteQueryCandidateYieldRatio = currentSQLiteQueryPlanSnapshot.sqliteQueryCandidateYieldRatio ?? currentSnapshot?.sqliteQueryCandidateYieldRatio;
|
|
5154
5173
|
const sqliteQueryTopKFillRatio = currentSQLiteQueryPlanSnapshot.sqliteQueryTopKFillRatio ?? currentSnapshot?.sqliteQueryTopKFillRatio;
|
|
@@ -5162,6 +5181,8 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5162
5181
|
const postgresQueryTotalFilterClauseCount = currentPostgresQueryPlanSnapshot.postgresQueryTotalFilterClauseCount ?? currentSnapshot?.postgresQueryTotalFilterClauseCount;
|
|
5163
5182
|
const postgresQueryJsRemainderClauseCount = currentPostgresQueryPlanSnapshot.postgresQueryJsRemainderClauseCount ?? currentSnapshot?.postgresQueryJsRemainderClauseCount;
|
|
5164
5183
|
const postgresQueryMultiplierUsed = currentPostgresQueryPlanSnapshot.postgresQueryMultiplierUsed ?? currentSnapshot?.postgresQueryMultiplierUsed;
|
|
5184
|
+
const postgresQueryCandidateLimitUsed = currentPostgresQueryPlanSnapshot.postgresQueryCandidateLimitUsed ?? currentSnapshot?.postgresQueryCandidateLimitUsed;
|
|
5185
|
+
const postgresQueryMaxBackfillsUsed = currentPostgresQueryPlanSnapshot.postgresQueryMaxBackfillsUsed ?? currentSnapshot?.postgresQueryMaxBackfillsUsed;
|
|
5165
5186
|
const postgresQueryPushdownCoverageRatio = currentPostgresQueryPlanSnapshot.postgresQueryPushdownCoverageRatio ?? currentSnapshot?.postgresQueryPushdownCoverageRatio;
|
|
5166
5187
|
const postgresQueryJsRemainderRatio = currentPostgresQueryPlanSnapshot.postgresQueryJsRemainderRatio ?? currentSnapshot?.postgresQueryJsRemainderRatio;
|
|
5167
5188
|
const postgresQueryFilteredCandidates = currentPostgresQueryPlanSnapshot.postgresQueryFilteredCandidates ?? currentSnapshot?.postgresQueryFilteredCandidates;
|
|
@@ -5169,6 +5190,7 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5169
5190
|
const postgresQueryFinalSearchK = currentPostgresQueryPlanSnapshot.postgresQueryFinalSearchK ?? currentSnapshot?.postgresQueryFinalSearchK;
|
|
5170
5191
|
const postgresQuerySearchExpansionRatio = currentPostgresQueryPlanSnapshot.postgresQuerySearchExpansionRatio ?? currentSnapshot?.postgresQuerySearchExpansionRatio;
|
|
5171
5192
|
const postgresQueryBackfillCount = currentPostgresQueryPlanSnapshot.postgresQueryBackfillCount ?? currentSnapshot?.postgresQueryBackfillCount;
|
|
5193
|
+
const postgresQueryBackfillLimitReached = currentPostgresQueryPlanSnapshot.postgresQueryBackfillLimitReached ?? currentSnapshot?.postgresQueryBackfillLimitReached;
|
|
5172
5194
|
const postgresQueryReturnedCount = currentPostgresQueryPlanSnapshot.postgresQueryReturnedCount ?? currentSnapshot?.postgresQueryReturnedCount;
|
|
5173
5195
|
const postgresQueryCandidateYieldRatio = currentPostgresQueryPlanSnapshot.postgresQueryCandidateYieldRatio ?? currentSnapshot?.postgresQueryCandidateYieldRatio;
|
|
5174
5196
|
const postgresQueryTopKFillRatio = currentPostgresQueryPlanSnapshot.postgresQueryTopKFillRatio ?? currentSnapshot?.postgresQueryTopKFillRatio;
|
|
@@ -5179,7 +5201,7 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5179
5201
|
const previousFilterSignature = JSON.stringify(previousTrace?.inputFilter ?? undefined);
|
|
5180
5202
|
const currentRetrievalSignature = JSON.stringify(retrieval ?? undefined);
|
|
5181
5203
|
const previousRetrievalSignature = JSON.stringify(previousTrace?.inputRetrieval ?? undefined);
|
|
5182
|
-
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.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.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";
|
|
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";
|
|
5183
5205
|
return {
|
|
5184
5206
|
candidateTopK: currentTrace?.candidateTopK ?? 0,
|
|
5185
5207
|
caseId: caseResult.caseId,
|
|
@@ -5202,6 +5224,7 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5202
5224
|
previousLeadSpeakerAttributionCue: previousTrace?.leadSpeakerAttributionCue,
|
|
5203
5225
|
previousLeadSpeakerCue: previousTrace?.leadSpeakerCue,
|
|
5204
5226
|
previousSqliteQueryBackfillCount: previousTrace?.sqliteQueryBackfillCount,
|
|
5227
|
+
previousSqliteQueryBackfillLimitReached: previousTrace?.sqliteQueryBackfillLimitReached,
|
|
5205
5228
|
previousSqliteQueryCandidateBudgetExhausted: previousTrace?.sqliteQueryCandidateBudgetExhausted,
|
|
5206
5229
|
previousSqliteQueryCandidateCoverage: previousTrace?.sqliteQueryCandidateCoverage,
|
|
5207
5230
|
previousSqliteQueryFilteredCandidates: previousTrace?.sqliteQueryFilteredCandidates,
|
|
@@ -5215,6 +5238,8 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5215
5238
|
previousSqliteQueryTotalFilterClauseCount: previousTrace?.sqliteQueryTotalFilterClauseCount,
|
|
5216
5239
|
previousSqliteQueryJsRemainderClauseCount: previousTrace?.sqliteQueryJsRemainderClauseCount,
|
|
5217
5240
|
previousSqliteQueryMultiplierUsed: previousTrace?.sqliteQueryMultiplierUsed,
|
|
5241
|
+
previousSqliteQueryCandidateLimitUsed: previousTrace?.sqliteQueryCandidateLimitUsed,
|
|
5242
|
+
previousSqliteQueryMaxBackfillsUsed: previousTrace?.sqliteQueryMaxBackfillsUsed,
|
|
5218
5243
|
previousSqliteQueryPushdownCoverageRatio: previousTrace?.sqliteQueryPushdownCoverageRatio,
|
|
5219
5244
|
previousSqliteQueryJsRemainderRatio: previousTrace?.sqliteQueryJsRemainderRatio,
|
|
5220
5245
|
previousSqliteQueryReturnedCount: previousTrace?.sqliteQueryReturnedCount,
|
|
@@ -5222,6 +5247,7 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5222
5247
|
previousSqliteQueryTopKFillRatio: previousTrace?.sqliteQueryTopKFillRatio,
|
|
5223
5248
|
previousSqliteQueryUnderfilledTopK: previousTrace?.sqliteQueryUnderfilledTopK,
|
|
5224
5249
|
previousPostgresQueryBackfillCount: previousTrace?.postgresQueryBackfillCount,
|
|
5250
|
+
previousPostgresQueryBackfillLimitReached: previousTrace?.postgresQueryBackfillLimitReached,
|
|
5225
5251
|
previousPostgresQueryCandidateBudgetExhausted: previousTrace?.postgresQueryCandidateBudgetExhausted,
|
|
5226
5252
|
previousPostgresQueryCandidateCoverage: previousTrace?.postgresQueryCandidateCoverage,
|
|
5227
5253
|
previousPostgresQueryFilteredCandidates: previousTrace?.postgresQueryFilteredCandidates,
|
|
@@ -5235,6 +5261,8 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5235
5261
|
previousPostgresQueryTotalFilterClauseCount: previousTrace?.postgresQueryTotalFilterClauseCount,
|
|
5236
5262
|
previousPostgresQueryJsRemainderClauseCount: previousTrace?.postgresQueryJsRemainderClauseCount,
|
|
5237
5263
|
previousPostgresQueryMultiplierUsed: previousTrace?.postgresQueryMultiplierUsed,
|
|
5264
|
+
previousPostgresQueryCandidateLimitUsed: previousTrace?.postgresQueryCandidateLimitUsed,
|
|
5265
|
+
previousPostgresQueryMaxBackfillsUsed: previousTrace?.postgresQueryMaxBackfillsUsed,
|
|
5238
5266
|
previousPostgresQueryPushdownCoverageRatio: previousTrace?.postgresQueryPushdownCoverageRatio,
|
|
5239
5267
|
previousPostgresQueryJsRemainderRatio: previousTrace?.postgresQueryJsRemainderRatio,
|
|
5240
5268
|
previousPostgresQueryReturnedCount: previousTrace?.postgresQueryReturnedCount,
|
|
@@ -5258,6 +5286,7 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5258
5286
|
leadSpeakerAttributionCue,
|
|
5259
5287
|
leadSpeakerCue,
|
|
5260
5288
|
sqliteQueryBackfillCount,
|
|
5289
|
+
sqliteQueryBackfillLimitReached,
|
|
5261
5290
|
sqliteQueryCandidateBudgetExhausted,
|
|
5262
5291
|
sqliteQueryCandidateCoverage,
|
|
5263
5292
|
sqliteQueryFilteredCandidates,
|
|
@@ -5271,6 +5300,8 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5271
5300
|
sqliteQueryTotalFilterClauseCount,
|
|
5272
5301
|
sqliteQueryJsRemainderClauseCount,
|
|
5273
5302
|
sqliteQueryMultiplierUsed,
|
|
5303
|
+
sqliteQueryCandidateLimitUsed,
|
|
5304
|
+
sqliteQueryMaxBackfillsUsed,
|
|
5274
5305
|
sqliteQueryPushdownCoverageRatio,
|
|
5275
5306
|
sqliteQueryJsRemainderRatio,
|
|
5276
5307
|
sqliteQueryReturnedCount,
|
|
@@ -5278,6 +5309,7 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5278
5309
|
sqliteQueryTopKFillRatio,
|
|
5279
5310
|
sqliteQueryUnderfilledTopK,
|
|
5280
5311
|
postgresQueryBackfillCount,
|
|
5312
|
+
postgresQueryBackfillLimitReached,
|
|
5281
5313
|
postgresQueryCandidateBudgetExhausted,
|
|
5282
5314
|
postgresQueryCandidateCoverage,
|
|
5283
5315
|
postgresQueryFilteredCandidates,
|
|
@@ -5291,6 +5323,8 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5291
5323
|
postgresQueryTotalFilterClauseCount,
|
|
5292
5324
|
postgresQueryJsRemainderClauseCount,
|
|
5293
5325
|
postgresQueryMultiplierUsed,
|
|
5326
|
+
postgresQueryCandidateLimitUsed,
|
|
5327
|
+
postgresQueryMaxBackfillsUsed,
|
|
5294
5328
|
postgresQueryPushdownCoverageRatio,
|
|
5295
5329
|
postgresQueryJsRemainderRatio,
|
|
5296
5330
|
postgresQueryReturnedCount,
|
|
@@ -16907,9 +16941,12 @@ var buildStoreQueryPlanTraceMetadata = (store) => {
|
|
|
16907
16941
|
sqliteQueryTotalFilterClauseCount: sqliteNativePlan.totalFilterClauseCount,
|
|
16908
16942
|
sqliteQueryJsRemainderClauseCount: sqliteNativePlan.jsRemainderClauseCount,
|
|
16909
16943
|
sqliteQueryMultiplierUsed: sqliteNativePlan.queryMultiplierUsed ?? null,
|
|
16944
|
+
sqliteQueryCandidateLimitUsed: sqliteNativePlan.candidateLimitUsed ?? null,
|
|
16945
|
+
sqliteQueryMaxBackfillsUsed: sqliteNativePlan.maxBackfillsUsed ?? null,
|
|
16910
16946
|
sqliteQueryJsRemainderRatio: sqliteNativePlan.jsRemainderRatio ?? null,
|
|
16911
16947
|
sqliteQueryCandidateYieldRatio: sqliteNativePlan.candidateYieldRatio ?? null,
|
|
16912
16948
|
sqliteQueryReturnedCount: sqliteNativePlan.returnedCount ?? null,
|
|
16949
|
+
sqliteQueryBackfillLimitReached: sqliteNativePlan.backfillLimitReached ?? null,
|
|
16913
16950
|
sqliteQueryTopKFillRatio: sqliteNativePlan.topKFillRatio ?? null,
|
|
16914
16951
|
sqliteQueryUnderfilledTopK: sqliteNativePlan.underfilledTopK ?? null
|
|
16915
16952
|
};
|
|
@@ -16934,9 +16971,12 @@ var buildStoreQueryPlanTraceMetadata = (store) => {
|
|
|
16934
16971
|
postgresQueryTotalFilterClauseCount: postgresNativePlan.totalFilterClauseCount,
|
|
16935
16972
|
postgresQueryJsRemainderClauseCount: postgresNativePlan.jsRemainderClauseCount,
|
|
16936
16973
|
postgresQueryMultiplierUsed: postgresNativePlan.queryMultiplierUsed ?? null,
|
|
16974
|
+
postgresQueryCandidateLimitUsed: postgresNativePlan.candidateLimitUsed ?? null,
|
|
16975
|
+
postgresQueryMaxBackfillsUsed: postgresNativePlan.maxBackfillsUsed ?? null,
|
|
16937
16976
|
postgresQueryJsRemainderRatio: postgresNativePlan.jsRemainderRatio ?? null,
|
|
16938
16977
|
postgresQueryCandidateYieldRatio: postgresNativePlan.candidateYieldRatio ?? null,
|
|
16939
16978
|
postgresQueryReturnedCount: postgresNativePlan.returnedCount ?? null,
|
|
16979
|
+
postgresQueryBackfillLimitReached: postgresNativePlan.backfillLimitReached ?? null,
|
|
16940
16980
|
postgresQueryTopKFillRatio: postgresNativePlan.topKFillRatio ?? null,
|
|
16941
16981
|
postgresQueryUnderfilledTopK: postgresNativePlan.underfilledTopK ?? null
|
|
16942
16982
|
};
|
|
@@ -17065,6 +17105,8 @@ var createRAGCollection = (options) => {
|
|
|
17065
17105
|
text: query
|
|
17066
17106
|
}, "query").then((nextQueryVector) => options.store.query({
|
|
17067
17107
|
filter: input.filter,
|
|
17108
|
+
candidateLimit: input.nativeCandidateLimit,
|
|
17109
|
+
maxBackfills: input.nativeMaxBackfills,
|
|
17068
17110
|
queryMultiplier: input.nativeQueryMultiplier,
|
|
17069
17111
|
queryVector: nextQueryVector,
|
|
17070
17112
|
topK: candidateTopK
|
|
@@ -22055,6 +22097,8 @@ var ragChat = (config) => {
|
|
|
22055
22097
|
}
|
|
22056
22098
|
const input = {
|
|
22057
22099
|
filter: getObjectProperty(body, "filter"),
|
|
22100
|
+
nativeCandidateLimit: typeof body.nativeCandidateLimit === "number" ? body.nativeCandidateLimit : undefined,
|
|
22101
|
+
nativeMaxBackfills: typeof body.nativeMaxBackfills === "number" ? body.nativeMaxBackfills : undefined,
|
|
22058
22102
|
nativeQueryMultiplier: typeof body.nativeQueryMultiplier === "number" ? body.nativeQueryMultiplier : undefined,
|
|
22059
22103
|
retrieval: undefined,
|
|
22060
22104
|
model: getStringProperty(body, "model"),
|
|
@@ -28741,6 +28785,9 @@ var planNativeCandidateSearchK = (input) => {
|
|
|
28741
28785
|
return Math.min(base, filtered);
|
|
28742
28786
|
};
|
|
28743
28787
|
var planNativeCandidateSearchBackfillK = (input) => {
|
|
28788
|
+
if (typeof input.maxBackfills === "number" && Number.isFinite(input.maxBackfills) && (input.backfillCount ?? 0) >= Math.max(0, Math.floor(input.maxBackfills))) {
|
|
28789
|
+
return input.currentSearchK;
|
|
28790
|
+
}
|
|
28744
28791
|
const cappedLimit = input.filteredCandidateCount === undefined || !Number.isFinite(input.filteredCandidateCount) ? input.candidateLimit : Math.min(input.candidateLimit, Math.max(0, Math.floor(input.filteredCandidateCount)));
|
|
28745
28792
|
if (input.currentSearchK >= cappedLimit) {
|
|
28746
28793
|
return input.currentSearchK;
|
|
@@ -28993,6 +29040,18 @@ var normalizeQueryMultiplier = (value) => {
|
|
|
28993
29040
|
}
|
|
28994
29041
|
return Math.min(MAX_QUERY_MULTIPLIER, Math.max(1, Math.floor(value)));
|
|
28995
29042
|
};
|
|
29043
|
+
var normalizeCandidateLimit = (value) => {
|
|
29044
|
+
if (value === undefined || !Number.isFinite(value)) {
|
|
29045
|
+
return RAG_NATIVE_QUERY_CANDIDATE_LIMIT;
|
|
29046
|
+
}
|
|
29047
|
+
return Math.min(RAG_NATIVE_QUERY_CANDIDATE_LIMIT, Math.max(1, Math.floor(value)));
|
|
29048
|
+
};
|
|
29049
|
+
var normalizeMaxBackfills = (value) => {
|
|
29050
|
+
if (value === undefined || !Number.isFinite(value)) {
|
|
29051
|
+
return;
|
|
29052
|
+
}
|
|
29053
|
+
return Math.max(0, Math.floor(value));
|
|
29054
|
+
};
|
|
28996
29055
|
var toQualifiedTableName = (schemaName, tableName) => `${schemaName}.${tableName}`;
|
|
28997
29056
|
var toVectorLiteral = (vector) => `[${vector.join(",")}]`;
|
|
28998
29057
|
var parseMetadata = (value) => {
|
|
@@ -29080,6 +29139,8 @@ var updatePostgresLastQueryPlan = (input) => {
|
|
|
29080
29139
|
finalSearchK: input.finalSearchK,
|
|
29081
29140
|
initialSearchK: input.initialSearchK,
|
|
29082
29141
|
searchExpansionRatio: typeof input.initialSearchK === "number" && typeof input.finalSearchK === "number" && input.initialSearchK > 0 ? input.finalSearchK / input.initialSearchK : undefined,
|
|
29142
|
+
candidateLimitUsed: input.candidateLimitUsed,
|
|
29143
|
+
maxBackfillsUsed: input.maxBackfillsUsed,
|
|
29083
29144
|
jsRemainderClauseCount: pushdown.jsRemainderClauseCount,
|
|
29084
29145
|
queryMultiplierUsed: input.queryMultiplierUsed,
|
|
29085
29146
|
jsRemainderRatio: pushdown.jsRemainderRatio,
|
|
@@ -29090,6 +29151,7 @@ var updatePostgresLastQueryPlan = (input) => {
|
|
|
29090
29151
|
queryMode: "native_pgvector",
|
|
29091
29152
|
candidateYieldRatio: typeof input.returnedCount === "number" && typeof input.finalSearchK === "number" && input.finalSearchK > 0 ? input.returnedCount / input.finalSearchK : undefined,
|
|
29092
29153
|
returnedCount: input.returnedCount,
|
|
29154
|
+
backfillLimitReached: input.backfillLimitReached,
|
|
29093
29155
|
topKFillRatio: typeof input.returnedCount === "number" && input.topK > 0 ? input.returnedCount / input.topK : undefined,
|
|
29094
29156
|
totalFilterClauseCount: pushdown.totalFilterClauseCount,
|
|
29095
29157
|
underfilledTopK: input.underfilledTopK
|
|
@@ -29172,6 +29234,8 @@ var createPostgresRAGStore = (options = {}) => {
|
|
|
29172
29234
|
await init();
|
|
29173
29235
|
const queryVector = normalizeVector(input.queryVector);
|
|
29174
29236
|
const queryMultiplier2 = normalizeQueryMultiplier(input.queryMultiplier ?? options.queryMultiplier);
|
|
29237
|
+
const candidateLimit = normalizeCandidateLimit(input.candidateLimit);
|
|
29238
|
+
const maxBackfills = normalizeMaxBackfills(input.maxBackfills);
|
|
29175
29239
|
const queryVectorLiteral = toVectorLiteral(queryVector);
|
|
29176
29240
|
const pushdownFilter = buildPostgresPushdownFilter(input.filter);
|
|
29177
29241
|
const countFilterPlan = buildPostgresFilterPlan(pushdownFilter);
|
|
@@ -29189,7 +29253,7 @@ var createPostgresRAGStore = (options = {}) => {
|
|
|
29189
29253
|
const hasPushdownFilter = Boolean(pushdownFilter);
|
|
29190
29254
|
const plannedFilteredCandidateCount = hasPushdownFilter && totalRows === 0 ? undefined : totalRows;
|
|
29191
29255
|
const initialSearchK = planNativeCandidateSearchK({
|
|
29192
|
-
candidateLimit
|
|
29256
|
+
candidateLimit,
|
|
29193
29257
|
filteredCandidateCount: plannedFilteredCandidateCount,
|
|
29194
29258
|
queryMultiplier: queryMultiplier2,
|
|
29195
29259
|
topK: input.topK
|
|
@@ -29200,6 +29264,7 @@ var createPostgresRAGStore = (options = {}) => {
|
|
|
29200
29264
|
let currentSearchK = initialSearchK;
|
|
29201
29265
|
let backfillCount = 0;
|
|
29202
29266
|
let candidateBudgetExhausted = false;
|
|
29267
|
+
let backfillLimitReached = false;
|
|
29203
29268
|
let effectiveFilteredCandidateCount = plannedFilteredCandidateCount;
|
|
29204
29269
|
let mapped = [];
|
|
29205
29270
|
for (;; ) {
|
|
@@ -29233,11 +29298,14 @@ var createPostgresRAGStore = (options = {}) => {
|
|
|
29233
29298
|
break;
|
|
29234
29299
|
}
|
|
29235
29300
|
const nextSearchK = planNativeCandidateSearchBackfillK({
|
|
29236
|
-
|
|
29301
|
+
backfillCount,
|
|
29302
|
+
candidateLimit,
|
|
29237
29303
|
currentSearchK,
|
|
29238
|
-
filteredCandidateCount: effectiveFilteredCandidateCount
|
|
29304
|
+
filteredCandidateCount: effectiveFilteredCandidateCount,
|
|
29305
|
+
maxBackfills
|
|
29239
29306
|
});
|
|
29240
29307
|
if (nextSearchK <= currentSearchK) {
|
|
29308
|
+
backfillLimitReached = typeof maxBackfills === "number" && backfillCount >= maxBackfills && mapped.length < input.topK;
|
|
29241
29309
|
candidateBudgetExhausted = mapped.length < input.topK;
|
|
29242
29310
|
break;
|
|
29243
29311
|
}
|
|
@@ -29248,7 +29316,10 @@ var createPostgresRAGStore = (options = {}) => {
|
|
|
29248
29316
|
const returned = mapped.slice(0, input.topK);
|
|
29249
29317
|
updatePostgresLastQueryPlan({
|
|
29250
29318
|
backfillCount,
|
|
29319
|
+
backfillLimitReached,
|
|
29251
29320
|
candidateBudgetExhausted,
|
|
29321
|
+
candidateLimitUsed: candidateLimit,
|
|
29322
|
+
maxBackfillsUsed: maxBackfills,
|
|
29252
29323
|
filter: input.filter,
|
|
29253
29324
|
pushdownFilter,
|
|
29254
29325
|
queryMultiplierUsed: queryMultiplier2,
|
|
@@ -29463,6 +29534,18 @@ var normalizeQueryMultiplier2 = (value) => {
|
|
|
29463
29534
|
const minMultiplier = Math.max(1, Math.floor(value));
|
|
29464
29535
|
return Math.min(minMultiplier, MAX_QUERY_MULTIPLIER2);
|
|
29465
29536
|
};
|
|
29537
|
+
var normalizeCandidateLimit2 = (value) => {
|
|
29538
|
+
if (value === undefined || !Number.isFinite(value)) {
|
|
29539
|
+
return RAG_NATIVE_QUERY_CANDIDATE_LIMIT;
|
|
29540
|
+
}
|
|
29541
|
+
return Math.min(RAG_NATIVE_QUERY_CANDIDATE_LIMIT, Math.max(1, Math.floor(value)));
|
|
29542
|
+
};
|
|
29543
|
+
var normalizeMaxBackfills2 = (value) => {
|
|
29544
|
+
if (value === undefined || !Number.isFinite(value)) {
|
|
29545
|
+
return;
|
|
29546
|
+
}
|
|
29547
|
+
return Math.max(0, Math.floor(value));
|
|
29548
|
+
};
|
|
29466
29549
|
var toJSONString = (metadata) => metadata === undefined ? null : JSON.stringify(metadata);
|
|
29467
29550
|
var parseMetadata2 = (value) => {
|
|
29468
29551
|
if (value === null) {
|
|
@@ -30040,6 +30123,8 @@ var updateSQLiteLastQueryPlan = (input) => {
|
|
|
30040
30123
|
initialSearchK: input.initialSearchK,
|
|
30041
30124
|
searchExpansionRatio: typeof input.initialSearchK === "number" && typeof input.finalSearchK === "number" && input.initialSearchK > 0 ? input.finalSearchK / input.initialSearchK : undefined,
|
|
30042
30125
|
jsRemainderClauseCount: pushdown.jsRemainderClauseCount,
|
|
30126
|
+
candidateLimitUsed: input.candidateLimitUsed,
|
|
30127
|
+
maxBackfillsUsed: input.maxBackfillsUsed,
|
|
30043
30128
|
queryMultiplierUsed: input.queryMultiplierUsed,
|
|
30044
30129
|
jsRemainderRatio: pushdown.jsRemainderRatio,
|
|
30045
30130
|
pushdownApplied: pushdown.pushdownClauseCount > 0,
|
|
@@ -30049,6 +30134,7 @@ var updateSQLiteLastQueryPlan = (input) => {
|
|
|
30049
30134
|
queryMode: input.queryMode,
|
|
30050
30135
|
candidateYieldRatio: typeof input.returnedCount === "number" && typeof input.finalSearchK === "number" && input.finalSearchK > 0 ? input.returnedCount / input.finalSearchK : undefined,
|
|
30051
30136
|
returnedCount: input.returnedCount,
|
|
30137
|
+
backfillLimitReached: input.backfillLimitReached,
|
|
30052
30138
|
topKFillRatio: typeof input.returnedCount === "number" && input.topK > 0 ? input.returnedCount / input.topK : undefined,
|
|
30053
30139
|
totalFilterClauseCount: pushdown.totalFilterClauseCount,
|
|
30054
30140
|
underfilledTopK: input.underfilledTopK
|
|
@@ -30206,6 +30292,8 @@ var createSQLiteRAGStore = (options = {}) => {
|
|
|
30206
30292
|
throw new Error("Native vector backend is not available");
|
|
30207
30293
|
}
|
|
30208
30294
|
const queryMultiplier = normalizeQueryMultiplier2(input.queryMultiplier ?? nativeConfig?.queryMultiplier);
|
|
30295
|
+
const candidateLimit = normalizeCandidateLimit2(input.candidateLimit);
|
|
30296
|
+
const maxBackfills = normalizeMaxBackfills2(input.maxBackfills);
|
|
30209
30297
|
const queryVector = normalizeVector(input.queryVector);
|
|
30210
30298
|
const queryVectorText = toVectorText(queryVector);
|
|
30211
30299
|
const pushdownFilter = buildSQLitePushdownFilter(input.filter);
|
|
@@ -30217,7 +30305,7 @@ var createSQLiteRAGStore = (options = {}) => {
|
|
|
30217
30305
|
});
|
|
30218
30306
|
const filteredCandidateCount = getFilteredSQLiteCandidateCount(db, tableName, filterPlan);
|
|
30219
30307
|
const searchK = planNativeCandidateSearchK({
|
|
30220
|
-
candidateLimit
|
|
30308
|
+
candidateLimit,
|
|
30221
30309
|
filteredCandidateCount,
|
|
30222
30310
|
queryMultiplier,
|
|
30223
30311
|
topK: input.topK
|
|
@@ -30229,6 +30317,7 @@ var createSQLiteRAGStore = (options = {}) => {
|
|
|
30229
30317
|
let currentSearchK = searchK;
|
|
30230
30318
|
let backfillCount = 0;
|
|
30231
30319
|
let candidateBudgetExhausted = false;
|
|
30320
|
+
let backfillLimitReached = false;
|
|
30232
30321
|
let mapped = [];
|
|
30233
30322
|
for (;; ) {
|
|
30234
30323
|
const rawRows = runNativeQuery(currentSearchK);
|
|
@@ -30258,11 +30347,14 @@ var createSQLiteRAGStore = (options = {}) => {
|
|
|
30258
30347
|
break;
|
|
30259
30348
|
}
|
|
30260
30349
|
const nextSearchK = planNativeCandidateSearchBackfillK({
|
|
30261
|
-
|
|
30350
|
+
backfillCount,
|
|
30351
|
+
candidateLimit,
|
|
30262
30352
|
currentSearchK,
|
|
30263
|
-
filteredCandidateCount
|
|
30353
|
+
filteredCandidateCount,
|
|
30354
|
+
maxBackfills
|
|
30264
30355
|
});
|
|
30265
30356
|
if (nextSearchK <= currentSearchK) {
|
|
30357
|
+
backfillLimitReached = typeof maxBackfills === "number" && backfillCount >= maxBackfills && mapped.length < input.topK;
|
|
30266
30358
|
candidateBudgetExhausted = mapped.length < input.topK;
|
|
30267
30359
|
break;
|
|
30268
30360
|
}
|
|
@@ -30271,6 +30363,7 @@ var createSQLiteRAGStore = (options = {}) => {
|
|
|
30271
30363
|
}
|
|
30272
30364
|
updateSQLiteLastQueryPlan({
|
|
30273
30365
|
backfillCount,
|
|
30366
|
+
backfillLimitReached,
|
|
30274
30367
|
candidateBudgetExhausted,
|
|
30275
30368
|
filter: input.filter,
|
|
30276
30369
|
filteredCandidateCount,
|
|
@@ -30278,6 +30371,8 @@ var createSQLiteRAGStore = (options = {}) => {
|
|
|
30278
30371
|
initialSearchK: searchK,
|
|
30279
30372
|
nativeDiagnostics,
|
|
30280
30373
|
pushdownFilter,
|
|
30374
|
+
candidateLimitUsed: candidateLimit,
|
|
30375
|
+
maxBackfillsUsed: maxBackfills,
|
|
30281
30376
|
queryMultiplierUsed: queryMultiplier,
|
|
30282
30377
|
queryMode: "native_vec0",
|
|
30283
30378
|
returnedCount: Math.min(mapped.length, input.topK),
|
|
@@ -32448,5 +32543,5 @@ export {
|
|
|
32448
32543
|
addRAGEvaluationSuiteCase
|
|
32449
32544
|
};
|
|
32450
32545
|
|
|
32451
|
-
//# debugId=
|
|
32546
|
+
//# debugId=78B8CFF451FC7B6D64756E2164756E21
|
|
32452
32547
|
//# sourceMappingURL=index.js.map
|