Table of Contents

Class MailboxKnowledgeSearch

Namespace
MailFathom.Application.Retrieval
Assembly
MailFathom.Application.dll

Answers a retrieval from the mailbox search this deployment already serves.

public sealed class MailboxKnowledgeSearch : IEmailKnowledgeSearch
Inheritance
MailboxKnowledgeSearch
Implements
Inherited Members

Remarks

The whole of the retrieval side, and deliberately thin: hybrid ranking, the structured filters, the account restriction, and the extracts themselves all belong to MailboxSearchReader, which is the same retrieval a caller reaches through search_emails. Answering a question therefore cannot see mail that searching for it would not, cannot narrow in a way searching could not, and improving the ranking improves both.

Every filter is handed on unvalidated and unnormalized, which is the point rather than an omission: the use case below refuses an unusable address, an over-long subject fragment, and a date range that can select nothing, in the same words and under the same error code whoever wrote them. A second validation here would be a second set of rules to keep in agreement with the first.

What this adds is the shape a model's context needs rather than a reader's: one bounded extract per message instead of a summary and several highlighted fragments, carrying only the identity an answer is traced through. Everything a listing publishes and an answer does not need — the participants, the size, the flags, the attachment summary — is dropped here rather than sent to a provider.

Constructors

MailboxKnowledgeSearch(MailboxSearchReader, EmailKnowledgeBounds)

Initializes the retrieval over the mailbox search and the bounds it hands its results over under.

Methods

FindPassagesAsync(MailboxScope, EmailKnowledgeQuery, CancellationToken)

Finds the passages relevant to one query within one scope.