Commit Graph

6 Commits

Author SHA1 Message Date
Arsham Mirehvandi
d42fe18a52 Refactor advisory generation and update database schema
- Updated `config.yaml` to change the advice storage table from `advice` to `advisories` and adjusted the `thinking_budget` from 11264 to 9216.
- Modified `README.md` to reflect the new `advisories` table in the advisory generation process.
- Refactored SQL queries in `batch.py`, `job.py`, and `advice_context.py` to align with the new table structure.
- Enhanced the advice generation logic in `advice.py` to accommodate changes in the data model, including updates to the JSON structure for advice output.
- Updated relevant functions and documentation to ensure consistency across the codebase regarding the new advisory schema.
2026-09-30 14:43:08 +02:00
Arsham Mirehvandi
ded1ba5fd0 Update treatment interval handling and refine advice generation logic
- Increased `thinking_budget` in `config.yaml` from 9216 to 11264 to enhance LLM performance.
- Clarified conditions for including `last_applied_treatment` in the advice JSON structure, ensuring it is appended even when `allowed_products` is empty.
- Refactored product filtering logic in `products.py` to implement a new function for checking if the treatment interval is open, improving the accuracy of product recommendations.
- Updated unit tests to validate the new treatment interval logic and ensure correct behavior in various scenarios.
2026-09-22 09:57:06 +02:00
Arsham Mirehvandi
884d42e125 Update weather metrics handling and LLM configuration
- Adjusted `max_tokens` in `config.yaml` for LLM models to optimize performance, setting `gpt-4o-mini` to 2048 and `gpt-4o` to 5120.
- Enhanced `assemble.py` to include a new `_weather_fields` function for improved metric handling, ensuring consistent data formatting across weather forecasts.
- Updated SQL queries in `weather.py` to incorporate additional wind speed metrics, enhancing the data model for weather analysis.
- Expanded query synthesis documentation in `_default.md` to include conditions for wind speed variations, improving advisory generation logic.
- Added unit tests in `test_assemble.py` to validate wind speed handling in weather forecasts and ensure robustness of the advisory generation process.
2026-09-17 14:05:50 +02:00
Arsham Mirehvandi
958a17bb1f Enhance LLM configuration with thinking budget support
- Added optional `thinking_budget` parameter to `config.yaml` for Gemini model, allowing for reserved thinking tokens.
- Updated `LlmSettings` class in `config.py` to include `thinking_budget` and adjusted parsing logic accordingly.
- Modified LLM call logic in `llm.py` to utilize `thinking_budget` for calculating `max_output_tokens`, improving output management.
2026-09-17 09:44:04 +02:00
Arsham Mirehvandi
e588d97e0f Add observability support with OpenTelemetry tracing integration
- Updated .env.example and config.yaml to include observability settings.
- Added a new Phoenix service in docker-compose.yml for self-hosted tracing.
- Enhanced README.md with instructions on enabling and using observability features.
- Implemented tracing in the pipeline, including job spans and LLM stage spans.
- Introduced ObservabilitySettings class in config.py for better configuration management.
- Updated job.py and resources.py to support tracing without affecting fault isolation.
- Minor adjustments to other files for compatibility with the new observability features.
2026-08-25 22:06:54 +02:00
Arsham Mirehvandi
099d1e0af9 Initial commit 2026-08-22 08:47:56 +02:00