RSPEED-2521: include today's date in rlsapi v1 system prompt#1260
Conversation
Add today's date to the LLM instructions built by _build_instructions() so the model has temporal awareness for date-sensitive questions. The date appears as a separate line between the base prompt and the system context, matching how rlsapi handles it. Signed-off-by: Major Hayden <major@redhat.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
WalkthroughThe PR modifies the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
tisnik
left a comment
There was a problem hiding this comment.
Ok. I'm a bit worried about now() and not utcnow() or today() but I guess this is exactly what you need
|
@tisnik The date doesn't have to be super precise for this particular use case. ;) |
Description
Include today's date in the rlsapi v1 system prompt so the LLM has temporal awareness for date-sensitive questions (e.g., "when does RHEL 9 reach end of life?"). This matches the existing pattern in rlsapi, where the date is formatted as
"%B %d, %Y"and injected into the system prompt context._build_instructions()now always appendsToday's date: March 03, 2026as a separate line between the base prompt and theUser's system:context block.Type of change
Tools used to create PR
Related Tickets & Documents
Checklist before requesting a review
Testing
uv run pytest tests/unit/app/endpoints/test_rlsapi_v1.py -x -q(33 tests pass)uv run make format(clean)uv run make verify(all linters pass, mypy clean)Today's date: \w+ \d{2}, \d{4}matches in all_build_instructionstest casesSummary by CodeRabbit