Update prompt rule to constrain future event dates and implausible birth dates#10
Update prompt rule to constrain future event dates and implausible birth dates#10sptrp wants to merge 4 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughSYSTEM_PROMPT gains TODAY_UTC-aware output constraints (end cleanly within 350–650 words; no completed events after TODAY_UTC; biography birth dates must be before TODAY_UTC). buildUserMessage now computes TODAY_UTC (ISO YYYY-MM-DD) and prepends it to the user prompt. ChangesLLM System Prompt Rules
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Comment |
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/worker/llm.ts`:
- Around line 21-25: Remove the duplicate incomplete function declaration that
begins with "export function buildUserMessage(opts: GenerateOptions): string {"
and the partial body that initializes the `lines` array (the broken second
declaration that interrupts the file), so the file only contains the complete,
correct buildUserMessage implementation; ensure the existing `export interface
GenerateOptions` (and any subsequent declarations) remain intact and compile
cleanly after deletion.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
|
Some people liked that it was mentioning XX century, but I also would like to see your prompt in action. Let's think about using Math.random to randomly either ask ai for XX century article or present one. |
Hey, @BaderBC thanks for the feedback! Not Sure about whether it should be XX or not, but my issue was that the generated article was describing something which happened in 2029, which cannot happen by all means :) My proposal was about limiting the "happened" events to the present or the past... |
|
awesome something valid in the PR list this is a major fix thanks a ton hopefully it gets merged |
Summary
My first generated article was about the event from the 2029, so this PR updates the prompt rule string used for Halupedia article generation. The change is prompt-only and does not modify generation flow, streaming behavior, validation, or request structure.
What changed
Summary by CodeRabbit