Uses of Package
ai.doctruth
Packages that use ai.doctruth
Package
Description
Public API of DocTruth: auditable LLM extraction for Java.
Internal: audit-format exporters.
Internal citation-matching primitives.
Shared JSON-over-HTTP plumbing for the four LLM providers (Anthropic, OpenAI, Gemini,
DeepSeek).
Anthropic Messages-API HTTP client + wire records.
DeepSeek-specific HTTP plumbing for the
DeepSeekProvider.Hand-rolled Google Gemini
generateContent client per ADR 0003 (no vendor SDK on
the classpath).OpenAI Chat-Completions HTTP client + wire records.
Internal section-rendering helpers shared by Layer 2 (extraction) and Layer 3 (context
strategies).
Failsafe-backed retry/backoff helper used by every provider.
Internal JSON Schema generation for provider structured-output contracts.
-
Classes in ai.doctruth used by ai.doctruthClassDescriptionVisual / structural classification of a
TextSectionas detected by Layer 1 parsing — a geometric / typographic judgement, NOT a semantic one.The verifiable evidence anchor for a single extracted field.A confidence score for a single extracted field, plus a free-form rationale.How aParsedDocumentis rendered into the bounded context window of an LLM call.Public entry point for the library.Metadata for aParsedDocument: the source filename, total page count, and (optionally) the timestamp at which the source document was authored / published.Immutable fluent builder for one extraction call.Thrown from the public extraction API when an extraction run fails after exhausting retries or when an invariant is violated mid-flight.The output ofDocTruth.extract(...).run(): the extracted value plus per-field citations, per-field confidence scores, and run-level provenance.Immutable fluent builder for JSON Schema-driven extraction.Caller-supplied JSON Schema for schema-bound extraction.The Layer 2 backend abstraction: an LLM API client.What aPriorityTruncatestrategy does when the priority sections alone exceed the configuredmaxCharsbudget.A single section of a parsed source document.Thrown by Layer 1 document parsers (PDF / DOCX) when a source file cannot be parsed or when a structural invariant is violated.Bi-temporal provenance for anExtractionResult: the model that produced it, when the extraction ran, and (optionally) when the source document was authored, the region the extraction was processed in, and the retention horizon of the audit record.Supplemental provenance metadata kept behindProvenanceso the public provenance record stays small while preserving retry, data-residency, and retention semantics.Thrown by Layer 2 LLM providers (Anthropic, OpenAI, Gemini, DeepSeek) when an upstream call fails.Per-call knobs passed to anLlmProvideron every request.What the library hands anLlmProvideron every call: the system prompt, the user prompt (rendered from aParsedDocumentby the configuredContextStrategy), the JSON Schema for the target type, and the per-call options.What anLlmProviderreturns on a successful call: the raw JSON the LLM produced plus the per-callProviderUsage.Token-usage and model-version data returned by an LLM provider on every successful call.A 1-indexed page + line span into a parsed source document, plus a 0-indexed character offset into the source page text. -
Classes in ai.doctruth used by ai.doctruth.internal.auditClassDescriptionThe output of
DocTruth.extract(...).run(): the extracted value plus per-field citations, per-field confidence scores, and run-level provenance. -
Classes in ai.doctruth used by ai.doctruth.internal.citationClassDescriptionThe verifiable evidence anchor for a single extracted field.Thrown from the public extraction API when an extraction run fails after exhausting retries or when an invariant is violated mid-flight.
-
Classes in ai.doctruth used by ai.doctruth.internal.constraintClassDescriptionThrown from the public extraction API when an extraction run fails after exhausting retries or when an invariant is violated mid-flight.
-
Classes in ai.doctruth used by ai.doctruth.internal.httpClassDescriptionThrown by Layer 2 LLM providers (Anthropic, OpenAI, Gemini, DeepSeek) when an upstream call fails.
-
Classes in ai.doctruth used by ai.doctruth.internal.providers.anthropicClassDescriptionThrown by Layer 2 LLM providers (Anthropic, OpenAI, Gemini, DeepSeek) when an upstream call fails.What the library hands an
LlmProvideron every call: the system prompt, the user prompt (rendered from aParsedDocumentby the configuredContextStrategy), the JSON Schema for the target type, and the per-call options.What anLlmProviderreturns on a successful call: the raw JSON the LLM produced plus the per-callProviderUsage. -
Classes in ai.doctruth used by ai.doctruth.internal.providers.deepseekClassDescriptionThrown by Layer 2 LLM providers (Anthropic, OpenAI, Gemini, DeepSeek) when an upstream call fails.What the library hands an
LlmProvideron every call: the system prompt, the user prompt (rendered from aParsedDocumentby the configuredContextStrategy), the JSON Schema for the target type, and the per-call options.What anLlmProviderreturns on a successful call: the raw JSON the LLM produced plus the per-callProviderUsage. -
Classes in ai.doctruth used by ai.doctruth.internal.providers.geminiClassDescriptionThrown by Layer 2 LLM providers (Anthropic, OpenAI, Gemini, DeepSeek) when an upstream call fails.What the library hands an
LlmProvideron every call: the system prompt, the user prompt (rendered from aParsedDocumentby the configuredContextStrategy), the JSON Schema for the target type, and the per-call options.What anLlmProviderreturns on a successful call: the raw JSON the LLM produced plus the per-callProviderUsage. -
Classes in ai.doctruth used by ai.doctruth.internal.providers.openaiClassDescriptionThrown by Layer 2 LLM providers (Anthropic, OpenAI, Gemini, DeepSeek) when an upstream call fails.What the library hands an
LlmProvideron every call: the system prompt, the user prompt (rendered from aParsedDocumentby the configuredContextStrategy), the JSON Schema for the target type, and the per-call options.What anLlmProviderreturns on a successful call: the raw JSON the LLM produced plus the per-callProviderUsage. -
Classes in ai.doctruth used by ai.doctruth.internal.render
-
Classes in ai.doctruth used by ai.doctruth.internal.retryClassDescriptionThrown by Layer 2 LLM providers (Anthropic, OpenAI, Gemini, DeepSeek) when an upstream call fails.
-
Classes in ai.doctruth used by ai.doctruth.internal.schemaClassDescriptionThrown from the public extraction API when an extraction run fails after exhausting retries or when an invariant is violated mid-flight.