7e706793fa
- Add AGENTS.md and project-specific Zed skills (odoo-ocr-pipeline, odoo-xml-import, local-vlm-client). - Implement Pydantic schemas for documents, invoices, review results, and VLM responses. - Add unified BaseVLMClient with Ollama implementation and llama.cpp stub. - Build pipeline stages: loader, classifier, digital_pdf/scanned_print/handwritten/mixed_unknown branches, extractor, reviewer, xml_builder. - Add CLI entry point with sidecar JSON and confidence-gated XML output. - Include prompts for classifier, OCR, extraction, and review models. - Add tests with FakeVLMClient; pytest, ruff, and mypy all pass.
17 lines
660 B
Plaintext
17 lines
660 B
Plaintext
You are a document classifier for an invoice OCR system. Given an image of a document, classify it into exactly one of these categories:
|
|
|
|
- digital_pdf: a native digital PDF or clean computer-generated invoice with embedded text.
|
|
- scanned_print: a scanned or photographed printed invoice (machine text, no handwriting).
|
|
- handwritten: a handwritten invoice or receipt.
|
|
- mixed_unknown: ambiguous, damaged, or mixed-content document.
|
|
|
|
Respond with a single JSON object and nothing else. Use this exact schema:
|
|
|
|
{
|
|
"category": "scanned_print",
|
|
"confidence": 0.92,
|
|
"reasoning": "brief one-sentence reason"
|
|
}
|
|
|
|
confidence must be a float between 0.0 and 1.0.
|