Interface IEmailKnowledgeSearch
- Namespace
- MailFathom.Application.Retrieval
- Assembly
- MailFathom.Application.dll
Finds the mail relevant to a question, as bounded extracts an answer can be written from and traced to.
public interface IEmailKnowledgeSearch
Remarks
The retrieval side of answering, and the only route by which mail reaches a model. It exists as a port rather than as a call into the search use case because the caller is an orchestration framework: what that framework may ask for is the query and the narrowing of EmailKnowledgeQuery, and everything else about the retrieval — which accounts, which folders, how many passages, how much of any message — is decided by whoever composed the run.
The scope is a parameter rather than part of the query for exactly that reason. It comes from the caller that has already established what the requester may see, so no instruction reaching the model, and no query the model writes, can widen it. An implementation narrows the scope further where the deployment serves fewer accounts than were named; it never widens it.
Nothing here reaches a mail server. A question is answered from what synchronization has already stored and what indexing has already derived, which is what keeps answering independent of IMAP availability, and no call of this port changes any remote state.
Methods
- FindPassagesAsync(MailboxScope, EmailKnowledgeQuery, CancellationToken)
Finds the passages relevant to one query within one scope.