LLMs for Historical Document Workflows: Evaluation and Capability Limits
Evaluating large language models for historical document processing requires more than testing single-turn answers. This article examines a workflow spanning retrieval, downloading, local synchronization, conversion, and reading-page generation. It outlines evaluation metrics, evidence-based hallucination controls, structured failure handling, layered architecture, and model selection practices for building verifiable, recoverable, and auditable automation.
1. From Single-Turn Answers to End-to-End Automation
Whether an open large language model is suitable for a production workflow cannot be judged solely by the fluency of its answers or the breadth of its knowledge. What matters is its reliability across a sequence such as retrieval, downloading, local synchronization, format conversion, and reading-page generation.
The central trade-offs fall into three categories:
- Broad knowledge supports exploration and source discovery.
- Weak factual constraints allow hallucinations to propagate.
- Limitations in safety handling and workflow orchestration can interrupt execution.
Historical document processing involves many steps, states, and external dependencies. The model must interpret ambiguous requests, invoke tools, handle failures, preserve citations, and produce verifiable results. Evaluation should therefore shift from “Does the answer sound convincing?” to “Can the workflow finish, can the results be verified, and can failures be recovered?”
Strong performance in open-ended question answering does not guarantee reliable batch document processing. Conversely, a model that performs reliably in a multi-step workflow may not be the strongest option for every exploratory knowledge task.
2. Workflow Stages and Key Constraints
A typical pipeline has five stages, each with distinct requirements.
- Request interpretation and retrieval planning: Translate a natural-language request into executable queries and define the search scope. Risks include excessive exploration, missed constraints, and references to nonexistent sources.
- Downloading and deduplication: Handle retries, rate limits, resumable downloads, and duplicate-content detection. The model must return structured status information rather than fabricate successful downloads.
- Local synchronization and version management: Record source locations, timestamps, hashes, and conversion status. Outputs must be auditable, and existing files must not be overwritten unintentionally.
- Format conversion and metadata extraction: Identify document structure, titles, authors, dates, chapters, and other fields. This stage is particularly vulnerable to plausible but incorrect extraction.
- Reading-page generation and indexing: Organize document text, citations, tables of contents, and tags into searchable pages. The model must distinguish fields taken from the source from those inferred.
The workflow should be implemented as a state machine rather than a single prompt. Every step needs defined inputs, outputs, validation, and failure branches. The model should handle language understanding and planning, while deterministic operations belong in the tool layer.
3. Evaluation: Turning Impressions into Metrics
Practical evaluation should use a small gold-standard task set that covers real workloads. At minimum, it should assess the following dimensions:
| Dimension | What to observe | Engineering significance |
|---|---|---|
| Knowledge breadth | Can the model suggest useful retrieval directions? | Affects source discovery efficiency |
| Factual consistency | Are outputs tied to verifiable sources? | Reduces hallucinations entering downstream stages |
| Citation traceability | Does each conclusion have a source? | Supports human verification |
| Refusal boundaries | Are compliance issues or uncertainty handled as structured failures? | Prevents silent workflow interruptions |
| Tool orchestration | Can the model call tools as planned and handle their responses? | Determines automation completion rates |
| Structured output | Are fields stable and parseable? | Affects integration effort |
| Recovery capability | Can the model propose an alternative after a failure? | Reduces manual intervention |
| Long-context stability | Are constraints preserved across multiple documents? | Affects batch-processing quality |
Success rate alone is insufficient. Evaluators should also track the distribution of error types. Factual errors, missing citations, formatting failures, refusal-related interruptions, and incorrect tool-call arguments require different safeguards.
For historical document workflows, missing citations and factual errors are more serious than awkward wording: they can contaminate downstream indexes and reading pages.
4. Hallucination Control Through Retrieval and Evidence Binding
A prompt that simply says “Do not fabricate” is not an adequate hallucination-control strategy. A more practical approach constrains the model to supplied context and separates outputs into conclusions, evidence, and confidence.
During retrieval, tools first return candidate source passages. The model summarizes only those passages. When evidence is insufficient, it should report that limitation rather than fill the gap. Metadata extraction should include a source location for each field, and uncertain fields should be marked for review.
The following pseudocode illustrates this approach:
def verified_extract(task, retrieved_chunks):prompt = build_prompt(task=task,chunks=retrieved_chunks,rules=["Use only the provided chunks","Provide an evidence location for every field","Return UNKNOWN when evidence is insufficient"])result = model.generate(prompt, response_format="structured")for field in result.fields:if not field.evidence_id:field.status = "NEED_REVIEW"elif field.evidence_id not in retrieved_chunks:field.status = "INVALID_EVIDENCE"return result
Evidence binding should be supplemented with cross-validation:
- Facts supported by multiple independent passages can enter the high-confidence category.
- Facts supported by a single passage should be queued for review.
- Facts without supporting passages should not enter the index.
For batch tasks, begin with sampled human review, then adjust prompts and validation rules according to the observed error types.
Caching and audit logs are also important. Record the model version, prompt version, input hash, output hash, and human edits to support regression testing and accountability.
5. Refusals and Flexibility: Making Interruptions Explicit
Defensive refusals are a common risk in multi-step automation. A model may stop because of compliance concerns, copyright restrictions, or uncertainty. The system still needs to know why it stopped, which step failed, and whether another route is available.
The objective is not to make the model ignore risks, but to classify them:
- Clearly prohibited requests should be refused.
- Requests with compliance concerns but permissible alternatives should receive an alternative.
- Requests with insufficient information should produce clarification questions.
- Tool failures should produce retry recommendations.
The workflow should require a structured failure object containing the failed step, reason category, completed artifacts, recommended action, and whether human intervention is needed. The scheduler can then decide whether to retry, fall back, or escalate to a person. Even a conservative model need not leave the pipeline silently stalled.
Retrieval planning can also use two modes:
- Exploration mode: Allows the model to propose multiple search directions.
- Convergence mode: Requires outputs to be grounded in retrieved evidence.
Switching between these modes balances broad discovery with factual constraints.
6. Architecture: Separate Models, Tools, and Auditing
A layered architecture provides clear responsibilities:
- Model layer: Planning, extraction, summarization, and failure explanation.
- Tool layer: Retrieval, downloading, synchronization, format conversion, and index writes.
- Audit layer: Logging, monitoring, version tracking, and human review.
In a cloud deployment, object storage can hold original documents and converted artifacts. Message queues can decouple retrieval and conversion tasks, container platforms can host tool services, and logging and monitoring services can support auditing and alerts.
The source architecture identifies Baidu AI Cloud object storage as one option for storing documents and conversion outputs. The essential design principle, however, is the separation of capabilities and responsibilities—not dependence on a specific provider.
The scheduler should maintain a task state machine with states such as:
- Awaiting planning
- Retrieving
- Awaiting download
- Synchronized
- Converting
- Awaiting review
- Published
- Failed
Every state transition should be written to an audit log. Idempotency keys should be retained to prevent duplicate downloads and conversions.
Model outputs must pass schema validation before advancing to the next state. For high-risk fields, cross-extraction using two models or two prompts, followed by rule-based validation, can reduce dependence on a single extraction result.
7. Practical Testing and Model Selection
Testing should use real tasks rather than demonstration examples. A recommended gold-standard set contains 50–200 tasks covering:
- Single-document extraction
- Multi-document synthesis
- Ambiguous retrieval requests
- Failure recovery
- Compliance boundaries
Combine automated metrics with sampled human review. Automated evaluation should measure structured-output parsing rates, citation coverage, and success rates after retries. Human review should assess factual error rates and readability.
Run the regression set after every model or prompt change, and record how the error distribution changes.
Model selection should not assume that one model will excel at every stage. A routing strategy is more reliable:
- Assign exploration and retrieval planning to models with broad knowledge coverage.
- Assign structured extraction to models that follow constraints and produce stable outputs.
- Add rule engines and human review to high-risk steps.
When a step fails, use a progressive fallback sequence: retry, change the prompt, switch models, and then escalate to human review.
Cost and latency also belong in the evaluation. In batch processing, token cost per document, retry rate, and human-review rate jointly determine total cost.
8. Conclusion
The decisive factor in using open models for historical document workflows is not how impressive a single answer appears. It is whether the system preserves verifiable facts, supports failure recovery, and produces auditable outputs throughout a multi-step process.
Broad knowledge is useful for exploration and retrieval planning, but it needs constraints through retrieval augmentation, evidence binding, and confidence classification. Refusals should become explicit workflow branches through structured failure objects and alternative paths. Tool orchestration and state-machine design determine whether automation can complete reliably.
Embedding model capabilities in a layered architecture—and continuously testing them against a gold-standard task set—is how a document-processing system moves from occasional usefulness to dependable operation.
