@absolutejs/absolute 0.19.0-beta.491 → 0.19.0-beta.492

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/index.js CHANGED
@@ -3877,8 +3877,10 @@ var createRAGCollection = (options) => {
3877
3877
  const model = input.model ?? options.defaultModel;
3878
3878
  const topK = input.topK ?? defaultTopK;
3879
3879
  const hasReranker = Boolean(input.rerank ?? options.rerank);
3880
- const candidateTopK = Math.max(topK, Math.floor(input.candidateTopK ?? (hasReranker ? topK * defaultCandidateMultiplier : topK)));
3881
3880
  const retrieval = resolveRAGHybridSearchOptions(input.retrieval);
3881
+ const hasQueryTransform = Boolean(input.queryTransform ?? options.queryTransform);
3882
+ const shouldExpandCandidates = hasReranker || hasQueryTransform || retrieval.mode !== "vector";
3883
+ const candidateTopK = Math.max(topK, Math.floor(input.candidateTopK ?? (shouldExpandCandidates ? topK * defaultCandidateMultiplier : topK)));
3882
3884
  const transformed = await applyRAGQueryTransform({
3883
3885
  input: {
3884
3886
  candidateTopK,
@@ -8598,5 +8600,5 @@ export {
8598
8600
  aiChat
8599
8601
  };
8600
8602
 
8601
- //# debugId=F84CC012821C275C64756E2164756E21
8603
+ //# debugId=8B383E0793D06CEF64756E2164756E21
8602
8604
  //# sourceMappingURL=index.js.map