Skip to content

Conversation

@cyyeh
Copy link
Member

@cyyeh cyyeh commented Aug 6, 2025

Summary by CodeRabbit

  • New Features
    • Added support for custom instructions when submitting queries, allowing users to specify how responses should be styled or formatted.
    • The custom instruction field is now available for data assistance, misleading assistance, and user guide assistance features.
    • Responses will adapt according to user-provided custom instructions.

@cyyeh cyyeh changed the title chore(wren-ai-service): update instructions chore(wren-ai-service): add custom instructions Aug 6, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 6, 2025

Warning

Rate limit exceeded

@cyyeh has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 25 minutes and 3 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 3a63823 and 8d41057.

📒 Files selected for processing (4)
  • wren-ai-service/src/pipelines/generation/data_assistance.py (6 hunks)
  • wren-ai-service/src/pipelines/generation/misleading_assistance.py (6 hunks)
  • wren-ai-service/src/pipelines/generation/user_guide_assistance.py (5 hunks)
  • wren-ai-service/src/web/v1/services/ask.py (4 hunks)

Walkthrough

Support for a new custom_instruction parameter is added across three AI assistance pipelines and the web service layer. This parameter is now accepted, propagated, and integrated into prompt construction and pipeline execution, allowing user-supplied instructions to modify the response style. Relevant function and method signatures are updated accordingly.

Changes

Cohort / File(s) Change Summary
Data Assistance Pipeline
wren-ai-service/src/pipelines/generation/data_assistance.py
Added custom_instruction parameter to the pipeline, prompt construction, and run method. System and user prompt templates updated to include and utilize the custom instruction for response styling.
Misleading Assistance Pipeline
wren-ai-service/src/pipelines/generation/misleading_assistance.py
Added support for custom_instruction in the pipeline, updating prompt function and run method signatures. Prompts now incorporate the custom instruction to guide response style.
User Guide Assistance Pipeline
wren-ai-service/src/pipelines/generation/user_guide_assistance.py
Integrated custom_instruction throughout the pipeline, updating prompt and run method signatures. System and user prompts now include and apply the custom instruction.
Web Service Layer
wren-ai-service/src/web/v1/services/ask.py
Introduced optional custom_instruction field to the AskRequest model and propagated it to the relevant pipeline calls within the AskService.ask method.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant WebService
    participant Pipeline

    User->>WebService: Submit AskRequest (includes custom_instruction)
    WebService->>Pipeline: run(..., custom_instruction)
    Pipeline->>Pipeline: Construct prompt with custom_instruction
    Pipeline->>WebService: Response
    WebService->>User: Return response
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~15 minutes

Suggested labels

module/ai-service, ci/ai-service

Suggested reviewers

  • yichieh-lu

Poem

A rabbit with code on its mind,
Hops through pipelines, prompt redefined.
"Custom instructions," it cheerfully squeaks,
"Now you can style your AI as unique!"
With every new hop and every new line,
The answers grow clever—oh, simply divine!
🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/ai-service/add-custom-instructions

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@cyyeh cyyeh force-pushed the chore/ai-service/add-custom-instructions branch from 5faca05 to 8d41057 Compare August 6, 2025 01:36
@cyyeh cyyeh merged commit 9f1ca9e into main Aug 6, 2025
9 checks passed
@cyyeh cyyeh deleted the chore/ai-service/add-custom-instructions branch August 6, 2025 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants