L LegalForge Review a PDF
OCR-aware · Ollama powered · Grounded sources

Legal checks that actually explain risk

Upload a contract, deed, or everyday legal PDF. The backend extracts text, retries OCR when needed, runs practical issue spotting, and returns risk cards with next steps you can understand.

India property diligence Contract risk triage RAG citations Local Ollama inference

Quick Legal Check

Start here: upload one PDF and get OCR-aware issue spotting, key risks, next steps, and source snippets.

Backend connection

Unknown

Device introspection

Uses paths and disk on the machine running the API (not Vercel).

1 · Upload PDFs

Files are sent to POST /v1/ingest on your backend.

    2 · Diligence run

    Stream log (LangGraph steps)

    Server-sent events from /v1/analyze/stream. Final event includes merged state + optional run_id.

    
          

    3 · Memo & structured output

    Run diligence to see the memo here.

    Quick Q&A (grounded)

    Answer

    Sources

    Batch grounded Q&A

    One question per line → POST /v1/query/batch (≤24 lines). Shared optional scope below.

    Embedding similarity

    Uses the same embedding backend as RAG (POST /v1/embeddings/similarity).

    Batch embeddings

    Non-empty lines → POST /v1/embeddings/embed-texts (≤48 lines). Preview hides raw vectors.

    Embed local text files (allowlisted paths)

    POST /v1/embeddings/embed-local-text-files — requires LEGAL_INTEL_ALLOW_LOCAL_PATHS on the API host (same as PDF local ingest). UTF-8, ≤256KiB per file, ≤16 paths.

    RAG · document summary

    POST /v1/rag/document-summary (or …/stream SSE) — retrieves chunks for one doc_id, then synthesis-model summary (Ollama when configured).

    RAG · compare two documents

    POST /v1/rag/compare-documents (or …/stream SSE) — retrieval per doc + specialist comparison (grounded).

    RAG · cross-document summary (2–12 docs)

    POST /v1/rag/cross-document-summary — one synthesis memo across many indexed doc_id values (shared retrieval query).

    RAG · structured JSON extract

    POST /v1/rag/structured-extract — retrieval + json_object fields you name (e.g. parties, consideration).

    Ollama embed proxy

    Non-empty lines → native daemon POST /api/embed (/v1/ollama/embed-proxy). Uses OLLAMA_EMBEDDING_MODEL if model omitted.

    Ollama native generate

    Proxies to the daemon’s POST /api/generate (non-streaming). Model must exist in ollama list.

    Ollama native chat

    POST /v1/ollama/chat — multi-turn messages (non-streaming). Uses your local daemon.

    RAG · near-duplicate chunks

    Pairwise cosine similarity within one indexed doc_id (POST /v1/rag/near-duplicate-chunks). Uses the same embeddings as ingestion.