Update docs

This commit is contained in:
Yiorgis Gozadinos 2026-01-07 10:53:45 +02:00
parent f861664656
commit 248eed8d7b
No known key found for this signature in database
6 changed files with 46 additions and 5 deletions

View file

@ -1,6 +1,15 @@
# Changelog # Changelog
## [Unreleased] ## [Unreleased]
### Added
- **VLM Picture Description**: Describe embedded images using Vision Language Models during document conversion
- Images are sent to a VLM for automatic description via OpenAI-compatible API
- Descriptions become searchable text, improving RAG retrieval for visual content
- Configure via `processing.conversion_options.picture_description` with `enabled`, `model`, `timeout`, `max_tokens`
- Default prompt customizable via `prompts.picture_description`
- Requires OpenAI-compatible `/v1/chat/completions` endpoint (Ollama, OpenAI, vLLM, LM Studio)
## [0.23.2] - 2026-01-05 ## [0.23.2] - 2026-01-05
### Fixed ### Fixed

View file

@ -113,6 +113,8 @@ conversion_options:
- **timeout**: Request timeout in seconds - **timeout**: Request timeout in seconds
- **max_tokens**: Maximum tokens in the VLM response - **max_tokens**: Maximum tokens in the VLM response
**Note:** Requires an OpenAI-compatible `/v1/chat/completions` endpoint. Providers with different API formats (e.g., Anthropic Claude) are not supported.
**Default prompt** (configured in `prompts.picture_description`): **Default prompt** (configured in `prompts.picture_description`):
``` ```
@ -165,6 +167,13 @@ conversion_options:
3. Descriptions are added as annotations on the image 3. Descriptions are added as annotations on the image
4. When exported to markdown, descriptions appear as searchable text 4. When exported to markdown, descriptions appear as searchable text
**Using with docling-serve:**
When using `converter: docling-serve`, the VLM calls are made by the docling-serve instance, not by haiku.rag. You must:
1. Set `DOCLING_SERVE_ENABLE_REMOTE_SERVICES=true` when running docling-serve
2. Ensure the VLM endpoint is accessible from where docling-serve is running
### Local vs Remote Processing ### Local vs Remote Processing
**Local processing** (default): **Local processing** (default):
@ -190,7 +199,6 @@ providers:
docling_serve: docling_serve:
base_url: http://localhost:5001 base_url: http://localhost:5001
api_key: "your-api-key" # Optional api_key: "your-api-key" # Optional
timeout: 300 # Request timeout in seconds
``` ```
Conversion options work identically for both local and remote processing. Conversion options work identically for both local and remote processing.

View file

@ -16,6 +16,9 @@ prompts:
# Full replacement for research synthesis prompt (optional) # Full replacement for research synthesis prompt (optional)
synthesis: null synthesis: null
# VLM prompt for image description during conversion (optional)
picture_description: null # Uses default prompt
``` ```
## Domain Preamble ## Domain Preamble
@ -92,6 +95,29 @@ prompts:
- Avoid meta-commentary like "This report covers..." - Avoid meta-commentary like "This report covers..."
``` ```
## Picture Description Prompt
Customize the prompt used when generating VLM descriptions for embedded images during document conversion. This prompt is sent to the configured Vision Language Model for each image.
**Default prompt:**
```
Describe this image for a blind user. State the image type (screenshot, chart, photo, etc.),
what it depicts, any visible text, and key visual details. Be concise and accurate.
```
**Custom example:**
```yaml
prompts:
picture_description: |
Describe this image for a document search system.
Focus on: image type, main content, any text, key visual elements.
Be concise and factual.
```
The prompt is used when `processing.conversion_options.picture_description.enabled` is `true`. See [Picture Description (VLM)](processing.md#picture-description-vlm) for full configuration.
## Programmatic Configuration ## Programmatic Configuration
```python ```python
@ -103,6 +129,7 @@ config = AppConfig(
domain_preamble="You are answering questions about our product documentation.", domain_preamble="You are answering questions about our product documentation.",
qa=None, # Use default QA prompt qa=None, # Use default QA prompt
synthesis=None, # Use default synthesis prompt synthesis=None, # Use default synthesis prompt
picture_description="Describe this image for search indexing.",
) )
) )
``` ```

View file

@ -55,8 +55,7 @@ processing:
providers: providers:
docling_serve: docling_serve:
base_url: http://localhost:5001 base_url: http://localhost:5001
api_key: "" # Optional API key for authentication api_key: "" # Optional API key for authentication
timeout: 300 # Request timeout in seconds
``` ```
## Features ## Features

View file

@ -12,7 +12,6 @@ providers:
docling_serve: docling_serve:
base_url: http://docling-serve:5001 base_url: http://docling-serve:5001
api_key: "" api_key: ""
timeout: 300
ollama: ollama:
base_url: http://host.docker.internal:11434 base_url: http://host.docker.internal:11434

View file

@ -24,7 +24,6 @@ providers:
docling_serve: docling_serve:
base_url: http://docling-serve:5001 base_url: http://docling-serve:5001
api_key: "" api_key: ""
timeout: 300
ollama: ollama:
base_url: http://host.docker.internal:11434 base_url: http://host.docker.internal:11434