@absolutejs/absolute 0.19.0-beta.631 → 0.19.0-beta.633
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 +22 -3
- package/dist/ai/client/index.js.map +4 -4
- package/dist/ai/client/ui.js +22 -3
- package/dist/ai/client/ui.js.map +4 -4
- package/dist/ai/index.js +54 -8
- package/dist/ai/index.js.map +8 -8
- package/dist/ai/rag/quality.js +22 -3
- package/dist/ai/rag/quality.js.map +4 -4
- package/dist/ai/rag/ui.js +22 -3
- package/dist/ai/rag/ui.js.map +4 -4
- package/dist/angular/ai/index.js +22 -3
- package/dist/angular/ai/index.js.map +4 -4
- package/dist/react/ai/index.js +22 -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 +20 -0
- package/dist/src/vue/ai/useRAGEvaluate.d.ts +12 -0
- package/dist/src/vue/ai/useRAGIndexAdmin.d.ts +4 -0
- package/dist/src/vue/ai/useRAGSearch.d.ts +2 -0
- package/dist/svelte/ai/index.js +22 -3
- package/dist/svelte/ai/index.js.map +4 -4
- package/dist/types/ai.d.ts +10 -0
- package/dist/vue/ai/index.js +22 -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 === "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 === "postgresQueryJsRemainderClauseCount" ? "Postgres JS remainder clauses" : key === "postgresQueryMultiplierUsed" ? "Postgres query multiplier" : key === "postgresQueryCandidateLimitUsed" ? "Postgres candidate limit" : key === "sqliteQueryJsRemainderRatio" ? "SQLite JS remainder share" : key === "postgresQueryJsRemainderRatio" ? "Postgres JS remainder share" : key === "sqliteQueryFilteredCandidates" ? "SQLite filtered candidates" : key === "postgresQueryFilteredCandidates" ? "Postgres filtered candidates" : key === "sqliteQueryInitialSearchK" ? "SQLite initial searchK" : key === "postgresQueryInitialSearchK" ? "Postgres initial searchK" : key === "sqliteQueryFinalSearchK" ? "SQLite final searchK" : key === "postgresQueryFinalSearchK" ? "Postgres final searchK" : key === "sqliteQuerySearchExpansionRatio" ? "SQLite search expansion" : key === "postgresQuerySearchExpansionRatio" ? "Postgres search expansion" : key === "sqliteQueryBackfillCount" ? "SQLite backfill count" : key === "postgresQueryBackfillCount" ? "Postgres backfill count" : key === "sqliteQueryReturnedCount" ? "SQLite returned hits" : key === "postgresQueryReturnedCount" ? "Postgres returned hits" : key === "sqliteQueryCandidateYieldRatio" ? "SQLite candidate yield" : key === "postgresQueryCandidateYieldRatio" ? "Postgres candidate yield" : key === "sqliteQueryTopKFillRatio" ? "SQLite topK fill rate" : key === "postgresQueryTopKFillRatio" ? "Postgres topK fill rate" : key === "sqliteQueryUnderfilledTopK" ? "SQLite underfilled topK" : key === "postgresQueryUnderfilledTopK" ? "Postgres underfilled topK" : key === "sqliteQueryCandidateBudgetExhausted" ? "SQLite candidate budget exhausted" : key === "postgresQueryCandidateBudgetExhausted" ? "Postgres candidate budget exhausted" : key === "sqliteQueryCandidateCoverage" ? "SQLite candidate coverage" : key === "postgresQueryCandidateCoverage" ? "Postgres candidate coverage" : key === "leadSpeakerCue" ? "Lead speaker cue" : key === "leadSpeakerAttributionCue" ? "Lead speaker attribution" : key === "leadChannelAttributionCue" ? "Lead channel attribution" : key === "leadChannelCue" ? "Lead channel cue" : key === "leadContinuityCue" ? "Lead continuity cue" : key,
|
|
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) => {
|
|
@@ -2521,6 +2521,8 @@ var formatSQLitePlannerCueSummary = (input) => {
|
|
|
2521
2521
|
typeof input?.sqliteQueryPushdownClauseCount === "number" ? `clauses ${input.sqliteQueryPushdownClauseCount}` : undefined,
|
|
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
|
+
typeof input?.sqliteQueryMultiplierUsed === "number" ? `x${input.sqliteQueryMultiplierUsed}` : undefined,
|
|
2525
|
+
typeof input?.sqliteQueryCandidateLimitUsed === "number" ? `cap ${input.sqliteQueryCandidateLimitUsed}` : undefined,
|
|
2524
2526
|
typeof input?.sqliteQueryJsRemainderRatio === "number" ? `js ${(input.sqliteQueryJsRemainderRatio * 100).toFixed(0)}%` : undefined,
|
|
2525
2527
|
typeof input?.sqliteQueryTotalFilterClauseCount === "number" ? `total clauses ${input.sqliteQueryTotalFilterClauseCount}` : undefined,
|
|
2526
2528
|
typeof input?.sqliteQueryFilteredCandidates === "number" ? `filtered ${input.sqliteQueryFilteredCandidates}` : undefined,
|
|
@@ -2547,6 +2549,7 @@ var formatPostgresPlannerCueSummary = (input) => {
|
|
|
2547
2549
|
typeof input?.postgresQueryPushdownCoverageRatio === "number" ? `pushdown ${(input.postgresQueryPushdownCoverageRatio * 100).toFixed(0)}%` : undefined,
|
|
2548
2550
|
typeof input?.postgresQueryJsRemainderClauseCount === "number" ? `js remainder ${input.postgresQueryJsRemainderClauseCount}` : undefined,
|
|
2549
2551
|
typeof input?.postgresQueryMultiplierUsed === "number" ? `x${input.postgresQueryMultiplierUsed}` : undefined,
|
|
2552
|
+
typeof input?.postgresQueryCandidateLimitUsed === "number" ? `cap ${input.postgresQueryCandidateLimitUsed}` : undefined,
|
|
2550
2553
|
typeof input?.postgresQueryJsRemainderRatio === "number" ? `js ${(input.postgresQueryJsRemainderRatio * 100).toFixed(0)}%` : undefined,
|
|
2551
2554
|
typeof input?.postgresQueryTotalFilterClauseCount === "number" ? `total clauses ${input.postgresQueryTotalFilterClauseCount}` : undefined,
|
|
2552
2555
|
typeof input?.postgresQueryFilteredCandidates === "number" ? `filtered ${input.postgresQueryFilteredCandidates}` : undefined,
|
|
@@ -2573,6 +2576,7 @@ var formatComparisonSQLitePlannerCueSummary = (entry) => {
|
|
|
2573
2576
|
sqliteQueryInitialSearchK: snapshot.sqliteQueryInitialSearchK,
|
|
2574
2577
|
sqliteQuerySearchExpansionRatio: snapshot.sqliteQuerySearchExpansionRatio,
|
|
2575
2578
|
sqliteQueryJsRemainderClauseCount: snapshot.sqliteQueryJsRemainderClauseCount,
|
|
2579
|
+
sqliteQueryCandidateLimitUsed: snapshot.sqliteQueryCandidateLimitUsed,
|
|
2576
2580
|
sqliteQueryMode: snapshot.sqliteQueryMode,
|
|
2577
2581
|
sqliteQueryPushdownApplied: snapshot.sqliteQueryPushdownApplied,
|
|
2578
2582
|
sqliteQueryPushdownClauseCount: snapshot.sqliteQueryPushdownClauseCount,
|
|
@@ -2597,6 +2601,7 @@ var formatComparisonPostgresPlannerCueSummary = (entry) => {
|
|
|
2597
2601
|
postgresQueryInitialSearchK: snapshot.postgresQueryInitialSearchK,
|
|
2598
2602
|
postgresQuerySearchExpansionRatio: snapshot.postgresQuerySearchExpansionRatio,
|
|
2599
2603
|
postgresQueryJsRemainderClauseCount: snapshot.postgresQueryJsRemainderClauseCount,
|
|
2604
|
+
postgresQueryCandidateLimitUsed: snapshot.postgresQueryCandidateLimitUsed,
|
|
2600
2605
|
postgresQueryMultiplierUsed: snapshot.postgresQueryMultiplierUsed,
|
|
2601
2606
|
postgresQueryMode: snapshot.postgresQueryMode,
|
|
2602
2607
|
postgresQueryPushdownApplied: snapshot.postgresQueryPushdownApplied,
|
|
@@ -2762,6 +2767,7 @@ var formatHistorySQLitePlannerShift = (history) => {
|
|
|
2762
2767
|
sqliteQueryInitialSearchK: entry.previousSqliteQueryInitialSearchK,
|
|
2763
2768
|
sqliteQuerySearchExpansionRatio: entry.previousSqliteQuerySearchExpansionRatio,
|
|
2764
2769
|
sqliteQueryJsRemainderClauseCount: entry.previousSqliteQueryJsRemainderClauseCount,
|
|
2770
|
+
sqliteQueryCandidateLimitUsed: entry.previousSqliteQueryCandidateLimitUsed,
|
|
2765
2771
|
sqliteQueryMode: entry.previousSqliteQueryMode,
|
|
2766
2772
|
sqliteQueryPushdownApplied: entry.previousSqliteQueryPushdownApplied,
|
|
2767
2773
|
sqliteQueryPushdownClauseCount: entry.previousSqliteQueryPushdownClauseCount,
|
|
@@ -2796,6 +2802,7 @@ var formatHistoryPostgresPlannerShift = (history) => {
|
|
|
2796
2802
|
postgresQueryInitialSearchK: entry.previousPostgresQueryInitialSearchK,
|
|
2797
2803
|
postgresQuerySearchExpansionRatio: entry.previousPostgresQuerySearchExpansionRatio,
|
|
2798
2804
|
postgresQueryJsRemainderClauseCount: entry.previousPostgresQueryJsRemainderClauseCount,
|
|
2805
|
+
postgresQueryCandidateLimitUsed: entry.previousPostgresQueryCandidateLimitUsed,
|
|
2799
2806
|
postgresQueryMultiplierUsed: entry.previousPostgresQueryMultiplierUsed,
|
|
2800
2807
|
postgresQueryMode: entry.previousPostgresQueryMode,
|
|
2801
2808
|
postgresQueryPushdownApplied: entry.previousPostgresQueryPushdownApplied,
|
|
@@ -3859,6 +3866,8 @@ var buildEvaluationSQLiteQueryPlanSnapshot = (trace) => {
|
|
|
3859
3866
|
sqliteQueryPushdownClauseCount: typeof metadata.sqliteQueryPushdownClauseCount === "number" ? metadata.sqliteQueryPushdownClauseCount : undefined,
|
|
3860
3867
|
sqliteQueryTotalFilterClauseCount: typeof metadata.sqliteQueryTotalFilterClauseCount === "number" ? metadata.sqliteQueryTotalFilterClauseCount : undefined,
|
|
3861
3868
|
sqliteQueryJsRemainderClauseCount: typeof metadata.sqliteQueryJsRemainderClauseCount === "number" ? metadata.sqliteQueryJsRemainderClauseCount : undefined,
|
|
3869
|
+
sqliteQueryMultiplierUsed: typeof metadata.sqliteQueryMultiplierUsed === "number" ? metadata.sqliteQueryMultiplierUsed : undefined,
|
|
3870
|
+
sqliteQueryCandidateLimitUsed: typeof metadata.sqliteQueryCandidateLimitUsed === "number" ? metadata.sqliteQueryCandidateLimitUsed : undefined,
|
|
3862
3871
|
sqliteQueryPushdownCoverageRatio: typeof metadata.sqliteQueryPushdownCoverageRatio === "number" ? metadata.sqliteQueryPushdownCoverageRatio : undefined,
|
|
3863
3872
|
sqliteQueryJsRemainderRatio: typeof metadata.sqliteQueryJsRemainderRatio === "number" ? metadata.sqliteQueryJsRemainderRatio : undefined,
|
|
3864
3873
|
sqliteQueryReturnedCount: typeof metadata.sqliteQueryReturnedCount === "number" ? metadata.sqliteQueryReturnedCount : undefined,
|
|
@@ -3885,6 +3894,7 @@ var buildEvaluationPostgresQueryPlanSnapshot = (trace) => {
|
|
|
3885
3894
|
postgresQueryTotalFilterClauseCount: typeof metadata.postgresQueryTotalFilterClauseCount === "number" ? metadata.postgresQueryTotalFilterClauseCount : undefined,
|
|
3886
3895
|
postgresQueryJsRemainderClauseCount: typeof metadata.postgresQueryJsRemainderClauseCount === "number" ? metadata.postgresQueryJsRemainderClauseCount : undefined,
|
|
3887
3896
|
postgresQueryMultiplierUsed: typeof metadata.postgresQueryMultiplierUsed === "number" ? metadata.postgresQueryMultiplierUsed : undefined,
|
|
3897
|
+
postgresQueryCandidateLimitUsed: typeof metadata.postgresQueryCandidateLimitUsed === "number" ? metadata.postgresQueryCandidateLimitUsed : undefined,
|
|
3888
3898
|
postgresQueryPushdownCoverageRatio: typeof metadata.postgresQueryPushdownCoverageRatio === "number" ? metadata.postgresQueryPushdownCoverageRatio : undefined,
|
|
3889
3899
|
postgresQueryJsRemainderRatio: typeof metadata.postgresQueryJsRemainderRatio === "number" ? metadata.postgresQueryJsRemainderRatio : undefined,
|
|
3890
3900
|
postgresQueryReturnedCount: typeof metadata.postgresQueryReturnedCount === "number" ? metadata.postgresQueryReturnedCount : undefined,
|
|
@@ -5139,6 +5149,8 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5139
5149
|
const sqliteQueryPushdownClauseCount = currentSQLiteQueryPlanSnapshot.sqliteQueryPushdownClauseCount ?? currentSnapshot?.sqliteQueryPushdownClauseCount;
|
|
5140
5150
|
const sqliteQueryTotalFilterClauseCount = currentSQLiteQueryPlanSnapshot.sqliteQueryTotalFilterClauseCount ?? currentSnapshot?.sqliteQueryTotalFilterClauseCount;
|
|
5141
5151
|
const sqliteQueryJsRemainderClauseCount = currentSQLiteQueryPlanSnapshot.sqliteQueryJsRemainderClauseCount ?? currentSnapshot?.sqliteQueryJsRemainderClauseCount;
|
|
5152
|
+
const sqliteQueryMultiplierUsed = currentSQLiteQueryPlanSnapshot.sqliteQueryMultiplierUsed ?? currentSnapshot?.sqliteQueryMultiplierUsed;
|
|
5153
|
+
const sqliteQueryCandidateLimitUsed = currentSQLiteQueryPlanSnapshot.sqliteQueryCandidateLimitUsed ?? currentSnapshot?.sqliteQueryCandidateLimitUsed;
|
|
5142
5154
|
const sqliteQueryPushdownCoverageRatio = currentSQLiteQueryPlanSnapshot.sqliteQueryPushdownCoverageRatio ?? currentSnapshot?.sqliteQueryPushdownCoverageRatio;
|
|
5143
5155
|
const sqliteQueryJsRemainderRatio = currentSQLiteQueryPlanSnapshot.sqliteQueryJsRemainderRatio ?? currentSnapshot?.sqliteQueryJsRemainderRatio;
|
|
5144
5156
|
const sqliteQueryFilteredCandidates = currentSQLiteQueryPlanSnapshot.sqliteQueryFilteredCandidates ?? currentSnapshot?.sqliteQueryFilteredCandidates;
|
|
@@ -5159,6 +5171,7 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5159
5171
|
const postgresQueryTotalFilterClauseCount = currentPostgresQueryPlanSnapshot.postgresQueryTotalFilterClauseCount ?? currentSnapshot?.postgresQueryTotalFilterClauseCount;
|
|
5160
5172
|
const postgresQueryJsRemainderClauseCount = currentPostgresQueryPlanSnapshot.postgresQueryJsRemainderClauseCount ?? currentSnapshot?.postgresQueryJsRemainderClauseCount;
|
|
5161
5173
|
const postgresQueryMultiplierUsed = currentPostgresQueryPlanSnapshot.postgresQueryMultiplierUsed ?? currentSnapshot?.postgresQueryMultiplierUsed;
|
|
5174
|
+
const postgresQueryCandidateLimitUsed = currentPostgresQueryPlanSnapshot.postgresQueryCandidateLimitUsed ?? currentSnapshot?.postgresQueryCandidateLimitUsed;
|
|
5162
5175
|
const postgresQueryPushdownCoverageRatio = currentPostgresQueryPlanSnapshot.postgresQueryPushdownCoverageRatio ?? currentSnapshot?.postgresQueryPushdownCoverageRatio;
|
|
5163
5176
|
const postgresQueryJsRemainderRatio = currentPostgresQueryPlanSnapshot.postgresQueryJsRemainderRatio ?? currentSnapshot?.postgresQueryJsRemainderRatio;
|
|
5164
5177
|
const postgresQueryFilteredCandidates = currentPostgresQueryPlanSnapshot.postgresQueryFilteredCandidates ?? currentSnapshot?.postgresQueryFilteredCandidates;
|
|
@@ -5176,7 +5189,7 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5176
5189
|
const previousFilterSignature = JSON.stringify(previousTrace?.inputFilter ?? undefined);
|
|
5177
5190
|
const currentRetrievalSignature = JSON.stringify(retrieval ?? undefined);
|
|
5178
5191
|
const previousRetrievalSignature = JSON.stringify(previousTrace?.inputRetrieval ?? undefined);
|
|
5179
|
-
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.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";
|
|
5192
|
+
const traceChange = !previousTrace ? currentTrace ? "new" : "unchanged" : previousTrace.traceMode !== currentTrace?.mode || previousFilterSignature !== currentFilterSignature || previousRetrievalSignature !== currentRetrievalSignature || previousTrace.sourceBalanceStrategy !== currentTrace?.sourceBalanceStrategy || previousTrace.transformedQuery !== (currentTrace?.transformedQuery || undefined) || previousTrace.variantQueries.join("|") !== (currentTrace?.variantQueries ?? []).join("|") || previousTrace.finalCount !== (currentTrace?.resultCounts.final ?? 0) || previousTrace.vectorCount !== (currentTrace?.resultCounts.vector ?? 0) || previousTrace.lexicalCount !== (currentTrace?.resultCounts.lexical ?? 0) || previousTrace.candidateTopK !== (currentTrace?.candidateTopK ?? 0) || previousTrace.lexicalTopK !== (currentTrace?.lexicalTopK ?? 0) || previousTrace.topContextLabel !== topContextLabel || previousTrace.topLocatorLabel !== topLocatorLabel || previousTrace.sourceAwareChunkReasonLabel !== sourceAwareChunkReasonLabel || previousTrace.sourceAwareUnitScopeLabel !== sourceAwareUnitScopeLabel || previousTrace.leadSpeakerCue !== leadSpeakerCue || previousTrace.leadSpeakerAttributionCue !== leadSpeakerAttributionCue || previousTrace.leadChannelCue !== leadChannelCue || previousTrace.leadChannelAttributionCue !== leadChannelAttributionCue || previousTrace.leadContinuityCue !== leadContinuityCue || previousTrace.sqliteQueryMode !== sqliteQueryMode || previousTrace.sqliteQueryPushdownMode !== sqliteQueryPushdownMode || previousTrace.sqliteQueryPushdownApplied !== sqliteQueryPushdownApplied || previousTrace.sqliteQueryPushdownClauseCount !== sqliteQueryPushdownClauseCount || previousTrace.sqliteQueryTotalFilterClauseCount !== sqliteQueryTotalFilterClauseCount || previousTrace.sqliteQueryJsRemainderClauseCount !== sqliteQueryJsRemainderClauseCount || previousTrace.sqliteQueryMultiplierUsed !== sqliteQueryMultiplierUsed || previousTrace.sqliteQueryCandidateLimitUsed !== sqliteQueryCandidateLimitUsed || previousTrace.sqliteQueryPushdownCoverageRatio !== sqliteQueryPushdownCoverageRatio || previousTrace.sqliteQueryJsRemainderRatio !== sqliteQueryJsRemainderRatio || previousTrace.sqliteQueryFilteredCandidates !== sqliteQueryFilteredCandidates || previousTrace.sqliteQueryInitialSearchK !== sqliteQueryInitialSearchK || previousTrace.sqliteQueryFinalSearchK !== sqliteQueryFinalSearchK || previousTrace.sqliteQuerySearchExpansionRatio !== sqliteQuerySearchExpansionRatio || previousTrace.sqliteQueryBackfillCount !== sqliteQueryBackfillCount || previousTrace.sqliteQueryReturnedCount !== sqliteQueryReturnedCount || previousTrace.sqliteQueryCandidateYieldRatio !== sqliteQueryCandidateYieldRatio || previousTrace.sqliteQueryTopKFillRatio !== sqliteQueryTopKFillRatio || previousTrace.sqliteQueryUnderfilledTopK !== sqliteQueryUnderfilledTopK || previousTrace.sqliteQueryCandidateBudgetExhausted !== sqliteQueryCandidateBudgetExhausted || previousTrace.sqliteQueryCandidateCoverage !== sqliteQueryCandidateCoverage || previousTrace.postgresQueryMode !== postgresQueryMode || previousTrace.postgresQueryPushdownMode !== postgresQueryPushdownMode || previousTrace.postgresQueryPushdownApplied !== postgresQueryPushdownApplied || previousTrace.postgresQueryPushdownClauseCount !== postgresQueryPushdownClauseCount || previousTrace.postgresQueryTotalFilterClauseCount !== postgresQueryTotalFilterClauseCount || previousTrace.postgresQueryJsRemainderClauseCount !== postgresQueryJsRemainderClauseCount || previousTrace.postgresQueryMultiplierUsed !== postgresQueryMultiplierUsed || previousTrace.postgresQueryCandidateLimitUsed !== postgresQueryCandidateLimitUsed || previousTrace.postgresQueryPushdownCoverageRatio !== postgresQueryPushdownCoverageRatio || previousTrace.postgresQueryJsRemainderRatio !== postgresQueryJsRemainderRatio || previousTrace.postgresQueryFilteredCandidates !== postgresQueryFilteredCandidates || previousTrace.postgresQueryInitialSearchK !== postgresQueryInitialSearchK || previousTrace.postgresQueryFinalSearchK !== postgresQueryFinalSearchK || previousTrace.postgresQuerySearchExpansionRatio !== postgresQuerySearchExpansionRatio || previousTrace.postgresQueryBackfillCount !== postgresQueryBackfillCount || previousTrace.postgresQueryReturnedCount !== postgresQueryReturnedCount || previousTrace.postgresQueryCandidateYieldRatio !== postgresQueryCandidateYieldRatio || previousTrace.postgresQueryTopKFillRatio !== postgresQueryTopKFillRatio || previousTrace.postgresQueryUnderfilledTopK !== postgresQueryUnderfilledTopK || previousTrace.postgresQueryCandidateBudgetExhausted !== postgresQueryCandidateBudgetExhausted || previousTrace.postgresQueryCandidateCoverage !== postgresQueryCandidateCoverage || !areStageCountsEqual(previousStageCounts, stageCounts) ? "changed" : "unchanged";
|
|
5180
5193
|
return {
|
|
5181
5194
|
candidateTopK: currentTrace?.candidateTopK ?? 0,
|
|
5182
5195
|
caseId: caseResult.caseId,
|
|
@@ -5211,6 +5224,8 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5211
5224
|
previousSqliteQueryPushdownClauseCount: previousTrace?.sqliteQueryPushdownClauseCount,
|
|
5212
5225
|
previousSqliteQueryTotalFilterClauseCount: previousTrace?.sqliteQueryTotalFilterClauseCount,
|
|
5213
5226
|
previousSqliteQueryJsRemainderClauseCount: previousTrace?.sqliteQueryJsRemainderClauseCount,
|
|
5227
|
+
previousSqliteQueryMultiplierUsed: previousTrace?.sqliteQueryMultiplierUsed,
|
|
5228
|
+
previousSqliteQueryCandidateLimitUsed: previousTrace?.sqliteQueryCandidateLimitUsed,
|
|
5214
5229
|
previousSqliteQueryPushdownCoverageRatio: previousTrace?.sqliteQueryPushdownCoverageRatio,
|
|
5215
5230
|
previousSqliteQueryJsRemainderRatio: previousTrace?.sqliteQueryJsRemainderRatio,
|
|
5216
5231
|
previousSqliteQueryReturnedCount: previousTrace?.sqliteQueryReturnedCount,
|
|
@@ -5231,6 +5246,7 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5231
5246
|
previousPostgresQueryTotalFilterClauseCount: previousTrace?.postgresQueryTotalFilterClauseCount,
|
|
5232
5247
|
previousPostgresQueryJsRemainderClauseCount: previousTrace?.postgresQueryJsRemainderClauseCount,
|
|
5233
5248
|
previousPostgresQueryMultiplierUsed: previousTrace?.postgresQueryMultiplierUsed,
|
|
5249
|
+
previousPostgresQueryCandidateLimitUsed: previousTrace?.postgresQueryCandidateLimitUsed,
|
|
5234
5250
|
previousPostgresQueryPushdownCoverageRatio: previousTrace?.postgresQueryPushdownCoverageRatio,
|
|
5235
5251
|
previousPostgresQueryJsRemainderRatio: previousTrace?.postgresQueryJsRemainderRatio,
|
|
5236
5252
|
previousPostgresQueryReturnedCount: previousTrace?.postgresQueryReturnedCount,
|
|
@@ -5266,6 +5282,8 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5266
5282
|
sqliteQueryPushdownClauseCount,
|
|
5267
5283
|
sqliteQueryTotalFilterClauseCount,
|
|
5268
5284
|
sqliteQueryJsRemainderClauseCount,
|
|
5285
|
+
sqliteQueryMultiplierUsed,
|
|
5286
|
+
sqliteQueryCandidateLimitUsed,
|
|
5269
5287
|
sqliteQueryPushdownCoverageRatio,
|
|
5270
5288
|
sqliteQueryJsRemainderRatio,
|
|
5271
5289
|
sqliteQueryReturnedCount,
|
|
@@ -5286,6 +5304,7 @@ var buildEvaluationCaseTraceSnapshot = ({
|
|
|
5286
5304
|
postgresQueryTotalFilterClauseCount,
|
|
5287
5305
|
postgresQueryJsRemainderClauseCount,
|
|
5288
5306
|
postgresQueryMultiplierUsed,
|
|
5307
|
+
postgresQueryCandidateLimitUsed,
|
|
5289
5308
|
postgresQueryPushdownCoverageRatio,
|
|
5290
5309
|
postgresQueryJsRemainderRatio,
|
|
5291
5310
|
postgresQueryReturnedCount,
|
|
@@ -16901,6 +16920,8 @@ var buildStoreQueryPlanTraceMetadata = (store) => {
|
|
|
16901
16920
|
sqliteQueryPushdownMode: sqliteNativePlan.pushdownMode,
|
|
16902
16921
|
sqliteQueryTotalFilterClauseCount: sqliteNativePlan.totalFilterClauseCount,
|
|
16903
16922
|
sqliteQueryJsRemainderClauseCount: sqliteNativePlan.jsRemainderClauseCount,
|
|
16923
|
+
sqliteQueryMultiplierUsed: sqliteNativePlan.queryMultiplierUsed ?? null,
|
|
16924
|
+
sqliteQueryCandidateLimitUsed: sqliteNativePlan.candidateLimitUsed ?? null,
|
|
16904
16925
|
sqliteQueryJsRemainderRatio: sqliteNativePlan.jsRemainderRatio ?? null,
|
|
16905
16926
|
sqliteQueryCandidateYieldRatio: sqliteNativePlan.candidateYieldRatio ?? null,
|
|
16906
16927
|
sqliteQueryReturnedCount: sqliteNativePlan.returnedCount ?? null,
|
|
@@ -16928,6 +16949,7 @@ var buildStoreQueryPlanTraceMetadata = (store) => {
|
|
|
16928
16949
|
postgresQueryTotalFilterClauseCount: postgresNativePlan.totalFilterClauseCount,
|
|
16929
16950
|
postgresQueryJsRemainderClauseCount: postgresNativePlan.jsRemainderClauseCount,
|
|
16930
16951
|
postgresQueryMultiplierUsed: postgresNativePlan.queryMultiplierUsed ?? null,
|
|
16952
|
+
postgresQueryCandidateLimitUsed: postgresNativePlan.candidateLimitUsed ?? null,
|
|
16931
16953
|
postgresQueryJsRemainderRatio: postgresNativePlan.jsRemainderRatio ?? null,
|
|
16932
16954
|
postgresQueryCandidateYieldRatio: postgresNativePlan.candidateYieldRatio ?? null,
|
|
16933
16955
|
postgresQueryReturnedCount: postgresNativePlan.returnedCount ?? null,
|
|
@@ -17059,6 +17081,7 @@ var createRAGCollection = (options) => {
|
|
|
17059
17081
|
text: query
|
|
17060
17082
|
}, "query").then((nextQueryVector) => options.store.query({
|
|
17061
17083
|
filter: input.filter,
|
|
17084
|
+
candidateLimit: input.nativeCandidateLimit,
|
|
17062
17085
|
queryMultiplier: input.nativeQueryMultiplier,
|
|
17063
17086
|
queryVector: nextQueryVector,
|
|
17064
17087
|
topK: candidateTopK
|
|
@@ -22049,6 +22072,7 @@ var ragChat = (config) => {
|
|
|
22049
22072
|
}
|
|
22050
22073
|
const input = {
|
|
22051
22074
|
filter: getObjectProperty(body, "filter"),
|
|
22075
|
+
nativeCandidateLimit: typeof body.nativeCandidateLimit === "number" ? body.nativeCandidateLimit : undefined,
|
|
22052
22076
|
nativeQueryMultiplier: typeof body.nativeQueryMultiplier === "number" ? body.nativeQueryMultiplier : undefined,
|
|
22053
22077
|
retrieval: undefined,
|
|
22054
22078
|
model: getStringProperty(body, "model"),
|
|
@@ -28987,6 +29011,12 @@ var normalizeQueryMultiplier = (value) => {
|
|
|
28987
29011
|
}
|
|
28988
29012
|
return Math.min(MAX_QUERY_MULTIPLIER, Math.max(1, Math.floor(value)));
|
|
28989
29013
|
};
|
|
29014
|
+
var normalizeCandidateLimit = (value) => {
|
|
29015
|
+
if (value === undefined || !Number.isFinite(value)) {
|
|
29016
|
+
return RAG_NATIVE_QUERY_CANDIDATE_LIMIT;
|
|
29017
|
+
}
|
|
29018
|
+
return Math.min(RAG_NATIVE_QUERY_CANDIDATE_LIMIT, Math.max(1, Math.floor(value)));
|
|
29019
|
+
};
|
|
28990
29020
|
var toQualifiedTableName = (schemaName, tableName) => `${schemaName}.${tableName}`;
|
|
28991
29021
|
var toVectorLiteral = (vector) => `[${vector.join(",")}]`;
|
|
28992
29022
|
var parseMetadata = (value) => {
|
|
@@ -29074,6 +29104,7 @@ var updatePostgresLastQueryPlan = (input) => {
|
|
|
29074
29104
|
finalSearchK: input.finalSearchK,
|
|
29075
29105
|
initialSearchK: input.initialSearchK,
|
|
29076
29106
|
searchExpansionRatio: typeof input.initialSearchK === "number" && typeof input.finalSearchK === "number" && input.initialSearchK > 0 ? input.finalSearchK / input.initialSearchK : undefined,
|
|
29107
|
+
candidateLimitUsed: input.candidateLimitUsed,
|
|
29077
29108
|
jsRemainderClauseCount: pushdown.jsRemainderClauseCount,
|
|
29078
29109
|
queryMultiplierUsed: input.queryMultiplierUsed,
|
|
29079
29110
|
jsRemainderRatio: pushdown.jsRemainderRatio,
|
|
@@ -29166,6 +29197,7 @@ var createPostgresRAGStore = (options = {}) => {
|
|
|
29166
29197
|
await init();
|
|
29167
29198
|
const queryVector = normalizeVector(input.queryVector);
|
|
29168
29199
|
const queryMultiplier2 = normalizeQueryMultiplier(input.queryMultiplier ?? options.queryMultiplier);
|
|
29200
|
+
const candidateLimit = normalizeCandidateLimit(input.candidateLimit);
|
|
29169
29201
|
const queryVectorLiteral = toVectorLiteral(queryVector);
|
|
29170
29202
|
const pushdownFilter = buildPostgresPushdownFilter(input.filter);
|
|
29171
29203
|
const countFilterPlan = buildPostgresFilterPlan(pushdownFilter);
|
|
@@ -29183,7 +29215,7 @@ var createPostgresRAGStore = (options = {}) => {
|
|
|
29183
29215
|
const hasPushdownFilter = Boolean(pushdownFilter);
|
|
29184
29216
|
const plannedFilteredCandidateCount = hasPushdownFilter && totalRows === 0 ? undefined : totalRows;
|
|
29185
29217
|
const initialSearchK = planNativeCandidateSearchK({
|
|
29186
|
-
candidateLimit
|
|
29218
|
+
candidateLimit,
|
|
29187
29219
|
filteredCandidateCount: plannedFilteredCandidateCount,
|
|
29188
29220
|
queryMultiplier: queryMultiplier2,
|
|
29189
29221
|
topK: input.topK
|
|
@@ -29227,7 +29259,7 @@ var createPostgresRAGStore = (options = {}) => {
|
|
|
29227
29259
|
break;
|
|
29228
29260
|
}
|
|
29229
29261
|
const nextSearchK = planNativeCandidateSearchBackfillK({
|
|
29230
|
-
candidateLimit
|
|
29262
|
+
candidateLimit,
|
|
29231
29263
|
currentSearchK,
|
|
29232
29264
|
filteredCandidateCount: effectiveFilteredCandidateCount
|
|
29233
29265
|
});
|
|
@@ -29243,6 +29275,7 @@ var createPostgresRAGStore = (options = {}) => {
|
|
|
29243
29275
|
updatePostgresLastQueryPlan({
|
|
29244
29276
|
backfillCount,
|
|
29245
29277
|
candidateBudgetExhausted,
|
|
29278
|
+
candidateLimitUsed: candidateLimit,
|
|
29246
29279
|
filter: input.filter,
|
|
29247
29280
|
pushdownFilter,
|
|
29248
29281
|
queryMultiplierUsed: queryMultiplier2,
|
|
@@ -29457,6 +29490,12 @@ var normalizeQueryMultiplier2 = (value) => {
|
|
|
29457
29490
|
const minMultiplier = Math.max(1, Math.floor(value));
|
|
29458
29491
|
return Math.min(minMultiplier, MAX_QUERY_MULTIPLIER2);
|
|
29459
29492
|
};
|
|
29493
|
+
var normalizeCandidateLimit2 = (value) => {
|
|
29494
|
+
if (value === undefined || !Number.isFinite(value)) {
|
|
29495
|
+
return RAG_NATIVE_QUERY_CANDIDATE_LIMIT;
|
|
29496
|
+
}
|
|
29497
|
+
return Math.min(RAG_NATIVE_QUERY_CANDIDATE_LIMIT, Math.max(1, Math.floor(value)));
|
|
29498
|
+
};
|
|
29460
29499
|
var toJSONString = (metadata) => metadata === undefined ? null : JSON.stringify(metadata);
|
|
29461
29500
|
var parseMetadata2 = (value) => {
|
|
29462
29501
|
if (value === null) {
|
|
@@ -30034,6 +30073,8 @@ var updateSQLiteLastQueryPlan = (input) => {
|
|
|
30034
30073
|
initialSearchK: input.initialSearchK,
|
|
30035
30074
|
searchExpansionRatio: typeof input.initialSearchK === "number" && typeof input.finalSearchK === "number" && input.initialSearchK > 0 ? input.finalSearchK / input.initialSearchK : undefined,
|
|
30036
30075
|
jsRemainderClauseCount: pushdown.jsRemainderClauseCount,
|
|
30076
|
+
candidateLimitUsed: input.candidateLimitUsed,
|
|
30077
|
+
queryMultiplierUsed: input.queryMultiplierUsed,
|
|
30037
30078
|
jsRemainderRatio: pushdown.jsRemainderRatio,
|
|
30038
30079
|
pushdownApplied: pushdown.pushdownClauseCount > 0,
|
|
30039
30080
|
pushdownClauseCount: pushdown.pushdownClauseCount,
|
|
@@ -30178,6 +30219,7 @@ var createSQLiteRAGStore = (options = {}) => {
|
|
|
30178
30219
|
initialSearchK: rawRows.length,
|
|
30179
30220
|
nativeDiagnostics,
|
|
30180
30221
|
pushdownFilter,
|
|
30222
|
+
queryMultiplierUsed: input.queryMultiplier,
|
|
30181
30223
|
queryMode: "json_fallback",
|
|
30182
30224
|
returnedCount: limited.length,
|
|
30183
30225
|
topK: input.topK,
|
|
@@ -30197,6 +30239,8 @@ var createSQLiteRAGStore = (options = {}) => {
|
|
|
30197
30239
|
if (!nativeStatements) {
|
|
30198
30240
|
throw new Error("Native vector backend is not available");
|
|
30199
30241
|
}
|
|
30242
|
+
const queryMultiplier = normalizeQueryMultiplier2(input.queryMultiplier ?? nativeConfig?.queryMultiplier);
|
|
30243
|
+
const candidateLimit = normalizeCandidateLimit2(input.candidateLimit);
|
|
30200
30244
|
const queryVector = normalizeVector(input.queryVector);
|
|
30201
30245
|
const queryVectorText = toVectorText(queryVector);
|
|
30202
30246
|
const pushdownFilter = buildSQLitePushdownFilter(input.filter);
|
|
@@ -30208,9 +30252,9 @@ var createSQLiteRAGStore = (options = {}) => {
|
|
|
30208
30252
|
});
|
|
30209
30253
|
const filteredCandidateCount = getFilteredSQLiteCandidateCount(db, tableName, filterPlan);
|
|
30210
30254
|
const searchK = planNativeCandidateSearchK({
|
|
30211
|
-
candidateLimit
|
|
30255
|
+
candidateLimit,
|
|
30212
30256
|
filteredCandidateCount,
|
|
30213
|
-
queryMultiplier
|
|
30257
|
+
queryMultiplier,
|
|
30214
30258
|
topK: input.topK
|
|
30215
30259
|
});
|
|
30216
30260
|
if (searchK === 0) {
|
|
@@ -30249,7 +30293,7 @@ var createSQLiteRAGStore = (options = {}) => {
|
|
|
30249
30293
|
break;
|
|
30250
30294
|
}
|
|
30251
30295
|
const nextSearchK = planNativeCandidateSearchBackfillK({
|
|
30252
|
-
candidateLimit
|
|
30296
|
+
candidateLimit,
|
|
30253
30297
|
currentSearchK,
|
|
30254
30298
|
filteredCandidateCount
|
|
30255
30299
|
});
|
|
@@ -30269,6 +30313,8 @@ var createSQLiteRAGStore = (options = {}) => {
|
|
|
30269
30313
|
initialSearchK: searchK,
|
|
30270
30314
|
nativeDiagnostics,
|
|
30271
30315
|
pushdownFilter,
|
|
30316
|
+
candidateLimitUsed: candidateLimit,
|
|
30317
|
+
queryMultiplierUsed: queryMultiplier,
|
|
30272
30318
|
queryMode: "native_vec0",
|
|
30273
30319
|
returnedCount: Math.min(mapped.length, input.topK),
|
|
30274
30320
|
topK: input.topK,
|
|
@@ -32438,5 +32484,5 @@ export {
|
|
|
32438
32484
|
addRAGEvaluationSuiteCase
|
|
32439
32485
|
};
|
|
32440
32486
|
|
|
32441
|
-
//# debugId=
|
|
32487
|
+
//# debugId=F50A92B6908BBB4464756E2164756E21
|
|
32442
32488
|
//# sourceMappingURL=index.js.map
|