Repository navigation
examples: let the config file set temperature and max_tokens - #50
Merged
Merged
Conversation
--temperature and --max-tokens defaulted to 1.0 and 128, so they always replaced the values in the config file. They now default to None: a flag given on the command line overrides the config, the config's per-method and global llm settings apply otherwise, and 1.0 / 128 remain the fallback when neither sets them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BeF2TLoADWshUg9C6LuSid
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
In the example pipeline (
pipeline.py,reformulate_queries.py),--temperatureand--max-tokensdefaulted to1.0and128. Those defaults were neverNone, so they always replaced the values from--config, and per-method LLM settings inreformulation_config.yamlnever took effect.The flags now default to
None. Precedence is:--temperature/--max-tokenson the command linellm, then globalllm)1.0/128when neither sets themResolved settings
--config,genqr(config: 0.8 / 256)--config,hyde(config: 0.7 / 512)--config,query2doc(global: 1.0 / 128)--config+--temperature 0.3,genqr--config--config+--max-tokens 64Same results for both
pipeline.pyandreformulate_queries.py.Changes
utils.py:DEFAULT_TEMPERATURE/DEFAULT_MAX_TOKENS(1.0 / 128)pipeline.py,reformulate_queries.py: flags default toNone; fallback applied only when neither the CLI nor the config sets a valueREADME.md: flag descriptions note that they override the config fileTesting
pytest: 139 passedllm_configchecked for every row above in both scripts🤖 Generated with Claude Code
https://claude.ai/code/session_01BeF2TLoADWshUg9C6LuSid