Pulse Cortex

Engine 02 · The Knowledge Layer
Cortex isn’t another AI. It’s what the AI actually knows.

A model only knows what it was trained on — and confidently makes up the rest. Cortex compiles your documents into a verified, cited, contradiction-aware knowledge layer any agent can draw on. It runs fully on-prem, so your contracts never leave the building.

Cortex is the knowledge engine behind PulseLABS. Its thesis is simple: compile, don’t index. Documents are treated like source code — compiled into a structured, verified, living knowledge layer that agents can cite, that detects its own contradictions, and that can run 100% on your own hardware.

It’s a knowledge layer, not a model

Plain RAG does…
chunk → embed → cosine → paste into the prompt. The model skims paste-ins; it never “knows” anything, and it can’t tell you when it’s guessing.
Cortex compiles…
any document into structured chunks, atomic facts with provenance, an entity graph, and a health score — every answer cites its exact source, or admits the knowledge base doesn’t cover it.

From a raw file to a cited answer

Ingestion is an async pipeline — upload returns immediately, processing runs in the background, and the source becomes searchable the moment it’s ready.

01
Compile
Any format — PDF, DOCX, XLSX, PPTX, CSV, HTML, or a URL — is normalized to markdown, chunked along its real heading structure (each chunk keeps its section path), and given an LLM one-liner situating it in the whole document.
02
Understand
Atomic facts and typed entities are extracted with provenance and validity windows. Embeddings run on OpenAI or fully local (nomic-embed-text) — 768 dims either way, so the sovereign path is a config flag, not a rewrite.
03
Retrieve
Hybrid full-text + vector search, fused with Reciprocal Rank Fusion, then reranked by a cheap judge with trust guards. Every passage returned carries its source, section, and similarity — ready to cite as [1]..[K].
04
Verify
When two sources disagree, Cortex flags the contradiction with severity. Expired facts are swept to “stale”. A health score replays generated Q&A daily. Low-confidence retrieval answers “not in your knowledge base” instead of hallucinating.

Two calls: compile, then ground

Cortex via the SDK
import { PulseLabsSDK } from '@pulselabs/sdk'

const pulse = new PulseLabsSDK({ apiKey: process.env.PULSELABS_API_KEY! })

// 1. Compile a document into the knowledge layer (any format, or a URL)
const { id } = await pulse.knowledge.ingest({
  name: 'MSA — Acme 2025',
  url: 'https://acme.com/contracts/msa.pdf',
})

// 2. Ground any agent answer in it — with citations
const answer = await pulse.agents.chat('agent_xxx', {
  message: 'What caps our liability under the Acme MSA?',
  knowledge: { enabled: true, topK: 5 },
})

answer.content            // '…liability is capped at 12 months of fees [1]'
answer.knowledgeUsed      // [{ sourceName: 'MSA — Acme 2025', similarity: 0.91 }]

Why it earns the model’s trust

Cited, or silent
Every answer names the exact chunk it used. Below the confidence threshold, Cortex says the base doesn’t cover it rather than inventing an answer.
Contradiction-aware
When your own documents disagree — a 30-day vs a 45-day payment term — both facts are flagged for review instead of one silently winning.
Freshness-tracked
Facts carry validity windows; expired ones are swept to “stale” automatically, and a daily health replay tells you what the base can no longer answer.
Sovereign by default
Local embeddings, PII-shielded ingestion, and local Postgres mean a document set can be searched without a single byte leaving your infrastructure.
Cortex decides what the model knows. Its sibling engine, Synapse, decides how to call the model. Together they’re the two engines PulseLABS runs on top of any AI.
Knowledge Base API reference →Meet Synapse Engine →