Skip to main content

@nuclia/core / Exports / ActivityMonitor

Class: ActivityMonitor

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new ActivityMonitor(kb, nuclia)

Parameters

NameType
kbWritableKnowledgeBox
nucliaINuclia

Defined in

libs/sdk-core/src/lib/db/kb/activity/activity-monitor.ts:16

Properties

kb

kb: WritableKnowledgeBox

Defined in

libs/sdk-core/src/lib/db/kb/activity/activity-monitor.ts:13


nuclia

nuclia: INuclia

Defined in

libs/sdk-core/src/lib/db/kb/activity/activity-monitor.ts:14

Methods

getFullContexts

getFullContexts(eventId): Observable<RemiQueryResponseContextDetails>

Get the RAG request (question and answer), the REMi scores and the full contexts list for a specific item coming from queryRemiScores method.

Parameters

NameTypeDescription
eventIdnumberIdentifier of an item from queryRemiScores response.

Returns

Observable<RemiQueryResponseContextDetails>

Defined in

libs/sdk-core/src/lib/db/kb/activity/activity-monitor.ts:62


getRemiScores

getRemiScores(from, to?, aggregation?): Observable<RemiScoresResponseItem[]>

Get the evolution of REMi scores of a KB on the specified time range.

Parameters

NameTypeDescription
fromstringTimestamp of the moment from which we want the metrics.
to?stringTimestamp of the moment until which we want the metrics. When not provided, the metrics are returned "until now".
aggregation?UsageAggregationDefine how the metrics are aggregated. By default, the endpoint returns only one point aggregating all the data for the specified date range. But you can have one point by: - "hour" - "day" - "week" - "month" - "quarter" - "year" - "millennium" (used by default)

Returns

Observable<RemiScoresResponseItem[]>

Defined in

libs/sdk-core/src/lib/db/kb/activity/activity-monitor.ts:35


queryRemiScores

queryRemiScores(criteria): Observable<RemiQueryResponseItem[]>

Get a list of RAG requests and their scores (if any) that matches a REMi scores query or a status.

Parameters

NameTypeDescription
criteriaRemiQueryCriteriaObject representing the query to be done. It currently supports querying on context relevance or on answer status.

Returns

Observable<RemiQueryResponseItem[]>

Defined in

libs/sdk-core/src/lib/db/kb/activity/activity-monitor.ts:51