Skip to main content

runMonitoringQuery

chainalign-backend


chainalign-backend / services/RAGService / runMonitoringQuery

Function: runMonitoringQuery()

runMonitoringQuery(monitoringQuery, k, industry, tenantId, user): Promise<string[]>

Defined in: services/RAGService.js:123

Runs a specific monitoring query to retrieve relevant knowledge base chunks. This is intended for internal, proactive alerting mechanisms.

Parameters

monitoringQuery

string

The query representing a potential risk or opportunity.

k

number = 10

The number of top relevant chunks to retrieve.

industry

string = null

Optional industry filter.

tenantId

string

The ID of the tenant making the request.

user

any

The user object (e.g., from req.user).

Returns

Promise<string[]>

An array of relevant text chunks.