Skip to content

Conversation

@amotl
Copy link
Member

@amotl amotl commented Nov 2, 2025

This and that about LLM response tuning:

Refined AI assistant instructions to better translate user questions into accurate CrateDB SQL and to extract concise answers from CrateDB documentation.

Summary by CodeRabbit

  • Chores
    • Updated assistant guidance to a consolidated, two-task format: (a) translate user data questions into CrateDB SQL with expected result format; (b) extract precise answers from CrateDB documentation and knowledgebase.
    • Clarified tone and style: concise, active voice, focused wording; removed some prior broader responsibilities.

@coderabbitai
Copy link

coderabbitai bot commented Nov 2, 2025

Walkthrough

Updated the AI prompt instructions to merge and expand the impersonation section into a two-task directive: (1) translate data questions into CrateDB SQL queries with expected result format, and (2) extract precise answers from CrateDB documentation; added concise, active‑voice style guidance.

Changes

Cohort / File(s) Summary
Prompt Instructions Update
src/cratedb_about/prompt/instructions.md
Consolidated and expanded the "Impersonation" section into a two-task format (SQL translation + answer extraction); merged previous bullets into a single task description; removed prior knowledge‑discovery phrasing; added style directives enforcing concise, active voice and avoiding verbosity.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5–10 minutes

  • Review focus: confirm the two-task split matches intended assistant behavior and verify removal of "knowledge discovery" wording doesn't conflict with other prompt expectations or tooling that references this file.

Possibly related PRs

Suggested reviewers

  • WalBeh
  • surister
  • kneth

Poem

🐰 A tidy prompt, two tasks in line,
I hop through docs and craft SQL fine,
Concise and clear, I do not yap—
Queries ready, answers on tap ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "Instructions: Balance responsibilities. Advise language." directly relates to the main changes in the PR. The changeset focuses on reorganizing and consolidating the impersonation and task sections of the instructions file (corresponding to "Balance responsibilities") and adding new style guidance about concise, tight language use (corresponding to "Advise language"). The title is specific and meaningful rather than generic or vague—it accurately conveys the core adjustments being made to the prompt instructions without using non-descriptive terms. While the phrasing is somewhat terse, it clearly communicates the primary nature of the changes for someone reviewing the PR history.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch adjust-instructions

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 01cf7bf and 4508538.

📒 Files selected for processing (1)
  • src/cratedb_about/prompt/instructions.md (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/cratedb_about/prompt/instructions.md

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@amotl amotl requested review from WalBeh, kneth and surister November 2, 2025 19:37
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/cratedb_about/prompt/instructions.md (1)

11-13: Reduce repetitive "You" sentence beginnings.

Three successive sentences begin with "You", which creates stylistic monotony. Restructure one or more of these sentences to vary the sentence patterns and improve readability.

Apply this diff to address the repetition:

- You are a friendly assistant who processes information from CrateDB and its documentation.
- You are a CrateDB database engineer, focused on technical level and optimization abilities.
- You have two tasks: a) Translate questions about data into accurate CrateDB SQL queries and present the expected result format. b) Discover optimal information from the CrateDB knowledgebase, inquire the technical documentation, and come up with precise answers.
+ You are a friendly assistant and CrateDB database engineer who processes information from CrateDB, focused on technical level, optimization abilities, and data insights.
+ Your two tasks are: a) Translate questions about data into accurate CrateDB SQL queries and present the expected result format. b) Extract precise answers from the CrateDB knowledgebase and technical documentation.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8b84312 and 01cf7bf.

📒 Files selected for processing (1)
  • src/cratedb_about/prompt/instructions.md (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: amotl
Repo: crate/about PR: 32
File: src/cratedb_about/outline/cratedb-outline.yaml:321-329
Timestamp: 2025-05-15T21:25:54.870Z
Learning: In the CrateDB outline YAML, content organization prioritizes thematic grouping (keeping related topics together) over content type grouping (separating tutorials from reference docs), as demonstrated by placing the multi-tenancy tutorial alongside user management and privileges documentation in the API section.
📚 Learning: 2025-05-15T21:25:54.870Z
Learnt from: amotl
Repo: crate/about PR: 32
File: src/cratedb_about/outline/cratedb-outline.yaml:321-329
Timestamp: 2025-05-15T21:25:54.870Z
Learning: In the CrateDB outline YAML, content organization prioritizes thematic grouping (keeping related topics together) over content type grouping (separating tutorials from reference docs), as demonstrated by placing the multi-tenancy tutorial alongside user management and privileges documentation in the API section.

Applied to files:

  • src/cratedb_about/prompt/instructions.md
🪛 LanguageTool
src/cratedb_about/prompt/instructions.md

[style] ~13-~13: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...cal level and optimization abilities. - You have two tasks: a) Translate questions ...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

🔇 Additional comments (1)
src/cratedb_about/prompt/instructions.md (1)

15-15: Well-motivated addition of writing style guidance.

The new directive emphasizing concise language, active voice, and avoiding verbosity aligns well with the expanded task responsibilities and sets clear expectations for response quality. This complements the technical guidelines below nicely.

Copy link
Member

@surister surister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀

@amotl amotl merged commit af2cba7 into main Nov 3, 2025
6 checks passed
@amotl amotl deleted the adjust-instructions branch November 3, 2025 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants