UNPKG

@juspay/neurolink

Version:

The pipe layer of an AI nervous system: one interface connecting provider neurons to your application, across three inference types — generate, stream and decide. `decide` returns typed, calibrated judgements from a non-generative model (~400ms, ~$0.00002

30 lines (29 loc) • 1.54 kB
/** * Knowledge grounding — lexical-first host-supplied knowledge retrieval. * * A host application owns a structured *knowledge registry*: versioned entries * describing concepts, configuration, taxonomies, procedures, and operating * rules. NeuroLink owns the * generic engine that ingests that registry, builds an in-memory lexical * index once per instance, and — independently of tool routing — retrieves a * small, token-bounded set of relevant entries before each main model call. * The selected entries are attached as *ephemeral context*: visible to the * current generation call, never persisted into conversation memory. * * This is retrieval-augmented generation WITHOUT vector retrieval. The first * release ranks with exact identifiers, reviewed aliases, metadata filters, * and weighted field-aware BM25 only. No embedding model, embedding service, * or vector store is initialized. An LLM reranker and semantic retrieval are * deferred behind an explicit evaluation gate. * * Ownership boundary: NeuroLink defines the contracts below and the engine; * it never contains host product content. The host supplies content and * per-request scope. The engine stays provider-neutral. * * Type names are globally prefixed `Knowledge*` to satisfy the repo's * unique-type-name rule and to avoid collision with the pre-existing * web-search `grounding.ts` vocabulary (`EnhancedGroundingMetadata` et al.), * which is a different concept (Google search grounding, not product * knowledge). */ export {};