UNPKG

agentfootprint

Version:

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

21 lines • 1.03 kB
"use strict"; /** * rag/types — the ports and value objects between a folder of documents and * an answering agent. * * Pattern: Ports (DocumentLoader, Splitter) + value objects (LoadedDocument, * Chunk, IndexReport). * Role: rag/ layer. The law this folder exists to keep is stated once, * here, because everything downstream implements a piece of it: * **a chunk must be able to say where it came from.** Not "which * document, roughly" — which document, which characters of it, which * page, under which heading. A passage the agent read and cannot * locate is a passage nobody can check. * Emits: N/A (types only). * * That is why `Chunk` carries offsets rather than only text, why `LoadedDocument` * keeps per-page text rather than one flattened string, and why every loader * is required to preserve positions rather than normalise them away. */ Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=types.js.map