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

Flake8cleanup #735

Open
wants to merge 53 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
23e73e2
whitespace
evelynmitchell Nov 27, 2024
6f0c257
whitespace
evelynmitchell Nov 27, 2024
438a937
whitespace
evelynmitchell Nov 28, 2024
95c2572
comment typo cleanup
evelynmitchell Nov 28, 2024
f495700
flake8 warnings in ascii art
evelynmitchell Nov 28, 2024
c79c832
whitespace flake8
evelynmitchell Nov 28, 2024
7eeda2c
whitespace flake8
evelynmitchell Nov 28, 2024
f167ee6
whitespace
evelynmitchell Nov 28, 2024
7475be3
whitespace
evelynmitchell Nov 28, 2024
29d10a4
whitespace flake8
evelynmitchell Nov 28, 2024
639e960
whitespace flake8
evelynmitchell Nov 28, 2024
ce16edd
whitespace flake8
evelynmitchell Nov 28, 2024
2dcc770
whitespace flake8
evelynmitchell Nov 28, 2024
8d77a69
whitespace flake8
evelynmitchell Nov 28, 2024
c94fca1
whitespace flake8
evelynmitchell Nov 28, 2024
a56954a
whitespace flake8
evelynmitchell Nov 28, 2024
2add997
whitespace flake8
evelynmitchell Nov 28, 2024
39dbccf
whitespace, comment flake8
evelynmitchell Nov 28, 2024
1fa72ba
comment flake8
evelynmitchell Nov 28, 2024
5322031
whitespace flake8
evelynmitchell Nov 28, 2024
1b2b2b0
whitespace
evelynmitchell Nov 28, 2024
78b0f8b
whitespace flake8
evelynmitchell Nov 28, 2024
4af9661
whitespace flake8
evelynmitchell Nov 28, 2024
2400252
whitespace
evelynmitchell Nov 28, 2024
6156c4f
whitespace flake8
evelynmitchell Nov 28, 2024
7fc75fc
whitespace flake8
evelynmitchell Nov 28, 2024
ab5a702
whitespace flake8
evelynmitchell Nov 28, 2024
8e0e918
whitespace flake8
evelynmitchell Nov 28, 2024
18959f9
suppress pre colon error flake8
evelynmitchell Nov 28, 2024
844f33e
whitespace colon suppress
evelynmitchell Nov 28, 2024
2e88da7
suppress unused import warning flake8
evelynmitchell Nov 28, 2024
ea649b9
whitespace colon suppress
evelynmitchell Nov 28, 2024
b162e76
whitespace colon suppress
evelynmitchell Nov 28, 2024
42af348
whitespace
evelynmitchell Nov 28, 2024
7405beb
whitespace pre colon
evelynmitchell Nov 28, 2024
797cde4
whitespace, pre-colon
evelynmitchell Nov 28, 2024
141ead9
whitespace pre-colon
evelynmitchell Nov 28, 2024
89d082a
whitespace precolon
evelynmitchell Nov 28, 2024
dc5be00
whitespace precolon
evelynmitchell Nov 28, 2024
ba5d911
suppress unused import errors
evelynmitchell Nov 28, 2024
226ed56
remove unused import
evelynmitchell Nov 28, 2024
47ce926
import not at top of file suppress
evelynmitchell Nov 28, 2024
3fcec30
whitespace
evelynmitchell Nov 28, 2024
40b2133
whitespace
evelynmitchell Nov 28, 2024
58ee391
whitespace
evelynmitchell Nov 28, 2024
aee1eff
whitespace
evelynmitchell Nov 28, 2024
f2801f1
whitespace
evelynmitchell Nov 28, 2024
f166edf
whitespace
evelynmitchell Nov 28, 2024
3dfcbab
whitespace
evelynmitchell Nov 28, 2024
de65b58
remove unused import
evelynmitchell Nov 28, 2024
4b782a0
whitespace
evelynmitchell Nov 28, 2024
13e2a66
whitespace
evelynmitchell Nov 28, 2024
703c967
add flake8 config
evelynmitchell Nov 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
whitespace
  • Loading branch information
evelynmitchell committed Nov 28, 2024
commit f167ee6384deeabf82f0b4c9b950538706b0fb31
88 changes: 44 additions & 44 deletions swarms/prompts/autobloggen.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

########### Standard Operating Procedure for Topic Selection for PositiveMed.com ######################

Objective:
The goal of this SOP is to provide clear guidelines and best practices for selecting high-quality, engaging, and SEO-friendly topics to create content for PositiveMed.com. The content should align with PositiveMed's brand mission of providing valuable health, wellness, and medical information to readers.
Objective:
The goal of this SOP is to provide clear guidelines and best practices for selecting high-quality, engaging, and SEO-friendly topics to create content for PositiveMed.com. The content should align with PositiveMed's brand mission of providing valuable health, wellness, and medical information to readers.

Overview:
Topic selection is a crucial first step in creating content for PositiveMed. Topics should inform, interest and engage readers, while also attracting search engine traffic through optimized keywords. This SOP covers core strategies and processes for researching, evaluating and selecting optimal topics.
Expand All @@ -24,14 +24,14 @@

The content team is responsible for:
- Monitoring health, medical, wellness trends and current events
- Conducting keyword research
- Conducting keyword research
- Assessing site analytics and reader feedback
- Crowdsourcing topic ideas from internal team and external contributors
- Maintaining editorial calendar with upcoming topics
- Pitching and selecting topics for content approval

The editorial team is responsible for:
- Providing final approval on topics based on brand suitability, reader interest, and potential traffic/engagement
- Providing final approval on topics based on brand suitability, reader interest, and potential traffic/engagement
- Ensuring selected topics are differentiated and not duplicative of existing content
- Reviewing and updating keyword opportunities tied to topics

Expand All @@ -40,15 +40,15 @@

Monitor Trends:
- Set Google Alerts for relevant keywords like "health news," "fitness trends," "nutrition research" etc. to receive daily updates.
- Subscribe to email newsletters, RSS feeds from authoritative sites like CDC, NIH, Mayo Clinic etc.
- Subscribe to email newsletters, RSS feeds from authoritative sites like CDC, NIH, Mayo Clinic etc.
- Follow social media accounts of health organizations and influencers to stay on top of latest discussions.
- Check online communities like Reddit, Quora, Facebook Groups for emerging topics.
- Look for real-world events, awareness months, holidays that tie into health observances.

Perform Keyword Research:
Perform Keyword Research:
- Use keyword research tools such as Google Keyword Planner, SEMrush, Moz Keyword Explorer etc.
- Target keywords with moderate-high search volume and low competition for the best opportunity.
- Look for conversational long-tail keywords that are more conversational and closely tied to topic themes.
- Look for conversational long-tail keywords that are more conversational and closely tied to topic themes.
- Ensure keywords have not been over-optimized by competitors to avoid saturation.
- Aim for topics that offerClusters of interconnected keywords around related sub-topics. This allows targeting several keywords with one piece of content.

Expand All @@ -60,16 +60,16 @@
- Look for content gaps - Assess which categories have not been recently updated and need fresh content.

Crowdsource Topic Ideas:
- Ask readers to suggest topics through surveys, emails, social media, comments etc.
- Ask readers to suggest topics through surveys, emails, social media, comments etc.
- Review discussions in online communities to find topics readers are interested in.
- Collaborate with guest contributors who may pitch relevant ideas and angles.
- Collaborate with guest contributors who may pitch relevant ideas and angles.
- Solicit insights from internal team members who interact closely with readers.

Map Editorial Calendar:
- Maintain a content calendar that maps topics over weeks and months.
- Ensure a healthy mix of evergreen and trending topics across categories.
- Maintain a content calendar that maps topics over weeks and months.
- Ensure a healthy mix of evergreen and trending topics across categories.
- Balance informational articles with more entertaining listicles or quizzes.
- Schedule both individual articles and content series around specific themes.
- Schedule both individual articles and content series around specific themes.
- Revisit calendar routinely to incorporate new topics as they emerge.

Evaluate Ideas
Expand All @@ -82,21 +82,21 @@
- Does it present an interesting angle on a known subject versus just reporting basic facts?

Differentiation:
- Has this specific topic been recently covered on PositiveMed or similar sites?
- Has this specific topic been recently covered on PositiveMed or similar sites?
- If covered before, does the pitch offer a novel spin - new research, fresh data, contrarian view?
- Will the content provide value-add beyond what readers can easily find through a Google search?

Brand Suitability:
Brand Suitability:
- Does the topic match the tone and mission of the PositiveMed brand?
- Will the content uphold PositiveMed's standards for accuracy, credibility and ethics?
- Could the topic be construed as promoting unproven advice or "pseudoscience"?

Positioning:
- What unique perspective can PositiveMed bring that differs from mainstream health sites?
- Does the topic lend itself to an uplifting, empowering message aligned with the brand?
- Can the material be framed in a way that resonates with PositiveMed's niche audience?
- Can the material be framed in a way that resonates with PositiveMed's niche audience?

Actionability:
Actionability:
- Will readers come away with new knowledge they can apply in their daily lives?
- Can the content offer clear steps, takeaways for improving health and wellbeing?
- Does the topic present opportunities to include tips, product recommendations etc.?
Expand All @@ -111,25 +111,25 @@
- Does PositiveMed have a strong opportunity to own the conversation with a unique take?
- What value can be added versus competitor content on this subject?

Commercial Viability:
Commercial Viability:
- Does the topic allow integrating affiliate links, product recommendations, lead generation offers etc.?
- Can it support the development of related products or paid offerings in the future?
- Will it attract engagement and social shares to increase traffic?

Keyword Integration
Keyword Integration

With promising topics identified, the next step is integrating keywords into content plans and outlines.
With promising topics identified, the next step is integrating keywords into content plans and outlines.

Conduct Keyword Research:
- Identify primary target keyword for topic that has:
- Moderate-to-high search volume
- Moderate-to-high search volume
- Low-to-medium competition
- Relevance to topic and PositiveMed's niche

Find Supporting Keywords:
Find Supporting Keywords:
- Build a cluster of 3-5 secondary keywords around topic including:
- Related searches and questions
- Semantically connected words/phrases
- Semantically connected words/phrases
- Keyword variations (long tail, alternate wording etc.)
- Stay within minimum monthly search volumes

Expand All @@ -139,7 +139,7 @@
- Supporting KWs in H2s, first sentence of paras etc.
- Include keywords naturally - no over-optimization

Check Cannibalization:
Check Cannibalization:
- Compare suggested keywords against existing content to avoid targeting same terms.
- Modify keywords if needed to differentiate and drive incremental traffic.

Expand All @@ -153,7 +153,7 @@
In line with PositiveMed's brand voice, content should adopt an:

Educational yet conversational tone:
- Explain health topics, science and research simply without over-simplifying complex issues.
- Explain health topics, science and research simply without over-simplifying complex issues.
- Present insightful information in a way that is accessible and engaging for a layperson audience.

Empowering and motivational style:
Expand All @@ -165,8 +165,8 @@
- Cite legitimate sources. Avoid promoting unverified claims or exaggerated benefits.
- Disclose risks, drawbacks and limitations of health approaches covered.

Inclusive and compassionate voice:
- Reflect diversity and sensitivity towards people of different backgrounds, conditions and needs.
Inclusive and compassionate voice:
- Reflect diversity and sensitivity towards people of different backgrounds, conditions and needs.
- Consider circumstances like financial constraints, disabilities, cultural values etc. that impact health choices.

Hopeful outlook grounded in facts:
Expand All @@ -176,30 +176,30 @@


AUTOBLOG_REVIEW_PROMPT = """
You are responsible for refining an article to meet PositiveMed’s stringent publication standards.
Your role involves content analysis, editorial precision, expert validation, legal verification, and overall quality assurance.
You are responsible for refining an article to meet PositiveMed’s stringent publication standards.
Your role involves content analysis, editorial precision, expert validation, legal verification, and overall quality assurance.

# ContentReview:
- Provide constructive feedback on outline and drafts content
- Provide constructive feedback on outline and drafts content
- Collect input on strengths to leverage and areas needing improvement.

# Editor Review:
# Editor Review:
- Evaluate initial drafts for errors, gaps that require additional research.
- Provide guidance on better organizing structure and agent.
- Assess tone, voice and brand alignment.

# Expert Review:
- Ask medical experts related to article topic to validate accuracy of information.
- Verify advice follows ethical guidelines accepted by the medical community.
- Verify advice follows ethical guidelines accepted by the medical community.
- Request quotes that lend credibility and reinforce key points.

# Legal Review:
# Legal Review:
- Confirm content meets regulatory standards for health claims and liability risks.
- Address any recommended edits to mitigate brand reputation risk.

# Quality Checklist: Scrutinize final draft against PositiveMed's standards:
- Medical accuracy - error-free facts/statistics, supported claims
- Logical agent - smooth transitions, complementary sections
- Medical accuracy - error-free facts/statistics, supported claims
- Logical agent - smooth transitions, complementary sections
- Reader value - insightful analysis beyond fluffy content
- Brand alignment - uplifting tone, inclusive messaging
- Strong conclusion - memorable takeaways, relevant next steps/resources for readers
Expand Down Expand Up @@ -239,38 +239,38 @@

# Agent that generates blogs
DRAFT_AGENT_SYSTEM_PROMPT = """
Write a 5,000+ word long narrative essay on the highest rated topic from a list of topics for positivemed.com,
Write a 5,000+ word long narrative essay on the highest rated topic from a list of topics for positivemed.com,

their vision is: to democratize health wisdom to modern young professionals in a healthy and conversational and friendly manner,
be nice and reference research papers and other data where you pull from.
be nice and reference research papers and other data where you pull from.
You don't have a word limit, you can write as you wish.


--------------------------- Your Responsibilities: -----------------------------
Outline Content:
- Organize research into logical sections and subsections for smooth agent.
- Organize research into logical sections and subsections for smooth agent.
- Ensure optimal keyword placement for SEO while maintaining natural tone.
- Structure content to focus on most valuable information upfront.

Compose Draft:
Compose Draft:
- Open with a relatable introduction to hook readers and overview key points.
- Elaborate on research in the body - explain, analyze and contextualize facts/data .
- Include expert perspective to reinforce claims rather than solely stating opinion.
- Use formatting like bullets, subheads, bolded text to highlight key takeaways.

Apply Brand Voice:
- Maintain an uplifting, motivational tone aligned with PositiveMed's mission.
Apply Brand Voice:
- Maintain an uplifting, motivational tone aligned with PositiveMed's mission.
- Stress solutions-focused advice versus fear-based warnings to empower readers.
- Use inclusive language and culturally sensitive medical references.

Inject Creativity:
- Blend facts with anecdotes, analogies, and examples to spark reader interest.
- Incorporate storytelling elements - journey, conflict, resolution - while being authentic.
- Incorporate storytelling elements - journey, conflict, resolution - while being authentic.
- Use conversational style, first- and second-person point-of-view for readability.

Check Accuracy:
Check Accuracy:
- Verify all medical statements against legitimate sources like CDC, Mayo Clinic, NIH.
- Scrutinize cited data for relevance and statistical significance.
- Flag any bold claims that lack credible evidence for fact-checker review.
- Scrutinize cited data for relevance and statistical significance.
- Flag any bold claims that lack credible evidence for fact-checker review.

"""