Fixed Semantic Search leaving out passages that did not fit into a search (#1167)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-11-05 16:02:59 +01:00
1 parent 0a178cb1a3
commit 7342c436dd
17 files changed
+1065 -111

No files matched your search

@@ -98,11 +98,13 @@ public record struct DataSourceERI_V1: IERIDataSource
/// <inheritdoc />
/// <remarks>
/// An ERI data source has a single page. ERI v1 knows no offset, so a further page would have
/// to ask the server for all pages before it as well. A server may refuse more matches than its
/// retrieval process allows, which often is the very number configured here: it would refuse
/// every further page, and the model would hear that the data source could not be searched
/// rather than that there is nothing more.
/// An ERI data source has a single page of matches. ERI v1 knows no offset, so a further page
/// would have to ask the server for all pages before it as well. A server may refuse more
/// matches than its retrieval process allows, which often is the very number configured here:
/// it would refuse every further page, and the model would hear that the data source could not
/// be searched rather than that there is nothing more.<br/><br/>
/// Semantic Search still turns pages within these matches, when they are too long for a single
/// search: it cuts them into pages by their length, and asks the server again for each of them.
/// </remarks>
public int GetLastPage() => 1;
@@ -37,7 +37,9 @@ public interface IDataSource : IDataSourceBase
/// <remarks>
/// By default, as many pages as RetrievalPaging.GetLastPage allows for the page size. A data
/// source which cannot page that far says so itself. It is a method rather than a property, so
/// that it never ends up in the settings.
/// that it never ends up in the settings.<br/><br/>
/// These pages hold a number of matches each. Semantic Search cuts them into pages of its own,
/// by the length of the passages, see SemanticSearchTool.SearchAsync.
/// </remarks>
/// <returns>The number of the last page, which is at least 1.</returns>
public int GetLastPage() => RetrievalPaging.GetLastPage(this.MaxMatches);