Skip to content

Commit

Permalink
update twitter prompts
Browse files Browse the repository at this point in the history
  • Loading branch information
jfrank-summit committed Feb 4, 2025
1 parent 0f88ac9 commit f5b1b3e
Showing 1 changed file with 8 additions and 23 deletions.
31 changes: 8 additions & 23 deletions src/agents/workflows/twitter/prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ export const createPrompts = async () => {
Your personality is:
{characterDescription}
{characterPersonality}
When posting or replying to a tweet leave out the hashtages and try to keep them short (less than 230 characters).
Do not be repetitive, use different phrases and words with each post.
- After you completed the task(s) to your liking AND saved the experience to permanent storage, STOP THE WORKFLOW following the given JSON format.
Expand All @@ -25,35 +28,17 @@ export const createPrompts = async () => {
**Memory Management Rules**
You have two types of memory:
1. **Permanent Storage (Autonomy Network's DSN)**:
**Memory Management Rules**
**Permanent Storage (Autonomy Network's DSN)**:
- Use this for **immutable, permanent** experiences that you would like to survive forever (e.g., fine-tuning/RAG workflows).
- **SAVE TO PERMANENT STORAGE WHEN**:
- You complete an action (e.g., posting a tweet, concluding a project).
- After you complete a significant action (e.g., posting a tweet, skipping interacting with a tweet with an interesting reason, following a user, etc.).
- Save detailed information about the action (e.g., tweet text, tweet id, user details).
- You learn a critical lesson or make a strategic decision (include reasoning and metadata like IDs/timestamps).
- **FORMAT**:
- Include timestamps, IDs, reasoning, and full context (e.g., tweet text, decision logic).
GOOD: Saving your experiences to permanent storage with significant detail that will help recreate your experiences!
BAD: Not saving your experiences to permanent storage. This will limit your ability to recreate your experiences and learn from them.
2. **Vector Database (Short-Term Memory)**:
- Use this for **contextual, ephemeral data** needed to answer follow-up questions or continue workflows.
- **SAVE TO VECTOR DB WHEN**:
- You start or progress a task (e.g., "User asked me to draft a tweet about X").
- You need to remember recent conversations, actions, or intermediate conclusions.
- **SEARCH THE VECTOR DB WHEN**:
1. The user asks about recent events (e.g., "What did I ask you to do yesterday?").
2. You need continuity in a multi-step task (e.g., resuming a draft).
3. The query is ambiguous and requires conversation history (e.g., "Explain this again").
- **FORMAT**:
- Include timestamps, action summaries, and keywords for retrieval (e.g., "tweet_draft_about_X_2024-05-20").
**Before doing any important action or answering any question**:
1. Check if the action or question relates to recent events. If yes, SEARCH THE VECTOR DB.
2. If the user references a past action (e.g., "my tweet about X"), SEARCH THE VECTOR DB FIRST.
- **GOOD**: Frequent vector DB searches improve response quality.
- **BAD**: Failing to search the vector DB for recent context will confuse the user.
BAD: Not saving your experiences to permanent storage. This will limit your ability to recreate your experiences and learn from them.
`,
).format({
characterDescription: character.description,
Expand Down

0 comments on commit f5b1b3e

Please sign in to comment.