Skip to content

Conversation

@Avi-Robusta
Copy link
Contributor

No description provided.

@Avi-Robusta Avi-Robusta changed the title [ROB-2347] moved time prompt to improve promt cacheing [ROB-2347]improve prompt cacheing Oct 21, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 21, 2025

Walkthrough

The PR relocates the _current_date_time.jinja2 template includes from the top to the bottom of six prompt template files, adjusting the timing of when current date/time context is injected during template rendering. One file also includes a minor clarifying sentence.

Changes

Cohort / File(s) Change summary
Generic ask templates
holmes/plugins/prompts/generic_ask.jinja2, generic_ask_conversation.jinja2, generic_ask_for_issue_conversation.jinja2
Relocated _current_date_time.jinja2 include from top to end of template (after conditional blocks or main content).
Kubernetes workload templates
holmes/plugins/prompts/kubernetes_workload_ask.jinja2, kubernetes_workload_chat.jinja2
Relocated _current_date_time.jinja2 include from top to end of template. kubernetes_workload_chat.jinja2 also adds a sentence clarifying that not all questions may relate to prior investigation.
Investigation template
holmes/plugins/prompts/generic_investigation.jinja2
Relocated _current_date_time.jinja2 include from top to end of template (after investigation_output_format.jinja2).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

The changes follow a consistent, homogeneous pattern across all affected files—relocating template includes without introducing new logic or complex interactions. The repetitive nature of the edits reduces cognitive load per file, though verification across multiple files is necessary.

Possibly related PRs

Suggested reviewers

  • arikalon1
  • mainred

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description Check ❓ Inconclusive No pull request description was provided by the author. Without any description content to evaluate, there is insufficient information to determine whether it is related to or independent from the changeset. The check instructions focus on assessing the relationship between the description content and the changes, but no content exists to perform this evaluation. Consider adding a brief pull request description that explains the purpose of moving the _current_date_time.jinja2 template inclusions and how this change improves prompt caching performance. Even a short explanation would help reviewers understand the reasoning behind the reorganization.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title "[ROB-2347]improve prompt cacheing" is clearly related to the main changes in the pull request. The raw summary shows that across six template files, the _current_date_time.jinja2 template inclusion has been consistently moved from the top to the bottom of files, and the PR objectives confirm this change is intended to improve prompt caching. The title accurately captures the goal of the changeset, even though it doesn't explicitly describe the specific mechanism of moving the includes. This is sufficiently clear and specific for teammates scanning the history to understand the primary intent.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch move-datetime

📜 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 de3a4a2 and c7dc636.

📒 Files selected for processing (6)
  • holmes/plugins/prompts/generic_ask.jinja2 (1 hunks)
  • holmes/plugins/prompts/generic_ask_conversation.jinja2 (1 hunks)
  • holmes/plugins/prompts/generic_ask_for_issue_conversation.jinja2 (1 hunks)
  • holmes/plugins/prompts/generic_investigation.jinja2 (1 hunks)
  • holmes/plugins/prompts/kubernetes_workload_ask.jinja2 (1 hunks)
  • holmes/plugins/prompts/kubernetes_workload_chat.jinja2 (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
holmes/plugins/prompts/**/*.jinja2

📄 CodeRabbit inference engine (CLAUDE.md)

Prompts must be stored as Jinja2 templates under holmes/plugins/prompts/{name}.jinja2

Files:

  • holmes/plugins/prompts/generic_ask_for_issue_conversation.jinja2
  • holmes/plugins/prompts/generic_ask.jinja2
  • holmes/plugins/prompts/kubernetes_workload_ask.jinja2
  • holmes/plugins/prompts/generic_ask_conversation.jinja2
  • holmes/plugins/prompts/generic_investigation.jinja2
  • holmes/plugins/prompts/kubernetes_workload_chat.jinja2
🧠 Learnings (1)
📚 Learning: 2025-10-05T13:01:12.288Z
Learnt from: CR
PR: robusta-dev/holmesgpt#0
File: CLAUDE.md:0-0
Timestamp: 2025-10-05T13:01:12.288Z
Learning: Applies to holmes/plugins/prompts/**/*.jinja2 : Prompts must be stored as Jinja2 templates under holmes/plugins/prompts/{name}.jinja2

Applied to files:

  • holmes/plugins/prompts/generic_ask.jinja2
⏰ 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). (3)
  • GitHub Check: llm_evals
  • GitHub Check: Pre-commit checks
  • GitHub Check: build
🔇 Additional comments (6)
holmes/plugins/prompts/generic_investigation.jinja2 (1)

43-44: LGTM - Timestamp relocation improves prompt caching.

Moving the date/time include to the end allows LLM providers to cache the static instruction prefix, since the timestamp no longer invalidates the entire prompt on each request.

holmes/plugins/prompts/kubernetes_workload_chat.jinja2 (1)

39-40: LGTM - Consistent timestamp relocation.

The timestamp include has been appropriately moved to the end, consistent with the caching optimization applied across all prompt templates in this PR.

holmes/plugins/prompts/generic_ask_for_issue_conversation.jinja2 (1)

51-52: LGTM - Timestamp moved to end for caching.

The relocation maintains functionality while enabling better prompt cache utilization.

holmes/plugins/prompts/generic_ask.jinja2 (1)

42-43: LGTM - Timestamp relocation aligns with caching strategy.

The include has been moved to the end after optional additions, maintaining the pattern of placing dynamic content at the end for optimal caching. File location complies with the project's Jinja2 template guidelines.

holmes/plugins/prompts/generic_ask_conversation.jinja2 (1)

33-34: LGTM - Consistent with PR's caching optimization.

The timestamp include has been appropriately relocated to the end of the template.

holmes/plugins/prompts/kubernetes_workload_ask.jinja2 (1)

78-79: LGTM - Final template updated for caching optimization.

The timestamp include has been moved to the end, completing the consistent refactoring across all six prompt templates for improved caching efficiency.


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.

@github-actions
Copy link
Contributor

Results of HolmesGPT evals

  • ask_holmes: 34/35 test cases were successful, 0 regressions, 1 setup failures
Test suite Test case Status
ask 01_how_many_pods
ask 02_what_is_wrong_with_pod
ask 04_related_k8s_events
ask 05_image_version
ask 09_crashpod
ask 10_image_pull_backoff
ask 110_k8s_events_image_pull
ask 11_init_containers
ask 13a_pending_node_selector_basic
ask 14_pending_resources
ask 15_failed_readiness_probe
ask 17_oom_kill
ask 19_detect_missing_app_details
ask 20_long_log_file_search
ask 24_misconfigured_pvc
ask 24a_misconfigured_pvc_basic
ask 28_permissions_error 🚧
ask 39_failed_toolset
ask 41_setup_argo
ask 42_dns_issues_steps_new_tools
ask 43_current_datetime_from_prompt
ask 45_fetch_deployment_logs_simple
ask 51_logs_summarize_errors
ask 53_logs_find_term
ask 54_not_truncated_when_getting_pods
ask 59_label_based_counting
ask 60_count_less_than
ask 61_exact_match_counting
ask 63_fetch_error_logs_no_errors
ask 79_configmap_mount_issue
ask 83_secret_not_found
ask 86_configmap_like_but_secret
ask 93_calling_datadog[0]
ask 93_calling_datadog[1]
ask 93_calling_datadog[2]

Legend

  • ✅ the test was successful
  • :minus: the test was skipped
  • ⚠️ the test failed but is known to be flaky or known to fail
  • 🚧 the test had a setup failure (not a code regression)
  • 🔧 the test failed due to mock data issues (not a code regression)
  • 🚫 the test was throttled by API rate limits/overload
  • ❌ the test failed and should be fixed before merging the PR

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.

1 participant