* @summary Builds Chroma query option objects for a request. * * Broad `type='all'` searches are stratified before Chroma retrieval so historical * conversations cannot monopolize the candidate set before current source/docs reach * the hybrid scorer. * * @param {Object
({queryEmbeddingValues, requesterTenantId, type})
| 267 | * @returns {Object[]} Chroma query option objects. |
| 268 | */ |
| 269 | createQueryOptions({queryEmbeddingValues, requesterTenantId, type}) { |
| 270 | if (type === 'all') { |
| 271 | return this.createBroadQueryOptions({queryEmbeddingValues, requesterTenantId}); |
| 272 | } |
| 273 | |
| 274 | return [ |
| 275 | this.createQueryOption({ |
| 276 | queryEmbeddingValues, |
| 277 | requesterTenantId, |
| 278 | typeFilter: this.resolveTypeFilter(type), |
| 279 | nResults : aiConfig.nResults |
| 280 | }) |
| 281 | ]; |
| 282 | } |
| 283 | |
| 284 | /** |
| 285 | * @summary Builds source-tiered Chroma queries for broad KB searches. |
no test coverage detected