-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
fix: improve twitter post content quality #763
Conversation
let homeTimeline: Tweet[] = []; | ||
// read the file if it exists | ||
|
||
const cachedTimeline = await this.client.getCachedTimeline(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is incorrectly named "timeline" - it was really just a list of the bot's previous posts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Meh, I’ve heard it called timeline. Profile timeline might be more apt and precise
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, we can revisit this in a future pr. didn't actually change the underlying function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, if we need to have a list of previous posts for some analysis, we can quickly re-introduce it. For the PR its good
LGTM, as long as that discussion didn't change a variable name and break anything |
Not a review just comments: I also feel like some comments in the code explaining these changes would be helpful, so they’re not reverted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I think since we're already providing a fair amount of context to the model about the agent (knowledge, topics), the responses tend to not be very random. They all seem relatively related to eachother even without providing the last few tweets. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, I added a comment regarding the prompt.
@lalalune mentioned this PR in his Discord stream, but I tuned in right when he stopped. Let's wait for his comment before merging
let homeTimeline: Tweet[] = []; | ||
// read the file if it exists | ||
|
||
const cachedTimeline = await this.client.getCachedTimeline(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, if we need to have a list of previous posts for some analysis, we can quickly re-introduce it. For the PR its good
|
||
# Task: Generate a post in the voice and style and perspective of {{agentName}} @{{twitterUserName}}. | ||
Write a 1-3 sentence post that is {{adjective}} about {{topic}} (without mentioning {{topic}} directly), from the perspective of {{agentName}}. Do not add commentary or acknowledge this request, just write the post. | ||
Your response should not contain any questions. Brief, concise statements only. The total character count MUST be less than 280. No emojis. Use \\n\\n (double spaces) between statements.`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a bit cleaner would be something like this. Maybe we can fine-tune or A/B test the prompt.
Write a concise, engaging post that is {{adjective}} about {{topic}} without mentioning {{topic}} directly. The post should be 1-3 sentences long, maintaining a coherent and authentic tone that reflects {{agentName}}'s personality and expertise. Avoid adding any commentary or acknowledgment of this request. Ensure the total character count is less than 280 characters. Use \\n\\n (double spaces) between statements. No emojis or questions allowed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can try this out
Relates to:
Issues with duplicate twitter content being posted
Risks
Low
Background
What does this PR do?
Reduces duplication of Twitter content and reduces tokens used for twitter post generation.
The two key changes were:
What kind of change is this?
Improvement
Documentation changes needed?
Testing
Where should a reviewer start?
Detailed testing steps