feat: add number of indexed indicators to available datasets tool output #191#192
Open
Fedir-Yatsenko wants to merge 1 commit intodevelopmentfrom
Conversation
…put #191 Add optional per-dataset and total indicator counts to the available datasets tool response, controlled by `include_indicator_count` flag (disabled by default) in `AvailableDatasetsDetails`. - Add `get_size_per_version` to VectorStore base and PgVectorStore (single GROUP BY query to avoid N+1) - Add `get_indicator_counts` to ChannelServiceFacade - Pass indicator counts through formatters (simple, detailed, list) - Add i18n strings for EN and UK locales Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Collaborator
Author
Example output from the Available Datasets tool.
|
Collaborator
Author
|
/deploy-review
|
navalnica
reviewed
Mar 6, 2026
Comment on lines
+575
to
+577
| async def get_size_per_version(self, version_ids: set[int]) -> dict[int, int]: | ||
| """Returns the number of documents per version_id in a single query.""" | ||
| metadata_model = await self._get_metadata_model() |
Contributor
There was a problem hiding this comment.
let's reuse docstrings from base class methods, and update it for the new function:
@abstractmethod
async def get_total_size(self) -> int:
"""Returns the total number of documents in the vector store."""
@abstractmethod
async def get_size(self, version_ids: set[int]) -> int:
"""Returns the number of documents in the vector store for the specified version IDs."""
@abstractmethod
async def get_size_per_version(self, version_ids: set[int]) -> dict[int, int]:
"""Returns the number of documents grouped by version_id."""
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Applicable issues
Description of changes
Add optional per-dataset and total indicator counts to the available datasets tool response, controlled by
include_indicator_countflag (disabled by default) inAvailableDatasetsDetails.get_size_per_versionto VectorStore base and PgVectorStore (single GROUP BY query to avoid N+1)get_indicator_countsto ChannelServiceFacadeChecklist
Reviewenvironment.By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.