Marker-Inc-Korea / AutoRAG

AutoRAG: An Open-Source Framework for Retrieval-Augmented Generation (RAG) Evaluation & Optimization with AutoML-Style Automation
https://auto-rag.com/
Apache License 2.0
2.78k stars 217 forks source link

[BUG] Invalid temperature values in full.yaml. #946

Closed ImaadHasan2002 closed 1 week ago

ImaadHasan2002 commented 1 week ago

Description of the Bug

The temperature parameter was set as a list with values [0.5, 1.0, 1.5], which includes an invalid value (1.5). Since valid temperature values must be within the range of 0–1, this caused a validation error when running the code.

To Reproduce:

Steps to reproduce the behavior:

Expected Behavior

The temperature parameter should only contain values within the range of 0–1.

Full Error Log

ValidationError: 1 validation error for OpenAI temperature Input should be less than or equal to 1 [type=less_than_equal, input_value=1.5, input_type=float]

Code that bug is happened

Desktop:

Additional Context

To fix the issue, consider limiting the list to values within the 0–1 range, e.g., [0.5, 1.0], or use a single value if a range is not required.

vkehfdl1 commented 1 week ago

Hi, @ImaadHasan2002 At OpenAI temperature setting, 0 to 2 is valid settings for temperature.

https://platform.openai.com/docs/api-reference/chat/create#chat-create-temperature

temperature
number or null

Optional
Defaults to 1
What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.

We generally recommend altering this or top_p but not both.

The official api docs say like this.

Since it is not an bug, I will close this issue. Thank you.