Citations
Document, page, passage
Every claim carries document, page and passage, so a reader checks it against the original instead of trusting it.
Policies, manuals, contracts and support archives hold the answers; staff find them by asking whoever remembers. Ask the corpus instead, and get the page.
Four stages, all inside your infrastructure. Nothing ships out to be embedded, indexed or answered.
01
PDF, Office, email and scans become clean text with structure intact.
02
Chunks embed locally into the built-in store, or Qdrant and pgvector.
03
Hybrid retrieval grounds a local model; answers come from passages.
04
Each answer carries document, page and score for one-click verification.
An internal search tool survives only if people can verify it. Three properties make that the default.
Citations
Every claim carries document, page and passage, so a reader checks it against the original instead of trusting it.
Refusal
When the corpus does not support an answer, that is the answer, stated plainly rather than papered over with confidence.
Scoring
Retrieval score and strategy per hit, so a poor answer is diagnosed and tuned rather than argued about.
Wording matters for a part number, meaning matters for a policy question. Run either, or both fused.
Lexical
BM25 with language-aware analysis, so part numbers, clause references and product codes match exactly as typed.
Semantic
Vector retrieval for questions asked in different words from the source, which is most questions about an unread policy.
Hybrid
Both arms fused by reciprocal rank or normalized score, then reranked; recency, diversity and per-document collapse are request switches.
The stack that usually takes three vendors comes up with the product.
Storage
Full-text and vector search run on a local cluster that ships with the product; PostgreSQL with pgvector and Qdrant are supported too.
Boundary
Corpus, chunks and vectors are all local. Nothing ships out to be embedded, the step that quietly breaks residency requirements.
Assistants
An external assistant queries the corpus through a governed MCP tool and receives ranked passages, never the filesystem or the whole collection.
Assistants working this corpus through MCP have their own use case.
Load documents, ask in natural language, get grounded answers with page citations. The server exposes the same over HTTP and MCP.
using LMKit.Model;
using LMKit.Retrieval;
var chatModel = LM.LoadFromModelID("qwen3.5:9b");
var embedModel = LM.LoadFromModelID("embeddinggemma-300m");
using var chat = new PdfChat(chatModel, embedModel);
await chat.LoadDocumentAsync("employee-handbook.pdf");
await chat.LoadDocumentAsync("it-security-policy.pdf");
await chat.LoadDocumentAsync("data-retention-policy.pdf");
var answer = await chat.SubmitAsync(
"How long do we retain applicant data?");
Console.WriteLine(answer.Response.Completion);
// Grounded answer with passage retrieval and page citations.
# The same grounded answer from LM-Kit One's search service.
curl http://your-server:5189/lmkit/v1/search/answer \
-H "Authorization: Bearer your-server-token" \
-H "Content-Type: application/json" \
-d '{"clusterId":"internal","tenantId":"<org-tenant-id>",
"collectionId":"<policies-id>",
"question":"How long do we retain applicant data?"}'
# answer + citations[] + groundednessScore + unsupportedClaims
The high-level document conversation: a session that holds the loaded document across questions, with follow-ups, history control, and clean teardown.
curl http://your-server:5189/lmkit/v1/chat-with-document \
-H "Authorization: Bearer your-server-token" \
-H "Content-Type: application/json" \
-d '{"sessionId":"policy-review",
"input":"<file id from /lmkit/v1/files>",
"inputFormat":"FileIdentifier",
"question":"How long do we retain applicant data?"}'
# Follow-up questions reuse the session; the document stays loaded.
The corpus pipeline composes documented capabilities you can inspect on their own.
Answer
Conversational retrieval with citations, four query modes, streaming.
How RAG chat worksStore
Embedded storage that ships with the product; Qdrant and pgvector supported.
How storage worksConvert
PDF, Office, email, and scans become clean, structured, indexable text.
How conversion worksThen scale
When several teams and tools need the same retrieval, LM-Kit One's search service turns this pipeline into a governed, multi-collection backend on the database you already run.
The enterprise search use caseYou check it, quickly. Every answer cites document, page, and passage with its retrieval score, and when the corpus does not support an answer, the system says so instead of improvising. Trust comes from verifiability, not from tone.
PDF, Office documents, email, HTML, Markdown, and scans. Conversion and OCR normalize everything to structured text before indexing, so a scanned policy answers questions as well as a born-digital one.
On your infrastructure, next to the documents. Nothing ships out to be embedded or indexed, which is the step that quietly breaks data-residency requirements in hosted knowledge tools.
The same engine scales two ways: keep it embedded with LM-Kit.NET for a single application, or deploy LM-Kit One and let its search service host per-team collections with grants, audit, and horizontal scaling.
Private Document Intelligence