# Warning: seed parameter may not produce deterministic results with temperature close to 0

- **ID:** `llm/seed-parameter-ignored-with-low-temp`
- **Domain:** llm
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 75%

## Root Cause

Even with temperature=0, some LLM providers (e.g., OpenAI) do not guarantee full determinism due to GPU non-determinism, batching, or model updates, and seed is only a best-effort hint.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| openai-python>=1.0.0 | active | — | — |
| gpt-4-turbo-2024-04-09 | active | — | — |
| gpt-3.5-turbo-0125 | active | — | — |

## Workarounds

1. **Accept non-determinism and implement idempotency in your application logic. For testing, compare outputs using fuzzy matching or semantic similarity instead of exact equality.** (85% success)
   ```
   Accept non-determinism and implement idempotency in your application logic. For testing, compare outputs using fuzzy matching or semantic similarity instead of exact equality.
   ```
2. **Use a self-hosted model (e.g., Llama 3 with vLLM) where you can control CUDA determinism flags: `export CUBLAS_WORKSPACE_CONFIG=:4096:8` and set `torch.use_deterministic_algorithms(True)`.** (90% success)
   ```
   Use a self-hosted model (e.g., Llama 3 with vLLM) where you can control CUDA determinism flags: `export CUBLAS_WORKSPACE_CONFIG=:4096:8` and set `torch.use_deterministic_algorithms(True)`.
   ```
3. **Log the full request parameters and response ID for reproducibility; retry with same parameters if output is anomalous.** (70% success)
   ```
   Log the full request parameters and response ID for reproducibility; retry with same parameters if output is anomalous.
   ```

## Dead Ends

- **** — This is the standard approach but still fails; the warning indicates it's not a configuration issue but a platform limitation. (60% fail)
- **** — All seeds behave identically; the non-determinism is inherent to the API, not seed-specific. (90% fail)
- **** — Streaming vs non-streaming both exhibit the same non-determinism at the output level. (80% fail)
