Skip to content
View groundlens-dev's full-sized avatar
📐
📐

Block or report groundlens-dev

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
groundlens-dev/README.md
Groundlens — geometric methods for trustworthy models

Groundlens dev

Geometric methods for trustworthy models

An open-source practice for trustworthy modeling — making the outputs of both AI systems and physical systems verifiable.
Embedding geometry to check what an LLM says · energy geometry to model how a physical system behaves.

Website Live demo Google Scholar License: MIT


Groundlens · Otwin · Featured · Research · About


Most AI and modeling failures are not failures of capability — they are failures of trust: a model produces an output, and nothing tells you whether to believe it. Groundlens builds the missing layer. It applies geometry to make outputs verifiable, with one consistent stance: deterministic where possible, calibrated where not, and clear about where the method stops working.

It ships as two open-source lines that share that DNA:

  • Groundlens — verifies what a language model says, using the geometry of embeddings.
  • Otwin — models how a physical system behaves, using the geometry of energy (port-Hamiltonian structure) with calibrated uncertainty.

Both are MIT-licensed, grounded in peer-reviewed research, and built to be auditable rather than impressive.


Groundlens

Groundlens

LLM output verification

Geometric grounding and hallucination triage for production LLMs in regulated industries. It ranks responses by how faithfully they reflect their sources — deterministic scores, sub-second, no second LLM in the loop — so the ones that earned trust pass and the rest go to human review.

Try the live demo

Run grounding verification in your browser — no install.

Repo  Stars

groundlens · grounding-benchmark · groundlens-mcp · Groundlens-Cookbook

Groundlens research

The methods are not heuristics — they come from published work.

Paper Idea Link
Semantic Grounding Index (SGI) Ratio-based grounding verification for RAG — measures whether a response engages its source via angular geometry on the unit hypersphere. arXiv
A Geometric Taxonomy of Hallucinations Three-type hallucination classification via directional grounding (von Mises–Fisher on displacement vectors); domain calibration reaches AUROC 0.76–0.99. arXiv
Rotational Dynamics of Factual Constraint Processing Transformers reject wrong answers by rotating the representation, not rescaling — with a phase transition at ~1.6B parameters. arXiv

Otwin

Otwin

Physics-informed digital twins

Digital twins with calibrated uncertainty for grid-scale energy storage and other physical systems. You bring the physical model structure you know (a port-Hamiltonian system, or an empirical law); Otwin estimates the rest from data, attaches horizon-aware uncertainty intervals, and validates without leakage against mandatory baselines. Lightweight and CPU-first, spanning white-box (full physics) to grey-box (physics + estimated residual).

Repo  Stars  Presented at IEEE PES General Meeting 2026AI-powered Digital Twins for Grid-Scale Storage.

Problem Result
Water tank · first-principles (white-box). A draining tank written as a port-Hamiltonian system — can a structure-preserving forecast stay physical at any horizon? Water tank dynamics
Energy decays monotonically (passive by construction); skill ≈ 0.94 vs a persistence baseline.
DC motor · first-principles, multi-domain. Coupled electrical + mechanical actuator — can the twin predict it with no fitting? DC motor response
Numeric steady state matches the closed-form ω, I to within 0.001%.
Pumped-hydro storage · white-box, grid-scale. The dominant grid storage technology — how much energy survives a charge/discharge cycle? Pumped-hydro energy and round-trip efficiency
Round-trip efficiency matches the closed form ηp·ηt; energy conserved while idle.
Battery State-of-Health · grey-box. Forecast Li-ion SoH / remaining useful life with trustworthy intervals (predictive maintenance). Battery State-of-Health forecast
The physics-informed hybrid tracks the real decay to end-of-life; a data-only model diverges. The 90% band is calibrated.
Grid-scale dispatch · predictive maintenance → real-time optimization. Dispatch storage under uncertain capacity. Grid storage dispatch under uncertain capacity
The calibrated-UQ plan leaves 0.0 MWh of demand unmet over the horizon, vs 55.6 MWh for a naive plan.

Featured

Featured LinkedIn post — 100,000+ impressions

100,000+ impressions · read it on LinkedIn


Research

Groundlens is built on peer-reviewed research. Selected publications:

Year Publication Venue / link
2026 Rotational Dynamics of Factual Constraint Processing arXiv:2603.13259
2026 A Geometric Taxonomy of Hallucinations arXiv:2602.13224
2025 Semantic Grounding Index (SGI) arXiv:2512.13771
Evaluating Synthetic Tabular Data Generated to Augment Small-Sample Datasets see Scholar
Synthetic Tabular Data Generation see Scholar
Explainable Deep Neural Networks see Scholar

Full publication list — Google Scholar


Contributing

Contributions are welcome across all Groundlens repositories. Please read CONTRIBUTING.md before opening an issue or pull request.

Code of Conduct

This community follows the Contributor Covenant. See CODE_OF_CONDUCT.md.

Security

To report a vulnerability, please follow the process in SECURITY.md — do not open a public issue for security matters.

License

All Groundlens open-source projects are released under the MIT License. See LICENSE.

About

Groundlens is an independent open-source practice for trustworthy modeling, working at the intersection of applied geometry, physics, and machine learning. Its two lines — Groundlens (LLM verification) and Otwin (physics-informed digital twins) — share a single goal: outputs you can audit before they reach production.

Maintained by Javier Marin · Madrid · javier@groundlens.dev · groundlens.dev


Verification over capability.

Popular repositories Loading

  1. otwin otwin Public

    In this repo we will show how to build a simple but useful Digital Twin using python. Our asset will be a Li-ion battery. This Digital Twin will allow us to model and predict batteries behavior and…

    Python 119 45

  2. groundlens groundlens Public

    Geometric LLM grounding verification — deterministic, auditable, no second LLM. Python library for measuring how faithfully model outputs reflect their sources.

    Python 4

  3. grounding-benchmark grounding-benchmark Public

    Curated dataset for evaluating LLM grounding — 212 claim–source pairs across 9 domains with human-annotated labels and geometric verification scores.

    Python

  4. groundlens.site groundlens.site Public

    Content for groundlens web site

    Astro

  5. groundlens-mcp groundlens-mcp Public

    MCP server for groundlens — LLM hallucination detection for Claude Desktop, Cursor, Windsurf, and any MCP-compatible client.

    Python

  6. Groundlens-Cookbook Groundlens-Cookbook Public

    Runnable notebooks applying Groundlens to real AI agent verification cases — geometry + rules vs LLM-as-judge.

    Jupyter Notebook