Getting started

Introduction

Lemma provides deterministic, verifiable knowledge retrieval for FDA drug labels with complete traceability. Unlike traditional AI systems that provide probabilistic results, Lemma uses binary fingerprints and Hamming distance to ensure zero false positives and cryptographic-level verification.

Key Features

Deterministic Retrieval

XOR-based Hamming distance for exact pattern matching. Every search returns the same results every time - no probabilistic ranking, no hidden algorithms.

Cryptographic Verification

128-bit binary fingerprints for citation proof. Anyone can independently verify that a citation corresponds to exact FDA source text with mathematical certainty.

Complete Provenance

Direct links to official FDA sources (DailyMed). Every piece of information traces back to a verifiable government source.

Zero Hallucinations

All information sourced from verified FDA documents. The system cannot generate or infer information - it only returns what exists in official documents.

Court-Admissible

Mathematical proof of citations for legal use. Fingerprints provide cryptographic evidence that can be independently verified in court proceedings.

How It Works

1

Your AI App Needs Drug Information

Medical chatbot answering questions? Clinical agent checking contraindications? Query Lemma's API with natural language - just like you'd query an LLM, but get back verified FDA knowledge instead of hallucinations.

2

Lemma Returns Verified FDA Sources

Get exact label text with 128-bit fingerprints for cryptographic verification. Each result includes drug metadata (NDC, manufacturer, route) and section context (Warnings, Interactions, etc.).

3

Use as LLM Context

Send Lemma's results to your LLM as grounding context. Your AI generates natural language responses based only on verified sources - no hallucinations, full traceability.

4

Verify Claims Programmatically

Every response includes fingerprints. Build verification into your app - show users proof, enable compliance audits, or create citation systems with mathematical certainty.

Complete Integration Flow

1

Your AI App Queries Lemma

POST /v1/search
{
  "question": "aspirin side effects",
  "top_k": 5
}
2

Lemma Returns Verified FDA Sources

200 OK - Verified Results
{
  "results": [
    {
      "text": "Stop use and ask a doctor if pain gets worse...",
      "fingerprint": "11110011110101100001010001100111...",
      "drug": {
        "name": "aspirin",
        "manufacturer": "P & L Development, LLC",
        "ndc": ["59726-867"],
        "route": ["ORAL"]
      },
      "section": "Warnings",
      "source": {
        "url": "https://dailymed.nlm.nih.gov/..."
      }
    }
  ]
}
3

Send to Your LLM as Context

Prompt to GPT-4/Claude:

"Answer this question using ONLY these verified FDA sources:

User Question: What are aspirin side effects?

Verified Sources:

1. Stop use and ask a doctor if pain gets worse...

[Citation: fp:11110011110101100001...]

Generate a natural language response with citations."

LLM Response:

"Based on FDA sources, aspirin may cause several side effects. Stop using aspirin if pain worsens or lasts more than 10 days.

[Citation: fp:11110011110101100001...]"

4

User Can Verify Any Claim

GET /v1/verify/fingerprint
{
  "verified": true,
  "text": "Stop use and ask a doctor if pain gets worse...",
  "source": {
    "url": "https://dailymed.nlm.nih.gov/..."
  }
}

Cryptographic proof that claim came from FDA source

Next Steps

Ready to get started? Follow our quickstart guide to make your first API request.

Get Started