How pdf-tools/smart-extract-samples works
Smart Extract is a Docker-packaged PDF extraction product. Users upload a PDF, choose or build a schema, submit it to the extraction API, and review structured results with confidence scores and source bounding boxes. The README documents batch and streaming endpoints, configurable Ollama/vLLM inference, and observability through metrics, logs, and traces. The repository contains deployment and monitoring configuration rather than worker or UI implementation source, so those product components have no source path; documented relationships are cited to the README.
Main entry points: grafana-dashboards.yaml Grafana dashboards · prometheus.yaml Prometheus · loki.yaml Loki · tempo.yaml Tempo
Components 14
Extraction experience
- Web UI
- Schema presets
samples/schemas - Extraction results
Extraction runtime
- Extraction API
- Batch endpoint
api-examples/python/extract.py - Streaming endpoint
api-examples/python/extract_stream.py
Inference engines
- Docker Ollama
docker-compose/ollama/docker-compose.yml - Host Ollama
docker-compose/ollama-local/docker-compose.yml - vLLM
docker-compose/vllm/docker-compose.yml
Observability
- Prometheus
infra/prometheus.yaml - Loki
infra/loki.yaml - Tempo
infra/tempo.yaml - Grafana dashboards
infra/grafana-dashboards.yaml
Other components
- Document user
Connections 13
- Document user → Web UI: uploads PDF
README.md - Document user → Schema presets: chooses schema
README.md - Web UI → Extraction API: submits extraction
README.md - Extraction API → Extraction results: returns results
README.md - Extraction API → Docker Ollama: runs inference
README.md - Extraction API → Host Ollama: runs inference
README.md - Extraction API → vLLM: runs inference
README.md - Extraction API → Prometheus: exports metrics
README.md - Extraction API → Loki: sends logs
README.md - Extraction API → Tempo: sends traces
README.md - Prometheus → Grafana dashboards: feeds dashboards
README.md - Loki → Grafana dashboards: feeds dashboards
README.md - Tempo → Grafana dashboards: feeds dashboards
README.md