Claim Free Community License
Document Intelligence

Ask Your Documents.Get Grounded Answers.

The most advanced local document Q&A technology available. Query PDFs, Office documents, HTML, Markdown, and more. Powered by semantic RAG, adaptive layout analysis, and a fully customizable agent with tool calling and memory. 100% on-device.

Semantic RAG Adaptive Processing Layout Analysis

Adaptive Engine

Auto-selects OCR, VLM, or text extraction based on content.

Layout Analysis

Full document structure understanding with page elements.

Semantic RAG

Embedding-based retrieval with intelligent chunking.

Source Attribution

Every answer traced to document, page, and passage.

0
Cloud Calls
100%
Traceable
Documents

Semantic RAG Meets Document Layout Analysis

LM-Kit.NET delivers the most advanced local document Q&A technology available. The underlying system combines semantic retrieval-augmented generation with a complete document layout analysis stack. Supports PDF, Office documents (Word, Excel, PowerPoint), HTML, Markdown, images, and more.

The engine is extremely fast, using an adaptive approach that intelligently engages OCR, Vision Language Models, layout processing, or direct text extraction based on content discovery. Each page is analyzed and processed using the optimal strategy automatically.

Built by IDP pioneers: This isn't a wrapper around generic RAG. It's purpose-built document intelligence from a team with 20+ years of experience processing billions of documents in production worldwide.

Program.cs
using LMKit.Retrieval;
using LMKit.Model;

// Load your preferred models
var chatModel = LM.LoadFromModelID("your-chat-model");
var embedModel = LM.LoadFromModelID("your-embedding-model");

// Create document chat instance
using var chat = new PdfChat(chatModel, embedModel);

// Load documents - adaptive processing kicks in
await chat.LoadDocumentAsync("contract.pdf");
await chat.LoadDocumentAsync("scanned-report.pdf");

// Ask questions in natural language
var response = await chat.SubmitAsync(
    "What are the payment terms?");

// Get answer with source references
Console.WriteLine(response.Response.Completion);
foreach (var src in response.SourceReferences)
    Console.WriteLine($"  → {src.Name}, p.{src.PageNumber}");

Adaptive Document Processing Pipeline

Content-aware processing that automatically selects the optimal extraction strategy for each page based on content discovery.

Document Import

PDF, Office, HTML, Markdown, images analyzed page-by-page

Auto-Detection

Content type determines processing mode

Extraction

Text, OCR, VLM, or layout analysis

Semantic RAG

Embeddings, retrieval, grounded answers

Intelligent Content-Aware Processing

The engine automatically selects the optimal strategy for each page based on content analysis, or you can specify your preference.

TextExtraction
Fast, direct processing

Extracts text directly from PDF structure with OCR fallback for scanned or image-based pages. Maximum speed.

  • Fastest processing
  • Lower resource usage
  • Best for clean digital PDFs
DocumentUnderstanding
VLM-powered analysis

Vision Language Models analyze pages visually to understand layout, structure, tables, and relationships. Markdown output.

  • Best for complex layouts
  • Preserves document structure
  • Tables, forms, mixed content

Production-Ready Document Intelligence

Everything you need to build document Q&A applications that actually work.

Multi-Document Queries

Load multiple documents and ask questions that span all of them. Compare contracts, cross-reference reports, search collections.

Source Attribution

Every answer includes document names, page numbers, and custom metadata. Full traceability for compliance and audit.

Intelligent Caching

Processed documents cached via IVectorStore. Subsequent loads are instant. Filesystem or custom backends (Qdrant, PostgreSQL).

Smart Context

Small documents included in full. Large documents use semantic passage retrieval. Automatic optimization per document.

Multi-Turn Dialogue

Follow-up questions maintain context. Natural conversation flow. Ask clarifying questions without re-explaining.

100% Local

All processing on your infrastructure. Documents never leave. Air-gapped deployments. HIPAA, GDPR, compliance-ready.

Agentic Capabilities

PdfChat is a fully customizable document agent. Connect external tools, maintain conversation memory, and integrate with MCP servers for extended functionality.

Complete Demo Application

A fully-featured console application demonstrating all capabilities, ready to run.

Chat with PDF Demo

Interactive console app that lets you load PDFs, ask questions, and see the full document Q&A pipeline in action with source references, generation stats, and real-time streaming.

  • Model selection with download progress
  • Standard or vision processing modes
  • Multi-document loading with caching
  • Interactive commands (/help, /status, /add)
  • Token counts and generation speed metrics
$ dotnet run
Select model (0-8 or custom URI): 2
Loading model... ████████ 100%
Processing mode: 1 (Vision)
Enter PDF path: report.pdf
✓ Loaded: 45 pages, passage retrieval
You: What was the Q4 revenue?
Retrieved 5 passages in 23ms
Assistant: Based on the Q4 financial report, revenue was $4.2M, representing 15% YoY growth...
→ Source: report.pdf, Page 12
Tokens: 156 | Speed: 42.3 tok/s

Built for Real-World Applications

Document intelligence that solves actual business problems.

Contract Analysis

Query legal agreements for specific clauses, obligations, termination conditions, and payment terms with full source attribution.

Financial Review

Ask questions about revenue, expenses, projections, and risk factors across multiple financial reports and statements.

Technical Documentation

Search manuals and specifications for configuration details, procedures, system requirements, and troubleshooting steps.

Research & Academia

Query research papers for methodology, findings, citations. Cross-reference multiple sources for literature reviews.

Compliance & Audit

Verify policy adherence with traceable source references. Generate audit trails with document and page attribution.

Customer Support

Build knowledge bases from product documentation. Answer customer questions automatically with grounded responses.

Choose Your Models

LM-Kit.NET supports a wide range of vision-capable chat models, embedding models, and specialized OCR models. Browse our model catalog to find the right combination for your use case, hardware, and accuracy requirements.

Browse Model Catalog

Key Classes

The building blocks for document Q&A applications.

PdfChat

High-level document agent for question-answering. Supports tool calling, conversation memory, MCP integration, and full customization.

View Documentation
DocumentRag

Lower-level document RAG engine with full control over processing modes, chunking, and retrieval parameters.

View Documentation
IVectorStore

Interface for embedding storage and caching. Use FileSystemVectorStore or implement custom backends.

View Documentation
VlmOcr

Vision-based document parser using VLMs. Preserves layout and structure as markdown output.

View Documentation

Ready to Build Document Intelligence?

The most advanced local document Q&A technology. Semantic RAG + layout analysis. 100% on your infrastructure.