Method AddModelJudgedRetrieval
- Namespace
- MailFathom.AI
- Assembly
- MailFathom.AI.dll
AddModelJudgedRetrieval(IServiceCollection)
Registers the second retrieval pass that puts the fused ranking's own candidates to the model.
public static IServiceCollection AddModelJudgedRetrieval(this IServiceCollection services)
Parameters
servicesIServiceCollectionThe service collection to add to.
Returns
- IServiceCollection
The same service collection, so registration reads as one expression.
Remarks
Called only where a chat endpoint was declared and the deployment turned the pass on, which is why the plan and the chat client are resolved rather than checked for: an instance that declared neither registers nothing here and retrieves exactly as it did, which is the default and the cheaper path.
It decorates rather than replaces, and must therefore be registered after the retrieval it wraps: the container
resolves the last registration of a service type, and the one this wraps is added by AddInfrastructure.
The wrapped search is resolved by its own type, so both this and anything else resolving it within one scope get
the one instance reading through that scope's persistence context.
Exceptions
- ArgumentNullException
Thrown when
servicesis null.