@kinqs/brainrouter-types 0.3.5 → 0.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/memory.d.ts +30 -0
- package/package.json +1 -1
package/dist/memory.d.ts
CHANGED
|
@@ -183,6 +183,14 @@ export interface RecallExplanation {
|
|
|
183
183
|
skillBoostApplied: boolean;
|
|
184
184
|
/** Whether the neural reranker was used in Stage 3. */
|
|
185
185
|
rerankerUsed: boolean;
|
|
186
|
+
/** Whether the LLM relevance judge was used in Stage 4. */
|
|
187
|
+
judgeUsed?: boolean;
|
|
188
|
+
/** How many candidates the judge approved as relevant. */
|
|
189
|
+
judgeApproved?: number;
|
|
190
|
+
/** How many candidates the judge rejected as not relevant. */
|
|
191
|
+
judgeRejected?: number;
|
|
192
|
+
/** Per-candidate verdicts (index, relevant, reason) for audit/tuning. */
|
|
193
|
+
judgeVerdicts?: RelevanceVerdict[];
|
|
186
194
|
/** Whether graph context expansion was appended. */
|
|
187
195
|
graphExpansion: boolean;
|
|
188
196
|
/** Per-record citation boost contribution (recordId → boost). */
|
|
@@ -272,6 +280,28 @@ export interface RerankerServiceConfig {
|
|
|
272
280
|
model?: string;
|
|
273
281
|
topN?: number;
|
|
274
282
|
}
|
|
283
|
+
export interface RelevanceJudgeServiceConfig {
|
|
284
|
+
/** Enable flag — when false, the judge stage is skipped entirely. */
|
|
285
|
+
enabled?: boolean;
|
|
286
|
+
/** OpenAI-compatible chat-completions endpoint. Falls back to BRAINROUTER_LLM_ENDPOINT. */
|
|
287
|
+
endpoint?: string;
|
|
288
|
+
/** API key. Falls back to BRAINROUTER_LLM_API_KEY. */
|
|
289
|
+
apiKey?: string;
|
|
290
|
+
/** Model id for the judge. Defaults to a fast/cheap model. */
|
|
291
|
+
model?: string;
|
|
292
|
+
/** Max candidates sent to the judge in a single batched call. Default 10. */
|
|
293
|
+
maxCandidates?: number;
|
|
294
|
+
/** Per-call timeout in ms. Default 15000. */
|
|
295
|
+
timeoutMs?: number;
|
|
296
|
+
}
|
|
297
|
+
export interface RelevanceVerdict {
|
|
298
|
+
/** Index into the candidate list passed to the judge. */
|
|
299
|
+
index: number;
|
|
300
|
+
/** Whether the judge approves this candidate as relevant to the query. */
|
|
301
|
+
relevant: boolean;
|
|
302
|
+
/** Short justification from the judge (for audit + tuning). */
|
|
303
|
+
reason: string;
|
|
304
|
+
}
|
|
275
305
|
export interface SkillHintsRecord {
|
|
276
306
|
skillName: string;
|
|
277
307
|
hints: string;
|