UNPKG

agentfootprint

Version:

The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.

33 lines • 1.7 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.listInfluenceStrategies = exports.lexicalOverlapStrategy = exports.semanticAlignmentStrategy = void 0; const signals_js_1 = require("./signals.js"); const lexical_js_1 = require("./lexical.js"); /** The DEFAULT: the FDL four-signal embedding composite (`scoreInfluence`). */ exports.semanticAlignmentStrategy = Object.freeze({ name: 'semantic-alignment', description: 'Ranks sources by how semantically close their content is to the final answer, using ' + 'embeddings (the four-signal composite). The default. Needs an embedder; scores are a ' + 'proxy for alignment, never proof of cause.', requirements: Object.freeze(['embedder']), scorer: signals_js_1.scoreInfluence, }); /** The cheap option: deterministic word overlap (`scoreLexicalInfluence`), zero deps. */ exports.lexicalOverlapStrategy = Object.freeze({ name: 'lexical-overlap', description: 'Ranks sources by plain word overlap with the final answer. Deterministic, free, no ' + 'dependencies — the simpler, cheaper option. Misses paraphrases; same proxy caveat: ' + 'overlap is not cause.', requirements: Object.freeze([]), scorer: lexical_js_1.scoreLexicalInfluence, }); const BUILT_IN = Object.freeze([exports.semanticAlignmentStrategy, exports.lexicalOverlapStrategy]); /** * The built-in strategies, default first. Frozen — a host UI renders its * selector straight off this (concat your own custom strategies after). */ function listInfluenceStrategies() { return BUILT_IN; } exports.listInfluenceStrategies = listInfluenceStrategies; //# sourceMappingURL=strategies.js.map