Skip to content

Conversation

@YesCT
Copy link
Contributor

@YesCT YesCT commented Sep 4, 2025

Problem Fixed

Fixes #14 - Time annotations like (15m), (1h 45m) were appearing in Geekbot output when they should be excluded.

Solution

Updated the SIMPLE_PROMPT in scripts/llm-geekbot.sh to explicitly instruct Claude to exclude time information from the final Geekbot output.

Changes Made

  • Added "remove all time information (like 15m, 1h 45m, etc.)" to prompt instructions
  • Added "exclude all time durations" clarification to format guidance

Before/After Comparison

Before:

**DH:**
- Hours and SOW progress check (15m)
- Calendaring (15m)
- MAIN-1119 MAIN-1319 CHaDKids: Refactor custom theme js (1h 45m total)

After:

**DH:**
- Hours and SOW progress check
- Calendaring  
- MAIN-1119 MAIN-1319 CHaDKids: Refactor custom theme js

Testing

✅ Ran npm run llm-geekbot and confirmed time annotations are now removed from output
✅ Verified that activity summaries remain intact and properly formatted
✅ Confirmed the core functionality works correctly

Technical Notes

  • The formatTime() function in generate-reports.js continues to work correctly for raw data generation
  • This change only affects the final LLM output formatting, not the underlying data processing
  • The fix targets the simplified prompt that's actually used (lines 212-224), not the more detailed prompts that weren't being executed

AI Interaction Summary

Completed using: Claude Sonnet in Cursor
Total user prompts: 4

Chronological History:

  1. "$ npm run llm-geekbot [...] where did the (15m) times come from? what PR introduced them? I don't think we want time in the actual geekbot text" - User identified unwanted time annotations in Geekbot output and requested investigation

  2. "make an issue first." - User requested creating GitHub issue before implementing fix

  3. "yes" - User approved proceeding with the implementation

  4. Current fix implementation and testing

Key Decisions Made:

  • Identified root cause: SIMPLE_PROMPT in llm-geekbot.sh didn't exclude time information
  • Located source: formatTime() function from initial commit (0f686dd) working as designed
  • Solution approach: Update prompt instructions rather than changing data generation logic
  • Testing strategy: Verified fix works with real data while preserving functionality

Update SIMPLE_PROMPT in llm-geekbot.sh to explicitly instruct Claude to exclude
time information (like 15m, 1h 45m, etc.) from the final Geekbot output.

Changes made:
- Added "remove all time information (like 15m, 1h 45m, etc.)" to prompt instructions
- Added "exclude all time durations" clarification to format guidance
- Tested fix: time annotations are now successfully removed from output

Before:
- Hours and SOW progress check (15m)
- Calendaring (15m)

After:
- Hours and SOW progress check
- Calendaring

The formatTime() function in generate-reports.js continues to work correctly for
raw data generation - this change only affects the final LLM output formatting.
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @YesCT, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses an issue where time annotations were inadvertently appearing in the Geekbot output generated by the LLM. The solution involves refining the prompt provided to the LLM, ensuring that the final summary is clean and free of time-related details, while preserving the core functionality of activity summarization.

Highlights

  • LLM Prompt Update: The SIMPLE_PROMPT in scripts/llm-geekbot.sh has been updated to explicitly instruct the LLM (Claude) to exclude time annotations (e.g., "15m", "1h 45m") from the final Geekbot output.
  • Output Formatting: Clarification was added to the prompt's format guidance, specifically instructing the LLM to "exclude all time durations" when listing activities by project.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request effectively addresses the issue of unwanted time annotations in the Geekbot output by updating the LLM prompt. The change is clear and directly solves the problem described. My review includes one suggestion to ensure the fix is robust across all execution paths. Additionally, as noted in the PR description, there appears to be a significant amount of unused code related to SYSTEM_PROMPT (lines 154-206) which could be cleaned up in a future refactoring to improve script maintainability.

Comment on lines +212 to +218
SIMPLE_PROMPT="Format the following time tracking entries for a Geekbot update. Remove hashtags, remove all time information (like 15m, 1h 45m, etc.), and organize by project:
$RAW_DATA
Format as:
**Section 1 (What's new since your last update?):**
[List activities by project]
[List activities by project - exclude all time durations]

Choose a reason for hiding this comment

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

high

While this change correctly instructs Claude to remove time information, the fallback path that uses Gemini has not been updated. The GEMINI_PROMPT (defined around line 262) still lacks the instruction to exclude time annotations. This means if the Claude API call fails or times out, the original bug will reappear in the output from Gemini. To ensure the fix is robust, the Gemini prompt should be updated as well.

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.

Remove time annotations from Geekbot output

2 participants