Skip to content

doc: sample prompt instruction for rag as tool#841

Merged
tisnik merged 1 commit intolightspeed-core:mainfrom
asamal4:add-rag-tool-guidance
Nov 25, 2025
Merged

doc: sample prompt instruction for rag as tool#841
tisnik merged 1 commit intolightspeed-core:mainfrom
asamal4:add-rag-tool-guidance

Conversation

@asamal4
Copy link
Contributor

@asamal4 asamal4 commented Nov 25, 2025

Description

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up service version
  • Bump-up dependent library
  • Bump-up library or tool used for development (does not change the final image)
  • CI configuration change
  • Konflux configuration change
  • Unit tests improvement
  • Integration tests improvement
  • End to end tests improvement

Tools used to create PR

Identify any AI code assistants used in this PR (for transparency and review context)

  • Assisted-by: N/A
  • Generated by: N/A

Related Tickets & Documents

  • Related Issue #
  • Closes #

Checklist before requesting a review

  • I have performed a self-review of my code.
  • PR has passed all pre-merge test jobs.
  • If it is a core feature, I have added thorough tests.

Testing

  • Please provide detailed steps to perform tests related to this code change.
  • How were the fix/results from this change verified? Please provide relevant screenshots or results.

Summary by CodeRabbit

  • Documentation
    • Added a table-of-contents entry for system prompt guidance related to RAG
    • Added a new section with guidance on referencing the knowledge search and a tool-aware sample prompt
    • Note: the new guidance section currently appears twice (duplicate) in the document

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 25, 2025

Walkthrough

Added a table-of-contents entry and a new section "System Prompt Guidance for RAG (as a tool)" to docs/rag_guide.md instructing that knowledge_search must be referenced in system prompts; the same section appears twice (duplicated) in the document.

Changes

Cohort / File(s) Change Summary
Documentation updates
docs/rag_guide.md
Added a TOC entry "System Prompt Guidance for RAG (as a tool)"; inserted a new section instructing that knowledge_search must be referenced in system prompts and providing a tool-aware sample instruction; the section content is duplicated later in the file.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Pay attention to the duplicated section near the document end to determine if removal or consolidation is needed.

Possibly related PRs

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: adding sample prompt instruction documentation for RAG as a tool, which matches the file summary showing added section on system prompt guidance for RAG.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 910b7d1 and 7a01ef7.

📒 Files selected for processing (1)
  • docs/rag_guide.md (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Konflux kflux-prd-rh02 / lightspeed-stack-on-pull-request
  • GitHub Check: build-pr
  • GitHub Check: e2e_tests (azure)
  • GitHub Check: e2e_tests (ci)
🔇 Additional comments (2)
docs/rag_guide.md (2)

21-21: Excellent — previous review feedback has been addressed!

The TOC entry at line 21 now correctly matches the section heading at line 356 ("System Prompt Guidance for RAG (as a tool)"), fixing the mismatch flagged in the earlier review. The code block also includes the language specifier text, addressing the second previous issue.

The new section clearly guides users on the importance of explicitly referencing the knowledge_search tool in system prompts, with a well-structured sample instruction that emphasizes consistent tool usage.

Also applies to: 356-364


356-364: Note: AI summary mentions section duplication; verify if addressed in this update.

The AI-generated summary claims this section appears twice in the document, but the provided file shows only one instance (lines 356–364). Confirm whether the duplication existed in a previous version and has been resolved, or if the summary was incorrect.


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.

Copy link
Contributor

@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: 2

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 087655c and 910b7d1.

📒 Files selected for processing (1)
  • docs/rag_guide.md (2 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
docs/rag_guide.md

361-361: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: build-pr
  • GitHub Check: e2e_tests (ci)
  • GitHub Check: e2e_tests (azure)
  • GitHub Check: Konflux kflux-prd-rh02 / lightspeed-stack-on-pull-request
🔇 Additional comments (1)
docs/rag_guide.md (1)

354-364: Clarify duplication claim in AI summary.

The AI-generated summary mentions "content appears duplicated near the end of the document," but the provided code shows only one occurrence of the "System Prompt Guidance for RAG (as a tool)" section (lines 354–364). Please verify whether duplication actually exists in the full file or if this is a false positive in the summary.

@asamal4 asamal4 force-pushed the add-rag-tool-guidance branch from 910b7d1 to 7a01ef7 Compare November 25, 2025 12:48
@asamal4
Copy link
Contributor Author

asamal4 commented Nov 25, 2025

@tisnik PTAL

Copy link
Contributor

@tisnik tisnik left a comment

Choose a reason for hiding this comment

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

LGTM

@tisnik tisnik merged commit 9c05e1b into lightspeed-core:main Nov 25, 2025
21 of 23 checks passed
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.

2 participants