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

feat: improve ai chatbot prompt + ux 📈 #492

Merged
merged 2 commits into from
Aug 31, 2024
Merged

feat: improve ai chatbot prompt + ux 📈 #492

merged 2 commits into from
Aug 31, 2024

Conversation

ramiAbdou
Copy link
Member

@ramiAbdou ramiAbdou commented Aug 31, 2024

Description ✏️

This PR:

  • Doesn't emit the slack.chatbot.message if the DM is from a bot (ie: ColorStack app).
  • Logs the Anthropic token usage after a chat completion.
  • Updates the createDatabaseConnection to accept an optional database URL as an argument.
  • Improves the UX of the AI chatbot:
    • First checks whether or not the input is a question and if it's not, says "can't answer this".
    • Then, immediately sends a "Searching our Slack history..." message.
    • Updates the linked thread presentation (uses the [1] as an example).
    • Uses the top 5 most similar messages in the Pinecone query.
    • The prompt now takes into account the creation date + score of the match.
  • Additionally, the max tokens is 1000.

Type of Change 🐞

  • Feature - A non-breaking change which adds functionality.
  • Fix - A non-breaking change which fixes an issue.
  • Refactor - A change that neither fixes a bug nor adds a feature.
  • Documentation - A change only to in-code or markdown documentation.
  • Tests - A change that adds missing unit/integration tests.
  • Chore - A change that is likely none of the above.

Checklist ✅

  • I have done a self-review of my code.
  • I have manually tested my code (if applicable).
  • I have added/updated any relevant documentation (if applicable).

@ramiAbdou ramiAbdou self-assigned this Aug 31, 2024
@ramiAbdou ramiAbdou marked this pull request as ready for review August 31, 2024 03:27
@ramiAbdou ramiAbdou merged commit 1da5d3d into main Aug 31, 2024
2 checks passed
@ramiAbdou ramiAbdou deleted the rami/ai branch August 31, 2024 03:28
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