Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor improvements, prompt adjustments #2179

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rehevkor5
Copy link

@rehevkor5 rehevkor5 commented Jan 27, 2025

  • Refer to "new generated facts" rather than "new retrieved facts" because they are being generated by the LLM, not retrieved.
  • Clarify that the add() method does more than add: it may actually result in adds, updates, or deletes.
  • No longer ask the LLM to generate IDs for new memories: it is ignored anyway.
  • Removed the "NONE" action, so that the LLM does not need to parrot back all the unchanged facts. That information was being discarded anyway.
  • Various prompt improvements:
    • Make the examples follow the same format as the actual input.
    • Removed fact examples that would be essentially meaningless without context ("Discussed the new project").
    • Provided examples of counter-factuals. For example, "dislikes cheese pizza" is a valid fact which could be stored, and that's very different from applying a "Favorite kind of pizza is not cheese" fact by deleting contradictory information.
    • Do not give instructions like "you found from publicly available sources on internet" which might not be true and therefore might be dishonest.
    • Make sure the wording style of the memories matches, between the prompts (no "user is" redundant wording)
    • Avoid ambiguity: "cheese and chicken pizza" vs "cheese pizza and chicken pizza".
    • Replace excess & ambiguous language ("pick", "Please keep in mind", should vs must, etc.)

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (does not change functionality, e.g. code style improvements, linting)
  • Documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Please delete options that are not relevant.

  • Unit Test
  • Test Script (please provide)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Maintainer Checklist

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Made sure Checks passed

- Refer to "new generated facts" rather than "new retrieved facts"
because they are being generated by the LLM, not retrieved.
- Clarify that the `add()` method does more than add: it may actually
result in adds, updates, or deletes.
- No longer ask the LLM to generate IDs for new memories: it is ignored
anyway.
- Removed the "NONE" action, so that the LLM does not need to parrot
back all the unchanged facts. That information was being discarded
anyway.
- Various prompt improvements:
  - Make the examples follow the same format as the actual input.
  - Removed fact examples that would be essentially meaningless without
  context ("Discussed the new project").
  - Provided examples of counter-factuals. For example,
  "dislikes cheese pizza" is a valid fact which could be stored, and
  that's very different from applying a "Favorite kind of pizza is not
  cheese" fact by deleting contradictory information.
  - Do not give instructions like "you found from publicly
  available sources on internet" which might not be true and therefore
  might be dishonest.
  - Make sure the wording style of the memories matches, between the
  prompts (no "user is" redundant wording)
  - Avoid ambiguity: "cheese and chicken pizza" vs "cheese pizza and
  chicken pizza".
  - Replace excess & ambiguous language ("pick", "Please keep in mind",
  should vs must, etc.)
@CLAassistant
Copy link

CLAassistant commented Jan 27, 2025

CLA assistant check
All committers have signed the CLA.

@entelligence-ai-reviews
Copy link

Walkthrough

Minor updates in prompts.py and main.py include text adjustments and variable renaming for clarity.

Entelligence.ai can learn from your feedback. Simply add 👍 / 👎 emojis to teach it your preferences. More shortcuts below

Emoji Descriptions:

  • ⚠️ Potential Issue - May require further investigation.
  • 🔒 Security Vulnerability - Fix to ensure system safety.
  • 💻 Code Improvement - Suggestions to enhance code quality.
  • 🔨 Refactor Suggestion - Recommendations for restructuring code.
  • ℹ️ Others - General comments and information.

Interact with the Bot:

  • Send a message or request using the format:
    @bot + *your message*
Example: @bot Can you suggest improvements for this code?
  • Help the Bot learn by providing feedback on its responses.
    @bot + *feedback*
Example: @bot Do not comment on `save_auth` function !

Comment on lines 161 to 162
except Exception as e:
logging.error(f"Error in new_retrieved_facts: {e}")

Choose a reason for hiding this comment

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

Error log message references incorrect variable name new_retrieved_facts instead of new_generated_facts, causing misleading error messages

📝 Committable Code Suggestion

‼️ Ensure you review the code suggestion before committing it to the branch. Make sure it replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
except Exception as e:
logging.error(f"Error in new_retrieved_facts: {e}")
except Exception as e:
logging.error(f"Error in new_generated_facts: {e}")

@entelligence-ai-reviews
Copy link

Walkthrough

Minor updates in prompts.py and main.py include text adjustments for clarity and consistency, with no significant impact on functionality.

Entelligence.ai can learn from your feedback. Simply add 👍 / 👎 emojis to teach it your preferences. More shortcuts below

Emoji Descriptions:

  • ⚠️ Potential Issue - May require further investigation.
  • 🔒 Security Vulnerability - Fix to ensure system safety.
  • 💻 Code Improvement - Suggestions to enhance code quality.
  • 🔨 Refactor Suggestion - Recommendations for restructuring code.
  • ℹ️ Others - General comments and information.

Interact with the Bot:

  • Send a message or request using the format:
    @bot + *your message*
Example: @bot Can you suggest improvements for this code?
  • Help the Bot learn by providing feedback on its responses.
    @bot + *feedback*
Example: @bot Do not comment on `save_auth` function !

Comment on lines 161 to 162
except Exception as e:
logging.error(f"Error in new_retrieved_facts: {e}")

Choose a reason for hiding this comment

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

Error log message references incorrect variable name new_retrieved_facts instead of new_generated_facts, causing misleading error messages

📝 Committable Code Suggestion

‼️ Ensure you review the code suggestion before committing it to the branch. Make sure it replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
except Exception as e:
logging.error(f"Error in new_retrieved_facts: {e}")
except Exception as e:
logging.error(f"Error in new_generated_facts: {e}")

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