Count facts
lore_aggregate_factsAggregate fact history deterministically: count facts grouped by subject, predicate, or object with date-range filters to answer how many or which values occur most often.
Instructions
Deterministic aggregation over fact history — counts grouped by object/subject/predicate with date-range filters. Use for "how many X", "which Y most often" questions; similarity search cannot answer these reliably. Returns { groups, totalGroups, limit }: groups is the top limit (default 100), so read totalGroups for "how many distinct values are there" rather than counting groups, and raise limit if you need the tail.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | max groups returned (default 100); totalGroups always reports the real count | |
| since | No | ||
| until | No | ||
| groupBy | No | ||
| subject | No | ||
| predicate | No |