chore(wren-ai-service): minor updates#1389
Conversation
WalkthroughThis pull request adds two new boolean configuration settings— Changes
Sequence Diagram(s)sequenceDiagram
participant Config as Settings
participant Service as HistoricalQuestionRetrieval
participant Filter as ScoreFilter
Config->>Service: Provide historical_question_retrieval_similarity_threshold (default 0.9)
Service->>Filter: Invoke score filtering with dynamic threshold
Filter-->>Service: Return filtered documents
Possibly related PRs
Suggested Reviewers
Poem
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (4)
wren-ai-service/docs/config_examples/config.deepseek.yaml (1)
153-153: Remove Trailing Spaces
Line 153 contains trailing spaces that may potentially cause YAML parsing issues. Please remove them to ensure strict YAML compliance.Apply this diff:
- allow_sql_generation_reasoning: true + allow_sql_generation_reasoning: true🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 153-153: trailing spaces
(trailing-spaces)
wren-ai-service/docs/config_examples/config.groq.yaml (1)
134-135: New Settings with Formatting Cleanup
The new flagsallow_intent_classification: trueandallow_sql_generation_reasoning: truehave been added as expected. However, line 135 includes trailing spaces that should be removed to maintain proper YAML formatting.Apply this diff:
- allow_sql_generation_reasoning: true + allow_sql_generation_reasoning: true🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 135-135: trailing spaces
(trailing-spaces)
wren-ai-service/docs/config_examples/config.google_ai_studio.yaml (1)
141-142: Google AI Studio Config: New Settings and Trailing Space Removal
The configuration now includesallow_intent_classification: trueandallow_sql_generation_reasoning: trueas required. Please remove the trailing spaces on line 142 to ensure consistency with YAML format standards.Apply this diff:
- allow_sql_generation_reasoning: true + allow_sql_generation_reasoning: true🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 142-142: trailing spaces
(trailing-spaces)
wren-ai-service/docs/config_examples/config.azure.yaml (1)
142-143: Remove trailing spaces in configuration setting.The configuration settings look good, but there are trailing spaces after
allow_sql_generation_reasoning: truethat should be removed for consistency.- allow_sql_generation_reasoning: true + allow_sql_generation_reasoning: true🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 143-143: trailing spaces
(trailing-spaces)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (13)
deployment/kustomizations/base/cm.yaml(1 hunks)docker/config.example.yaml(1 hunks)wren-ai-service/docs/config_examples/config.azure.yaml(1 hunks)wren-ai-service/docs/config_examples/config.deepseek.yaml(1 hunks)wren-ai-service/docs/config_examples/config.google_ai_studio.yaml(1 hunks)wren-ai-service/docs/config_examples/config.groq.yaml(1 hunks)wren-ai-service/docs/config_examples/config.ollama.yaml(1 hunks)wren-ai-service/src/config.py(1 hunks)wren-ai-service/src/globals.py(1 hunks)wren-ai-service/src/pipelines/retrieval/historical_question.py(0 hunks)wren-ai-service/src/pipelines/retrieval/historical_question_retrieval.py(4 hunks)wren-ai-service/tools/config/config.example.yaml(1 hunks)wren-ai-service/tools/config/config.full.yaml(1 hunks)
💤 Files with no reviewable changes (1)
- wren-ai-service/src/pipelines/retrieval/historical_question.py
🧰 Additional context used
🪛 YAMLlint (1.35.1)
wren-ai-service/docs/config_examples/config.groq.yaml
[error] 135-135: trailing spaces
(trailing-spaces)
wren-ai-service/docs/config_examples/config.google_ai_studio.yaml
[error] 142-142: trailing spaces
(trailing-spaces)
wren-ai-service/docs/config_examples/config.azure.yaml
[error] 143-143: trailing spaces
(trailing-spaces)
wren-ai-service/docs/config_examples/config.deepseek.yaml
[error] 153-153: trailing spaces
(trailing-spaces)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: pytest
- GitHub Check: Analyze (go)
- GitHub Check: pytest
🔇 Additional comments (12)
docker/config.example.yaml (1)
139-140: New Configuration Settings Added Correctly
The new settingsallow_intent_classification: trueandallow_sql_generation_reasoning: trueare added under thesettingssection as intended. These additions align well with the PR objectives by enabling specific features for intent classification and SQL generation reasoning.wren-ai-service/docs/config_examples/config.ollama.yaml (1)
131-132: Intent Classification and SQL Generation Reasoning Settings Added
The configuration now includes the new flagsallow_intent_classification: trueandallow_sql_generation_reasoning: truein thesettingssection. This change is consistent with similar updates in related configuration files and improves feature toggling as intended.wren-ai-service/docs/config_examples/config.deepseek.yaml (1)
152-153: New Configuration Options for DeepSeek
The settingsallow_intent_classification: trueandallow_sql_generation_reasoning: trueare added to enhance configurability for intent classification and SQL generation reasoning. This update is correctly placed under thesettingssection and is consistent with similar changes across the codebase.🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 153-153: trailing spaces
(trailing-spaces)
deployment/kustomizations/base/cm.yaml (1)
187-188: Looks good - configuration options added successfully.These new configuration settings enable important features in the Wren AI service - intent classification and SQL generation reasoning capabilities.
wren-ai-service/tools/config/config.example.yaml (1)
157-158: Configuration options properly added to example config.The new settings align with the PR objective to enable intent classification and SQL generation reasoning features.
wren-ai-service/tools/config/config.full.yaml (1)
158-159: Configuration options properly added to full config.The new settings are consistently added across all configuration files, ensuring uniform feature availability throughout the system.
wren-ai-service/src/config.py (1)
33-33: Well-placed new configuration parameter for similarity threshold.The addition of
historical_question_retrieval_similarity_thresholdwith a default value of 0.9 successfully exposes this parameter in the configuration, making it more accessible as intended in the PR objectives. This enhances the flexibility of the document retrieval process.wren-ai-service/src/globals.py (1)
89-89: LGTM! Good parameterization of the similarity threshold.This change correctly passes the similarity threshold configuration from settings to the HistoricalQuestionRetrieval class, enabling dynamic configuration instead of using a hardcoded value.
wren-ai-service/src/pipelines/retrieval/historical_question_retrieval.py (4)
105-114: Good improvement to the filtered_documents function.The function now accepts the similarity threshold as a parameter instead of using a hardcoded value, making it more configurable. This allows adjusting retrieval sensitivity at runtime through configuration.
137-137: LGTM! Appropriate default value.Adding the parameter with a sensible default of 0.9 maintains backward compatibility while enabling configuration.
159-161: Good separation of configuration from components.Storing the threshold in a separate
_configsdictionary is a clean approach that keeps configuration values separate from component instances.
176-176: LGTM! Properly passing configuration to pipeline execution.The configuration is correctly unpacked into the pipeline inputs, ensuring the threshold is available during execution.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
allow_intent_classification: trueandallow_sql_generation_reasoning: trueto config.yamlhistorical_question_retrieval_similarity_thresholdin config.pySummary by CodeRabbit