Set appropriate temperature and max_tokens defaults

This commit is contained in:
Yiorgis Gozadinos 2026-03-05 13:21:31 +02:00
parent 75642c8074
commit 3cc2d5e19e
No known key found for this signature in database
6 changed files with 20 additions and 4 deletions

View file

@ -3,6 +3,8 @@
### Changed ### Changed
- **Default model temperatures**: Set task-appropriate temperature defaults — 0.3 for QA, research, and title generation; 0.0 for RLM and picture description. Previously unset (provider defaults, typically 0.71.0).
- **Default title max_tokens**: Set `max_tokens=100` for title generation model to keep titles concise
- **Test suite cleanup**: Removed stale VCR cassettes, dead fixtures, orphaned directories, and redundant tests. Strengthened weak assertions across search, context enhancement, and converter tests. Relocated misplaced `SearchResult._get_primary_label` test to `test_search.py` - **Test suite cleanup**: Removed stale VCR cassettes, dead fixtures, orphaned directories, and redundant tests. Strengthened weak assertions across search, context enhancement, and converter tests. Relocated misplaced `SearchResult._get_primary_label` test to `test_search.py`
- **Parallel test execution**: Added `pytest-xdist` and enabled parallel test runs by default (`-n auto`), reducing test suite time from ~3.5 min to ~2 min - **Parallel test execution**: Added `pytest-xdist` and enabled parallel test runs by default (`-n auto`), reducing test suite time from ~3.5 min to ~2 min

View file

@ -85,6 +85,7 @@ qa:
provider: ollama provider: ollama
name: gpt-oss name: gpt-oss
enable_thinking: false enable_thinking: false
temperature: 0.3
max_iterations: 2 max_iterations: 2
max_concurrency: 1 max_concurrency: 1
@ -93,6 +94,7 @@ research:
provider: "" # Empty to use qa settings provider: "" # Empty to use qa settings
name: "" name: ""
enable_thinking: false enable_thinking: false
temperature: 0.3
max_iterations: 3 max_iterations: 3
max_concurrency: 1 max_concurrency: 1
@ -122,6 +124,8 @@ processing:
provider: ollama provider: ollama
name: gpt-oss name: gpt-oss
enable_thinking: false enable_thinking: false
temperature: 0.3
max_tokens: 100
conversion_options: conversion_options:
do_ocr: true do_ocr: true
force_ocr: false force_ocr: false
@ -156,7 +160,7 @@ custom_config = AppConfig(
model=ModelConfig( model=ModelConfig(
provider="openai", provider="openai",
name="gpt-4o", name="gpt-4o",
temperature=0.7 temperature=0.3
) )
), ),
embeddings=EmbeddingsConfig( embeddings=EmbeddingsConfig(

View file

@ -120,6 +120,7 @@ conversion_options:
model: model:
provider: ollama # ollama, openai, or custom provider: ollama # ollama, openai, or custom
name: ministral-3 # VLM model name name: ministral-3 # VLM model name
temperature: 0.0 # Default: 0.0 (factual descriptions)
timeout: 90 # Request timeout in seconds timeout: 90 # Request timeout in seconds
max_tokens: 200 # Maximum tokens in response max_tokens: 200 # Maximum tokens in response
``` ```

View file

@ -16,17 +16,17 @@ qa:
model: model:
provider: ollama provider: ollama
name: gpt-oss name: gpt-oss
temperature: 0.7 temperature: 0.3
max_tokens: 500 max_tokens: 500
``` ```
**Available options:** **Available options:**
- **temperature**: Sampling temperature (0.0-1.0+) - **temperature**: Sampling temperature (0.0-1.0+). Defaults vary by task: 0.3 for QA, research, and title generation; 0.0 for RLM and picture description.
- Lower (0.0-0.3): Deterministic, focused responses - Lower (0.0-0.3): Deterministic, focused responses
- Medium (0.4-0.7): Balanced - Medium (0.4-0.7): Balanced
- Higher (0.8-1.0+): Creative, varied responses - Higher (0.8-1.0+): Creative, varied responses
- **max_tokens**: Maximum tokens in response - **max_tokens**: Maximum tokens in response. Default: unset (provider default), except title generation (100).
- **enable_thinking**: Control reasoning behavior (see below) - **enable_thinking**: Control reasoning behavior (see below)
- **base_url**: Custom endpoint for OpenAI-compatible servers (vLLM, LM Studio, etc.) - **base_url**: Custom endpoint for OpenAI-compatible servers (vLLM, LM Studio, etc.)

View file

@ -32,6 +32,7 @@ qa:
provider: ollama provider: ollama
name: gpt-oss name: gpt-oss
enable_thinking: false enable_thinking: false
temperature: 0.3 # Default: 0.3
max_iterations: 2 # Maximum search iterations max_iterations: 2 # Maximum search iterations
max_concurrency: 1 # Concurrent search operations max_concurrency: 1 # Concurrent search operations
``` ```
@ -50,6 +51,7 @@ research:
provider: "" # Empty to use qa settings provider: "" # Empty to use qa settings
name: "" # Empty to use qa model name: "" # Empty to use qa model
enable_thinking: false enable_thinking: false
temperature: 0.3 # Default: 0.3
max_iterations: 3 max_iterations: 3
max_concurrency: 1 max_concurrency: 1
``` ```
@ -69,6 +71,7 @@ rlm:
model: model:
provider: anthropic provider: anthropic
name: claude-sonnet-4-20250514 name: claude-sonnet-4-20250514
temperature: 0.0 # Default: 0.0 (deterministic for code generation)
code_timeout: 60.0 # Max seconds for code execution code_timeout: 60.0 # Max seconds for code execution
max_output_chars: 50000 # Truncate output after this many chars max_output_chars: 50000 # Truncate output after this many chars
``` ```

View file

@ -76,6 +76,7 @@ class QAConfig(BaseModel):
provider="ollama", provider="ollama",
name="gpt-oss", name="gpt-oss",
enable_thinking=False, enable_thinking=False,
temperature=0.3,
) )
) )
max_iterations: int = 2 max_iterations: int = 2
@ -88,6 +89,7 @@ class ResearchConfig(BaseModel):
provider="ollama", provider="ollama",
name="gpt-oss", name="gpt-oss",
enable_thinking=False, enable_thinking=False,
temperature=0.3,
) )
) )
max_iterations: int = 3 max_iterations: int = 3
@ -100,6 +102,7 @@ class RLMConfig(BaseModel):
provider="ollama", provider="ollama",
name="gpt-oss", name="gpt-oss",
enable_thinking=False, enable_thinking=False,
temperature=0.0,
) )
) )
code_timeout: float = 60.0 code_timeout: float = 60.0
@ -114,6 +117,7 @@ class PictureDescriptionConfig(BaseModel):
default_factory=lambda: ModelConfig( default_factory=lambda: ModelConfig(
provider="ollama", provider="ollama",
name="ministral-3", name="ministral-3",
temperature=0.0,
) )
) )
timeout: int = 90 timeout: int = 90
@ -162,6 +166,8 @@ class ProcessingConfig(BaseModel):
provider="ollama", provider="ollama",
name="gpt-oss", name="gpt-oss",
enable_thinking=False, enable_thinking=False,
temperature=0.3,
max_tokens=100,
) )
) )