Manas Gedam8 downloadsCompiles a note into a navigable semantic IR (nodes, typed edges, evidence).
Transform any note into a structured knowledge graph. Lattice segments your text, classifies each segment into typed nodes (Claim, Observation, Decision, Memory, Emotion, Event, Value), and extracts relationships between them — all backed by verbatim evidence spans you can trace back to the source.
Works well with diary entries, meeting notes, and legal or narrative text. Large, heavily-structured technical documents (papers, specs with sections/cross-references) aren't well supported yet — the current pipeline is flat and sentence-level, with no heading-aware chunking. Every node and edge carries a direct reference to the original text it was extracted from.
The output is a .ir.json.md file alongside your note, containing:
precedes from document order) and LLM-extracted relationships (supports, contradicts, causes, elaborates, depends_on, and more)precedes edges reuse the connected segment's own text, since their justification is document position, not content.main.js and manifest.json to your vault's .obsidian/plugins/semantic-ir-compiler/ directory (Community Plugins submission pending)https://api.groq.com/openai/v1)openai/gpt-oss-20b)Cmd/Ctrl + P → Lattice: Compile current note
A .ir.json.md file will be created in the same folder as your note, containing the full semantic intermediate representation as a JSON code block.
precedes edges from document order, detects revision candidatesThis plugin makes API calls to an external LLM service that you configure. Your note content is sent to the configured endpoint for classification and relation extraction. No data is sent anywhere else. API keys are stored locally in your vault's plugin settings. Note: if you sync your vault (Obsidian Sync, iCloud, Dropbox, a git repo, etc.), your API key syncs along with it via that tool — Lattice doesn't control or limit this.
npm install
npm run typecheck
npm run build
npm test
npm run test:coverage
npm test covers the deterministic pipeline (segmentation, rule-based relations, assembly, validation) plus the structural invariant suite in src/pipeline/invariants.ts, which is also run against every IR in test-fixtures/. Coverage thresholds are enforced in CI on every pull request.
To run the smoke test with a real LLM:
cp .env.example .env
# Fill in your API credentials
npm run smoke
The invariant suite proves the IR is well-formed; it cannot say whether the labels are right. That needs gold-standard labels:
npm run gold:label -- test-documents/short-diary.txt # machine draft, written with reviewed: false
# hand-review gold/<name>.gold.json, then set "reviewed": true
npm run eval -- --runs 3
gold:label refuses to overwrite a file marked reviewed: true. eval skips unreviewed drafts (--include-unreviewed scores them anyway, but the output says so) and reports node macro-F1, per-type precision/recall, attribution accuracy overall and on the non-self subset, edge precision/recall/F1 overall and per relation family, edge direction accuracy, and across-run stability. The machine-readable report lands in eval/report.json.
MIT