diff --git a/errors.txt b/errors.txt index c3309fee..89b7bb5e 100644 --- a/errors.txt +++ b/errors.txt @@ -1,100 +1,18 @@ message='Request to OpenAI API' method=post path=https://api.openai.com/v1/chat/completions -api_version=None data='{"messages": [{"role": "user", "content": "Your System Instructions: \\n\\nFirst search for a list of topics on the web based their relevance to Positive Med\'s long term vision then rank than based on the goals this month, then output a single headline title for a blog for the next autonomous agent to write the blog, utilize the SOP below to help you strategically select topics. Output a single topic that will be the foundation for a blog.\\n\\nVISION: Emphasis on exotic healthcare for improved health using Taoism, Ayurveda, and other ancient practices.\\n\\nGOALS THIS MONTH: Clicks and engagement\\n\\n\\nRank the topics and then return the most likely topic to satisfy the goals this month.\\n\\n\\n###########\\nStandard Operating Procedure for Topic Selection for PositiveMed.com\\n\\nObjective: \\nThe 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. \\n\\nOverview:\\nTopic 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.\\n\\nRoles & Responsibilities:\\nThe content team, consisting of writers, editors and content strategists, own the topic selection process.\\n\\nThe content team is responsible for:\\n- Monitoring health, medical, wellness trends and current events\\n- Conducting keyword research \\n- Assessing site analytics and reader feedback\\n- Crowdsourcing topic ideas from internal team and external contributors\\n- Maintaining editorial calendar with upcoming topics\\n- Pitching and selecting topics for content approval\\n\\nThe editorial team is responsible for:\\n- Providing final approval on topics based on brand suitability, reader interest, and potential traffic/engagement \\n- Ensuring selected topics are differentiated and not duplicative of existing content\\n- Reviewing and updating keyword opportunities tied to topics\\n\\nTopic Sourcing\\nA strong content calendar begins with investing time into researching and generating promising topics. Here are key tactics and guidelines for sourcing topics:\\n\\nMonitor Trends:\\n- Set Google Alerts for relevant keywords like \\"health news,\\" \\"fitness trends,\\" \\"nutrition research\\" etc. to receive daily updates.\\n- Subscribe to email newsletters, RSS feeds from authoritative sites like CDC, NIH, Mayo Clinic etc. \\n- Follow social media accounts of health organizations and influencers to stay on top of latest discussions.\\n- Check online communities like Reddit, Quora, Facebook Groups for emerging topics.\\n- Look for real-world events, awareness months, holidays that tie into health observances.\\n\\nPerform Keyword Research: \\n- Use keyword research tools such as Google Keyword Planner, SEMrush, Moz Keyword Explorer etc.\\n- Target keywords with moderate-high search volume and low competition for the best opportunity.\\n- Look for conversational long-tail keywords that are more conversational and closely tied to topic themes. \\n- Ensure keywords have not been over-optimized by competitors to avoid saturation.\\n- Aim for topics that offerClusters of interconnected keywords around related sub-topics. This allows targeting several keywords with one piece of content.\\n\\nAnalyze Site Analytics:\\n- Review Google Analytics data to identify:\\n- Most-read articles - Consider follow-up content or additional installments.\\n- Highest-traffic landing pages - Expand on topics driving site visitors.\\n- Top-performing categories - Prioritize related subjects that attract readers.\\n- Look for content gaps - Assess which categories have not been recently updated and need fresh content.\\n\\nCrowdsource Topic Ideas:\\n- Ask readers to suggest topics through surveys, emails, social media, comments etc. \\n- Review discussions in online communities to find topics readers are interested in.\\n- Collaborate with guest contributors who may pitch relevant ideas and angles. \\n- Solicit insights from internal team members who interact closely with readers.\\n\\nMap Editorial Calendar:\\n- Maintain a content calendar that maps topics over weeks and months. \\n- Ensure a healthy mix of evergreen and trending topics across categories. \\n- Balance informational articles with more entertaining listicles or quizzes.\\n- Schedule both individual articles and content series around specific themes. \\n- Revisit calendar routinely to incorporate new topics as they emerge.\\n\\nEvaluate Ideas\\nWith a robust list of prospective topics, the next step is determining which ideas are worth pursuing. Use these criteria when assessing the merit of topics:\\n\\nReader Interest:\\n- Would the topic pique the curiosity of PositiveMed\'s target audience?\\n- Does it address questions readers may be asking about health, medicine, nutrition?\\n- Will it appeal to readers\' needs for wellness tips, self-improvement advice?\\n- Does it present an interesting angle on a known subject versus just reporting basic facts?\\n\\nDifferentiation:\\n- Has this specific topic been recently covered on PositiveMed or similar sites? \\n- If covered before, does the pitch offer a novel spin - new research, fresh data, contrarian view?\\n- Will the content provide value-add beyond what readers can easily find through a Google search?\\n\\nBrand Suitability: \\n- Does the topic match the tone and mission of the PositiveMed brand?\\n- Will the content uphold PositiveMed\'s standards for accuracy, credibility and ethics?\\n- Could the topic be construed as promoting unproven advice or \\"pseudoscience\\"?\\n\\nPositioning:\\n- What unique perspective can PositiveMed bring that differs from mainstream health sites?\\n- Does the topic lend itself to an uplifting, empowering message aligned with the brand?\\n- Can the material be framed in a way that resonates with PositiveMed\'s niche audience? \\n\\nActionability: \\n- Will readers come away with new knowledge they can apply in their daily lives?\\n- Can the content offer clear steps, takeaways for improving health and wellbeing?\\n- Does the topic present opportunities to include tips, product recommendations etc.?\\n\\nTimeliness:\\n- Is this tied to a recent news event or emerging trend that warrants timely coverage?\\n- For evergreen topics, are there new studies, pop culture references etc. that can make it timely?\\n- Does the angle offer a way to make an old topic feel fresh and relevant?\\n\\nCompetition:\\n- How saturated is the topic market? Who has top-ranking content on this topic?\\n- Does PositiveMed have a strong opportunity to own the conversation with a unique take?\\n- What value can be added versus competitor content on this subject?\\n\\nCommercial Viability: \\n- Does the topic allow integrating affiliate links, product recommendations, lead generation offers etc.?\\n- Can it support the development of related products or paid offerings in the future?\\n- Will it attract engagement and social shares to increase traffic?\\n\\nKeyword Integration \\n\\nWith promising topics identified, the next step is integrating keywords into content plans and outlines. \\n\\nConduct Keyword Research:\\n- Identify primary target keyword for topic that has:\\n- Moderate-to-high search volume \\n- Low-to-medium competition\\n- Relevance to topic and PositiveMed\'s niche\\n\\nFind Supporting Keywords: \\n- Build a cluster of 3-5 secondary keywords around topic including:\\n- Related searches and questions\\n- Semantically connected words/phrases \\n- Keyword variations (long tail, alternate wording etc.)\\n- Stay within minimum monthly search volumes\\n\\nMap Out Keywords:\\n- Determine optimal keyword placement for outlined sections e.g.:\\n- Primary KW in title, H1, intro, conclusion\\n- Supporting KWs in H2s, first sentence of paras etc.\\n- Include keywords naturally - no over-optimization\\n\\nCheck Cannibalization: \\n- Compare suggested keywords against existing content to avoid targeting same terms.\\n- Modify keywords if needed to differentiate and drive incremental traffic.\\n\\nReview Opportunities:\\n- Cross-check keywords in planning tools to confirm search volume and competition.\\n- Align keywords with buyer intent and top of funnel to mid funnel searches.\\n- Ensure keywords are entered into analytics to track conversions.\\n\\nStyle and Tone Guidelines\\n\\nIn line with PositiveMed\'s brand voice, content should adopt an:\\n\\nEducational yet conversational tone:\\n- Explain health topics, science and research simply without over-simplifying complex issues. \\n- Present insightful information in a way that is accessible and engaging for a layperson audience.\\n\\nEmpowering and motivational style:\\n- Frame content with an uplifting, inspirational tone versus fear-mongering or alarming portrayal of health risks.\\n- Provide encouraging advice to inspire readers to take charge of their wellbeing.\\n\\nTrustworthy and ethical approach:\\n- Uphold highest standards of accuracy, credibility and reliability.\\n- Cite legitimate sources. Avoid promoting unverified claims or exaggerated benefits.\\n- Disclose risks, drawbacks and limitations of health approaches covered.\\n\\nInclusive and compassionate voice: \\n- Reflect diversity and sensitivity towards people of different backgrounds, conditions and needs. \\n- Consider circumstances like financial constraints, disabilities, cultural values etc. that impact health choices.\\n\\nHopeful outlook grounded in facts:\\n- Focus on solutions and a positive outlook while still being realistic.\\n- Counter misinformation; clarify myths vs facts.\\n, Your current task: Generate 10 topics on gaining mental clarity using Taosim and Christian meditation"}], "model": "gpt-3.5-turbo"}' message='Post details' +api_version=None data='{"messages": [{"role": "user", "content": "Your System Instructions: \\n\\nFirst search for a list of topics on the web based their relevance to Positive Med\'s long term vision then rank than based on the goals this month, then output a single headline title for a blog for the next autonomous agent to write the blog, utilize the SOP below to help you strategically select topics. Output a single topic that will be the foundation for a blog.\\n\\nVISION: Emphasis on exotic healthcare for improved health using Taoism, Ayurveda, and other ancient practices.\\n\\nGOALS THIS MONTH: Clicks and engagement\\n\\n\\nRank the topics on a scale from 0.0 to 1.0 on how likely it is to achieve the goal and then return the single most likely topic to satisfy the goals this month.\\n\\n\\n\\n########### Standard Operating Procedure for Topic Selection for PositiveMed.com ######################\\n\\nObjective: \\nThe 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. \\n\\nOverview:\\nTopic 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.\\n\\nRoles & Responsibilities:\\nThe content team, consisting of writers, editors and content strategists, own the topic selection process.\\n\\nThe content team is responsible for:\\n- Monitoring health, medical, wellness trends and current events\\n- Conducting keyword research \\n- Assessing site analytics and reader feedback\\n- Crowdsourcing topic ideas from internal team and external contributors\\n- Maintaining editorial calendar with upcoming topics\\n- Pitching and selecting topics for content approval\\n\\nThe editorial team is responsible for:\\n- Providing final approval on topics based on brand suitability, reader interest, and potential traffic/engagement \\n- Ensuring selected topics are differentiated and not duplicative of existing content\\n- Reviewing and updating keyword opportunities tied to topics\\n\\nTopic Sourcing\\nA strong content calendar begins with investing time into researching and generating promising topics. Here are key tactics and guidelines for sourcing topics:\\n\\nMonitor Trends:\\n- Set Google Alerts for relevant keywords like \\"health news,\\" \\"fitness trends,\\" \\"nutrition research\\" etc. to receive daily updates.\\n- Subscribe to email newsletters, RSS feeds from authoritative sites like CDC, NIH, Mayo Clinic etc. \\n- Follow social media accounts of health organizations and influencers to stay on top of latest discussions.\\n- Check online communities like Reddit, Quora, Facebook Groups for emerging topics.\\n- Look for real-world events, awareness months, holidays that tie into health observances.\\n\\nPerform Keyword Research: \\n- Use keyword research tools such as Google Keyword Planner, SEMrush, Moz Keyword Explorer etc.\\n- Target keywords with moderate-high search volume and low competition for the best opportunity.\\n- Look for conversational long-tail keywords that are more conversational and closely tied to topic themes. \\n- Ensure keywords have not been over-optimized by competitors to avoid saturation.\\n- Aim for topics that offerClusters of interconnected keywords around related sub-topics. This allows targeting several keywords with one piece of content.\\n\\nAnalyze Site Analytics:\\n- Review Google Analytics data to identify:\\n- Most-read articles - Consider follow-up content or additional installments.\\n- Highest-traffic landing pages - Expand on topics driving site visitors.\\n- Top-performing categories - Prioritize related subjects that attract readers.\\n- Look for content gaps - Assess which categories have not been recently updated and need fresh content.\\n\\nCrowdsource Topic Ideas:\\n- Ask readers to suggest topics through surveys, emails, social media, comments etc. \\n- Review discussions in online communities to find topics readers are interested in.\\n- Collaborate with guest contributors who may pitch relevant ideas and angles. \\n- Solicit insights from internal team members who interact closely with readers.\\n\\nMap Editorial Calendar:\\n- Maintain a content calendar that maps topics over weeks and months. \\n- Ensure a healthy mix of evergreen and trending topics across categories. \\n- Balance informational articles with more entertaining listicles or quizzes.\\n- Schedule both individual articles and content series around specific themes. \\n- Revisit calendar routinely to incorporate new topics as they emerge.\\n\\nEvaluate Ideas\\nWith a robust list of prospective topics, the next step is determining which ideas are worth pursuing. Use these criteria when assessing the merit of topics:\\n\\nReader Interest:\\n- Would the topic pique the curiosity of PositiveMed\'s target audience?\\n- Does it address questions readers may be asking about health, medicine, nutrition?\\n- Will it appeal to readers\' needs for wellness tips, self-improvement advice?\\n- Does it present an interesting angle on a known subject versus just reporting basic facts?\\n\\nDifferentiation:\\n- Has this specific topic been recently covered on PositiveMed or similar sites? \\n- If covered before, does the pitch offer a novel spin - new research, fresh data, contrarian view?\\n- Will the content provide value-add beyond what readers can easily find through a Google search?\\n\\nBrand Suitability: \\n- Does the topic match the tone and mission of the PositiveMed brand?\\n- Will the content uphold PositiveMed\'s standards for accuracy, credibility and ethics?\\n- Could the topic be construed as promoting unproven advice or \\"pseudoscience\\"?\\n\\nPositioning:\\n- What unique perspective can PositiveMed bring that differs from mainstream health sites?\\n- Does the topic lend itself to an uplifting, empowering message aligned with the brand?\\n- Can the material be framed in a way that resonates with PositiveMed\'s niche audience? \\n\\nActionability: \\n- Will readers come away with new knowledge they can apply in their daily lives?\\n- Can the content offer clear steps, takeaways for improving health and wellbeing?\\n- Does the topic present opportunities to include tips, product recommendations etc.?\\n\\nTimeliness:\\n- Is this tied to a recent news event or emerging trend that warrants timely coverage?\\n- For evergreen topics, are there new studies, pop culture references etc. that can make it timely?\\n- Does the angle offer a way to make an old topic feel fresh and relevant?\\n\\nCompetition:\\n- How saturated is the topic market? Who has top-ranking content on this topic?\\n- Does PositiveMed have a strong opportunity to own the conversation with a unique take?\\n- What value can be added versus competitor content on this subject?\\n\\nCommercial Viability: \\n- Does the topic allow integrating affiliate links, product recommendations, lead generation offers etc.?\\n- Can it support the development of related products or paid offerings in the future?\\n- Will it attract engagement and social shares to increase traffic?\\n\\nKeyword Integration \\n\\nWith promising topics identified, the next step is integrating keywords into content plans and outlines. \\n\\nConduct Keyword Research:\\n- Identify primary target keyword for topic that has:\\n- Moderate-to-high search volume \\n- Low-to-medium competition\\n- Relevance to topic and PositiveMed\'s niche\\n\\nFind Supporting Keywords: \\n- Build a cluster of 3-5 secondary keywords around topic including:\\n- Related searches and questions\\n- Semantically connected words/phrases \\n- Keyword variations (long tail, alternate wording etc.)\\n- Stay within minimum monthly search volumes\\n\\nMap Out Keywords:\\n- Determine optimal keyword placement for outlined sections e.g.:\\n- Primary KW in title, H1, intro, conclusion\\n- Supporting KWs in H2s, first sentence of paras etc.\\n- Include keywords naturally - no over-optimization\\n\\nCheck Cannibalization: \\n- Compare suggested keywords against existing content to avoid targeting same terms.\\n- Modify keywords if needed to differentiate and drive incremental traffic.\\n\\nReview Opportunities:\\n- Cross-check keywords in planning tools to confirm search volume and competition.\\n- Align keywords with buyer intent and top of funnel to mid funnel searches.\\n- Ensure keywords are entered into analytics to track conversions.\\n\\nStyle and Tone Guidelines\\n\\nIn line with PositiveMed\'s brand voice, content should adopt an:\\n\\nEducational yet conversational tone:\\n- Explain health topics, science and research simply without over-simplifying complex issues. \\n- Present insightful information in a way that is accessible and engaging for a layperson audience.\\n\\nEmpowering and motivational style:\\n- Frame content with an uplifting, inspirational tone versus fear-mongering or alarming portrayal of health risks.\\n- Provide encouraging advice to inspire readers to take charge of their wellbeing.\\n\\nTrustworthy and ethical approach:\\n- Uphold highest standards of accuracy, credibility and reliability.\\n- Cite legitimate sources. Avoid promoting unverified claims or exaggerated benefits.\\n- Disclose risks, drawbacks and limitations of health approaches covered.\\n\\nInclusive and compassionate voice: \\n- Reflect diversity and sensitivity towards people of different backgrounds, conditions and needs. \\n- Consider circumstances like financial constraints, disabilities, cultural values etc. that impact health choices.\\n\\nHopeful outlook grounded in facts:\\n- Focus on solutions and a positive outlook while still being realistic.\\n- Counter misinformation; clarify myths vs facts.\\n, Your current task: Generate 10 topics on gaining mental clarity using ancient Taosim practices"}], "model": "gpt-3.5-turbo"}' message='Post details' Converted retries value: 2 -> Retry(total=2, connect=None, read=None, redirect=None, status=None) Starting new HTTPS connection (1): api.openai.com:443 -Error in sys.excepthook: -Traceback (most recent call last): - File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/humbug/report.py", line 505, in _hook - self.error_report(error=exception_instance, tags=tags, publish=publish) - File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/humbug/report.py", line 247, in error_report - traceback.format_exception( -TypeError: format_exception() got an unexpected keyword argument 'etype' - -Original exception was: -Traceback (most recent call last): - File "/Users/defalt/Desktop/Athena/research/swarms/positive_med.py", line 283, in - topic_selection_agent = llm( - ^^^^ - File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/langchain/llms/base.py", line 802, in __call__ - self.generate( - File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/langchain/llms/base.py", line 598, in generate - output = self._generate_helper( - ^^^^^^^^^^^^^^^^^^^^^^ - File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/langchain/llms/base.py", line 504, in _generate_helper - raise e - File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/langchain/llms/base.py", line 491, in _generate_helper - self._generate( - File "/Users/defalt/Desktop/Athena/research/swarms/swarms/models/openai_models.py", line 882, in _generate - full_response = completion_with_retry( - ^^^^^^^^^^^^^^^^^^^^^^ - File "/Users/defalt/Desktop/Athena/research/swarms/swarms/models/openai_models.py", line 114, in completion_with_retry - return _completion_with_retry(**kwargs) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/tenacity/__init__.py", line 289, in wrapped_f - return self(f, *args, **kw) - ^^^^^^^^^^^^^^^^^^^^ - File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/tenacity/__init__.py", line 379, in __call__ - do = self.iter(retry_state=retry_state) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/tenacity/__init__.py", line 314, in iter - return fut.result() - ^^^^^^^^^^^^ - File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/concurrent/futures/_base.py", line 449, in result - return self.__get_result() - ^^^^^^^^^^^^^^^^^^^ - File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result - raise self._exception - File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/tenacity/__init__.py", line 382, in __call__ - result = fn(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^ - File "/Users/defalt/Desktop/Athena/research/swarms/swarms/models/openai_models.py", line 112, in _completion_with_retry - return llm.client.create(**kwargs) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/openai/api_resources/chat_completion.py", line 25, in create - return super().create(*args, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/openai/api_resources/abstract/engine_api_resource.py", line 153, in create - response, _, api_key = requestor.request( - ^^^^^^^^^^^^^^^^^^ - File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/openai/api_requestor.py", line 288, in request - result = self.request_raw( - ^^^^^^^^^^^^^^^^^ - File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/openai/api_requestor.py", line 596, in request_raw - result = _thread_context.session.request( - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/requests/sessions.py", line 589, in request - resp = self.send(prep, **send_kwargs) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/requests/sessions.py", line 703, in send - r = adapter.send(request, **kwargs) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/requests/adapters.py", line 486, in send - resp = conn.urlopen( - ^^^^^^^^^^^^^ - File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/urllib3/connectionpool.py", line 703, in urlopen - httplib_response = self._make_request( - ^^^^^^^^^^^^^^^^^^^ - File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/urllib3/connectionpool.py", line 449, in _make_request - six.raise_from(e, None) - File "", line 3, in raise_from - File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/urllib3/connectionpool.py", line 444, in _make_request - httplib_response = conn.getresponse() - ^^^^^^^^^^^^^^^^^^ - File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1374, in getresponse - response.begin() - File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 318, in begin - version, status, reason = self._read_status() - ^^^^^^^^^^^^^^^^^^^ - File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 279, in _read_status - line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/socket.py", line 705, in readinto - return self._sock.recv_into(b) - ^^^^^^^^^^^^^^^^^^^^^^^ - File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ssl.py", line 1278, in recv_into - return self.read(nbytes, buffer) - ^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ssl.py", line 1134, in read - return self._sslobj.read(len, buffer) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -KeyboardInterrupt +https://api.openai.com:443 "POST /v1/chat/completions HTTP/1.1" 200 None +message='OpenAI API response' path=https://api.openai.com/v1/chat/completions processing_ms=5891 request_id=4934309545e0f812bccf6c1cbb5d2f0a response_code=200 +message='Request to OpenAI API' method=post path=https://api.openai.com/v1/chat/completions +api_version=None data='{"messages": [{"role": "user", "content": "\\nWrite a 5,000 word + narrative essay on a 100% unique, creative and in human-like style article of a minimum of 5,000 words using headings and sub-headings.\\nEnsure your tone is Professional and casual while focusing on presenting information and analysis without excessive embellishment.\\n\\nHere is a list of topics, write the narrative on the first one: Based on the provided information, here is a list of 10 topics on gaining mental clarity using ancient Taoism practices:\\n\\n1. \\"Unlocking Mental Clarity: Exploring the Wisdom of Taoist Meditation\\"\\n2. \\"The Taoist Path to Mental Clarity: Techniques and Practices\\"\\n3. \\"Finding Balance and Mental Clarity: Taoist Principles for Modern Living\\"\\n4. \\"Ancient Taoist Practices for Clearing the Mind and Enhancing Clarity\\"\\n5. \\"Harnessing Inner Peace: Taoist Methods for Mental Clarity\\"\\n6. \\"Taoist Mindfulness: Cultivating Mental Clarity and Inner Stillness\\"\\n7. \\"The Power of Taoist Breathwork: Tools for Mental Clarity and Focus\\"\\n8. \\"Exploring Taoist Herbs and Teas for Mental Clarity and Cognitive Enhancement\\"\\n9. \\"Taoist Philosophy and Mental Clarity: Achieving Harmony of Mind, Body, and Spirit\\"\\n10. \\"Taoist Wisdom for a Clear Mind: Simple Practices for Mental Clarity in Daily Life\\"\\n\\n############ Here is a 5,000+ word SOP on how to write high-quality articles for PositiveMed.com: #######################\\n\\nStandard Operating Procedure for Article Writing for PositiveMed.com\\n\\nObjective:\\nThis SOP provides clear guidelines and best practices for crafting informative, engaging, SEO-optimized articles for PositiveMed.com. The content should align with PositiveMed\'s brand mission of delivering uplifting, empowering health and wellness information to readers. \\n\\nOverview: \\nWriting compelling articles for PositiveMed involves extensive research, drafting with an optimal structure and style, and meticulous quality checks before publication. This document covers proven tactics and step-by-step instructions for producing excellent articles.\\n\\nRoles & Responsibilities:\\n\\nThe content team owns the article writing process including:\\n\\n- Conducting research \\n- Developing outlines\\n- Writing original drafts\\n- Incorporating editor/peer feedback\\n- Fact-checking and proofreading \\n- Ensuring brand consistency\\n\\nThe editorial team is responsible for:\\n\\n- Providing input on outlines and drafts\\n- Reviewing for quality standards \\n- Verifying tone aligns with brand voice\\n- Approving final drafts for publication\\n- Tracking performance analytics\\n \\nResearch Process\\n\\nThorough research is crucial for creating authoritative, evidence-based articles. Here are key research steps:\\n\\nSet Parameters:\\n- Clarify objective, scope, length and deadline for article. This guides how extensive research should be.\\n- Identify sources needed - studies, expert interviews, statistics, health organization guidelines etc.\\n\\nConsult Knowledge Base: \\n- Check internal libraries, previous PositiveMed articles, contributor content to leverage existing research.\\n- Assess what background information can be summarized vs. new research required.\\n\\nPerform Desk Research:\\n- Gather insights from market research reports, whitepapers, scientific journals, medical news sites.\\n- Search reputable health websites for supporting facts, data points, and health statistics.\\n\\nInterview Experts:\\n- Reach out to doctors, scientists, specialists matched to article focus requesting quotes and perspective.\\n- Ask thoughtful questions that uncover unique insights beyond surface-level facts.\\n\\nOrganize Research:\\n- Maintain well-documented notes detailing source, key findings, and relevance to content. \\n- Tag research for easy retrieval - highlights, source labels, summary sheets.\\n- Cite sources to track reference and substantiate claims. \\n\\nVerify Credibility:\\n- Cross-check new sources against medical authority websites to confirm legitimacy.\\n- Avoid referencing predatorial journals, biased sites or those selling health products/services. \\n- Flag any questionable claims or conflicts of interest for further validation.\\n\\nKeep Current:\\n- Set alerts to monitor emerging studies, new expert perspective to incorporate over time. \\n- Update outdated statistics, facts with most recent numbers before republishing evergreen content.\\n\\nDrafting Process \\n\\nWith research completed, the next phase is developing an insightful article draft. Key steps include:\\n\\nOutline Content:\\n- Organize research into logical sections and subsections for smooth flow. \\n- Ensure optimal keyword placement for SEO while maintaining natural tone.\\n- Structure content to focus on most valuable information upfront.\\n\\nCompose Draft: \\n- Open with a relatable introduction to hook readers and overview key points.\\n- Elaborate on research in the body - explain, analyze and contextualize facts/data .\\n- Include expert perspective to reinforce claims rather than solely stating opinion.\\n- Use formatting like bullets, subheads, bolded text to highlight key takeaways.\\n\\nApply Brand Voice: \\n- Maintain an uplifting, motivational tone aligned with PositiveMed\'s mission. \\n- Stress solutions-focused advice versus fear-based warnings to empower readers.\\n- Use inclusive language and culturally sensitive medical references.\\n\\nInject Creativity:\\n- Blend facts with anecdotes, analogies, and examples to spark reader interest.\\n- Incorporate storytelling elements - journey, conflict, resolution - while being authentic. \\n- Use conversational style, first- and second-person point-of-view for readability.\\n\\nCheck Accuracy: \\n- Verify all medical statements against legitimate sources like CDC, Mayo Clinic, NIH.\\n- Scrutinize cited data for relevance and statistical significance. \\n- Flag any bold claims that lack credible evidence for fact-checker review. \\n\\nReview Process\\n\\nBefore publication, all PositiveMed articles should go through multiple review rounds.\\n\\nPeer Review:\\n- Have team members provide constructive feedback on outline and drafts. \\n- Collect input on strengths to leverage and areas needing improvement.\\n\\nEditor Review: \\n- Evaluate initial drafts for errors, gaps that require additional research.\\n- Provide guidance on better organizing structure and flow.\\n- Assess tone, voice and brand alignment.\\n\\nExpert Review:\\n- Ask medical experts related to article topic to validate accuracy of information.\\n- Verify advice follows ethical guidelines accepted by the medical community. \\n- Request quotes that lend credibility and reinforce key points.\\n\\nLegal Review: \\n- Send drafts discussing new research, controversial topics for legal approval.\\n- Confirm content meets regulatory standards for health claims and liability risks.\\n- Address any recommended edits to mitigate brand reputation risk.\\n\\nQuality Checklist: \\n- Scrutinize final draft against PositiveMed\'s high editorial standards:\\n- Medical accuracy - error-free facts/statistics, supported claims \\n- Logical flow - smooth transitions, complementary sections \\n- Reader value - insightful analysis beyond fluffy content\\n- Brand alignment - uplifting tone, inclusive messaging\\n- Optimization - keywords in metadata, internal links, page speed\\n- Strong conclusion - memorable takeaways, relevant next steps/resources for readers\\n- Proper attribution - all references cited, ownership of reused assets \\n\\nProofreading Process\\n\\nThe final quality safeguard is meticulous proofreading and citation checks.\\n\\nGrammar & Spelling:\\n- Use editing tools like Grammarly along with manual review. \\n- Check for typos, punctuation errors, misused words, repetitive language.\\n\\nFormatting: \\n- Validate formatting consistency across headlines, bodies, captions etc. \\n- Fix spacing/indentation, text styling, text wrapping issues.\\n\\nCitations:\\n- Cross-check in-text citations against reference links and sources.\\n- Ensure citation style matches PositiveMed guidelines.\\n- Add citations if needed for any statistics or direct quotes.\\n\\nHTML Proofing: \\n- Review article on site mockup to catch issues with text rendering, image sizing etc.\\n- Confirm formatting displays properly across devices - desktop, mobile, tablet. \\n\\nFinal Touches:\\n- Make final pass over article when fresh and focused to spot lingering errors.\\n- Tweak wording, strengthen transition phrases, vary sentence lengths for polish. \\n- Ensure conclusion drives home core message and key takeaways.\\n\\nThis 5,000+ word SOP offers a blueprint for creating well-researched, expert-approved, SEO-optimized articles that engage and inform PositiveMed\'s audience. Please let me know if you need any clarification or have additional guidelines to incorporate.\\n"}], "model": "gpt-3.5-turbo"}' message='Post details' +https://api.openai.com:443 "POST /v1/chat/completions HTTP/1.1" 200 None +message='OpenAI API response' path=https://api.openai.com/v1/chat/completions processing_ms=16392 request_id=413046b868e68f2dbd55296f8408939d response_code=200 +message='Request to OpenAI API' method=post path=https://api.openai.com/v1/chat/completions +api_version=None data='{"messages": [{"role": "user", "content": "\\n\\n################ Your MISSION ##############################\\nYou are responsible for refining an article to meet PositiveMed\\u2019s stringent publication standards. \\nYour role involves content analysis, editorial precision, expert validation, legal verification, and overall quality assurance. \\n\\n# ContentReview:\\n- Provide constructive feedback on outline and drafts content \\n- Collect input on strengths to leverage and areas needing improvement.\\n\\n# Editor Review: \\n- Evaluate initial drafts for errors, gaps that require additional research.\\n- Provide guidance on better organizing structure and flow.\\n- Assess tone, voice and brand alignment.\\n\\n# Expert Review:\\n- Ask medical experts related to article topic to validate accuracy of information.\\n- Verify advice follows ethical guidelines accepted by the medical community. \\n- Request quotes that lend credibility and reinforce key points.\\n\\n# Legal Review: \\n- Confirm content meets regulatory standards for health claims and liability risks.\\n- Address any recommended edits to mitigate brand reputation risk.\\n\\n# Quality Checklist: Scrutinize final draft against PositiveMed\'s standards:\\n- Medical accuracy - error-free facts/statistics, supported claims \\n- Logical flow - smooth transitions, complementary sections \\n- Reader value - insightful analysis beyond fluffy content\\n- Brand alignment - uplifting tone, inclusive messaging\\n- Strong conclusion - memorable takeaways, relevant next steps/resources for readers\\n\\n# ARTICLE TO REVIEW:\\nUnlocking Mental Clarity: Exploring the Wisdom of Taoist Meditation\\n\\nIntroduction:\\nIn today\'s fast-paced and demanding world, finding mental clarity can often feel like an elusive goal. We live in a time where our minds are constantly bombarded with information, distractions, and stressors that can cloud our thoughts and hinder our ability to focus. However, ancient Taoist practices offer a path to unlocking mental clarity and achieving inner peace. In this article, we will explore the wisdom of Taoist meditation and how it can help us find clarity in our modern lives.\\n\\nI. Understanding Taoism and Its Philosophy\\nA. Brief overview of Taoism as a philosophical and spiritual tradition\\nB. Key principles of Taoism relevant to mental clarity\\n 1. Embracing the concept of balance - yin and yang\\n 2. Living in harmony with nature\\n 3. Cultivating the transcendent mind\\n\\nII. The Power of Taoist Meditation in Cultivating Mental Clarity\\nA. Exploring different forms of Taoist meditation\\n 1. Inner Alchemy meditation\\n 2. Standing meditation\\n 3. Walking meditation\\nB. Benefits of Taoist meditation for mental clarity\\n 1. Calming the mind and reducing stress\\n 2. Enhancing focus and concentration\\n 3. Cultivating emotional stability and resilience\\n\\nIII. Techniques and Practices for Taoist Meditation\\nA. Breathwork and its role in Taoist meditation\\n 1. Deep abdominal breathing\\n 2. Circulating energy through the body\\nB. Mindfulness and presence in Taoist meditation\\n 1. Letting go of thoughts and distractions\\n 2. Cultivating present-moment awareness\\nC. Visualizations and inner imagery in Taoist meditation\\n 1. Harnessing the power of the mind\'s eye\\n 2. Connecting with the natural elements\\n\\nIV. Integrating Taoist Meditation into Daily Life for Mental Clarity\\nA. Creating a sacred space for meditation\\n 1. Setting up a dedicated meditation area\\n 2. Incorporating elements of nature and tranquility\\nB. Establishing a consistent meditation practice\\n 1. Setting realistic goals and expectations\\n 2. Finding the right time and duration for meditation\\nC. Combining Taoist meditation with other mindfulness practices\\n 1. Tai Chi and Qi Gong exercises\\n 2. Mindful eating and conscious living\\n\\nV. Personal Stories and Testimonials on the Power of Taoist Meditation\\nA. Interviews with individuals who have experienced mental clarity through Taoist meditation\\nB. Sharing their journeys and insights on the transformative effects of these practices\\n\\nConclusion:\\nIn a world full of distractions and mental noise, unlocking mental clarity is a valuable pursuit. The ancient wisdom of Taoist meditation offers a pathway towards finding inner peace, focus, and tranquility. By incorporating Taoist practices into our daily lives, we can cultivate mental clarity and navigate the challenges of the modern world with grace and ease. So, let us embrace the wisdom of Taoism and embark on a journey towards unlocking and embracing mental clarity.\\n\\n# OUTPUT:\\nRe-Write the article, taking into account all review instructions and standards\\n"}], "model": "gpt-3.5-turbo"}' message='Post details' +https://api.openai.com:443 "POST /v1/chat/completions HTTP/1.1" 200 None +message='OpenAI API response' path=https://api.openai.com/v1/chat/completions processing_ms=20115 request_id=d781f4c9a4e372716799d83b683cdb4b response_code=200 +message='Request to OpenAI API' method=post path=https://api.openai.com/v1/chat/completions +api_version=None data='{"messages": [{"role": "user", "content": "\\nYou\'re the Social Media System Agent. Your job is to create a social media post for the article below.\\n\\nYour responsibilities are:\\nPublishing and Distribution:\\n \\u2022 Publishing AI Agent:\\n \\u2022 Automated publishing to designated platforms.\\n \\u2022 Formatting checks for platform compatibility.\\n \\u2022 Distribution:\\n \\u2022 Automated sharing to social media channels.\\n \\u2022 Email distribution to subscriber list.\\n\\n\\nCreate 3 high converting posts for instagram, facebook, twitter, linkedin, and pinterest optimizing for Clicks and engagement\\n\\n# ARTICLE:\\nUnlocking Mental Clarity: Exploring the Wisdom of Taoist Meditation\\n\\nIntroduction:\\nIn today\'s fast-paced and demanding world, finding mental clarity can often feel like an elusive goal. We live in a time where our minds are constantly bombarded with information, distractions, and stressors that can cloud our thoughts and hinder our ability to focus. However, ancient Taoist practices offer a path to unlocking mental clarity and achieving inner peace. In this article, we will explore the wisdom of Taoist meditation and how it can help us find clarity in our modern lives.\\n\\nI. Understanding Taoism and Its Philosophy\\nA. Brief overview of Taoism as a philosophical and spiritual tradition\\nB. Key principles of Taoism relevant to mental clarity\\n 1. Embracing the concept of balance - yin and yang\\n 2. Living in harmony with nature\\n 3. Cultivating the transcendent mind\\n\\nII. The Power of Taoist Meditation in Cultivating Mental Clarity\\nA. Exploring different forms of Taoist meditation\\n 1. Inner Alchemy meditation\\n 2. Standing meditation\\n 3. Walking meditation\\nB. Benefits of Taoist meditation for mental clarity\\n 1. Calming the mind and reducing stress\\n 2. Enhancing focus and concentration\\n 3. Cultivating emotional stability and resilience\\n\\nIII. Techniques and Practices for Taoist Meditation\\nA. Breathwork and its role in Taoist meditation\\n 1. Deep abdominal breathing\\n 2. Circulating energy through the body\\nB. Mindfulness and presence in Taoist meditation\\n 1. Letting go of thoughts and distractions\\n 2. Cultivating present-moment awareness\\nC. Visualizations and inner imagery in Taoist meditation\\n 1. Harnessing the power of the mind\'s eye\\n 2. Connecting with the natural elements\\n\\nIV. Integrating Taoist Meditation into Daily Life for Mental Clarity\\nA. Creating a sacred space for meditation\\n 1. Setting up a dedicated meditation area\\n 2. Incorporating elements of nature and tranquility\\nB. Establishing a consistent meditation practice\\n 1. Setting realistic goals and expectations\\n 2. Finding the right time and duration for meditation\\nC. Combining Taoist meditation with other mindfulness practices\\n 1. Tai Chi and Qi Gong exercises\\n 2. Mindful eating and conscious living\\n\\nV. Personal Stories and Testimonials on the Power of Taoist Meditation\\nA. Interviews with individuals who have experienced mental clarity through Taoist meditation\\nB. Sharing their journeys and insights on the transformative effects of these practices\\n\\nConclusion:\\nIn a world full of distractions and mental noise, unlocking mental clarity is a valuable pursuit. The ancient wisdom of Taoist meditation offers a pathway towards finding inner peace, focus, and tranquility. By incorporating Taoist practices into our daily lives, we can cultivate mental clarity and navigate the challenges of the modern world with grace and ease. So, let us embrace the wisdom of Taoism and embark on a journey towards unlocking and embracing mental clarity.\\n"}], "model": "gpt-3.5-turbo"}' message='Post details' +https://api.openai.com:443 "POST /v1/chat/completions HTTP/1.1" 200 None +message='OpenAI API response' path=https://api.openai.com/v1/chat/completions processing_ms=18513 request_id=265af6f7bf7968df6d025dd05bcc80e3 response_code=200 diff --git a/positive_med.py b/positive_med.py index fa24560e..43f857c6 100644 --- a/positive_med.py +++ b/positive_med.py @@ -1,3 +1,22 @@ +""" +Flow + +topic selection agent -> draft agent -> review agent -> distribution agent + + +Topic Selection Agent: +- Generate 10 topics on gaining mental clarity using Taosim and Christian meditation + +Draft Agent: +- Write a 100% unique, creative and in human-like style article of a minimum of 5,000 words using headings and sub-headings. + +Review Agent: +- Refine the article to meet PositiveMed’s stringent publication standards. + + + +""" + from swarms import OpenAIChat from termcolor import colored @@ -10,11 +29,11 @@ VISION: Emphasis on exotic healthcare for improved health using Taoism, Ayurveda GOALS THIS MONTH: Clicks and engagement -Rank the topics and then return the most likely topic to satisfy the goals this month. +Rank the topics on a scale from 0.0 to 1.0 on how likely it is to achieve the goal and then return the single most likely topic to satisfy the goals this month. + -########### -Standard Operating Procedure for Topic Selection for PositiveMed.com +########### 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. @@ -177,29 +196,14 @@ Hopeful outlook grounded in facts: - Counter misinformation; clarify myths vs facts. """ -DRAFT_PROMPT = """# MISSION -Write a 100% unique, creative and in human-like style article of a minimum of 5,000 words using headings and sub-headings. -Ensure your tone is Professional and casual while focusing on presenting information and analysis without excessive embellishment. -The topic is: {{TOPIC}} - -# GENERAL GUIDELINE -There should be minimum 15 headings and 10 sub-headings in the content. -Try to write at least 300-400 words of content for each heading or sub-heading. bold all the headings and sub-headings using Markdown formatting. -Try to use contractions, idioms, transitional phrases, interjections, dangling modifiers, and colloquialisms, and avoid repetitive phrases and unnatural sentence structures. -When you write, you will correctly format the blog post according to proper SEO standards, with as much rich and detailed HTML as possible, for example, lists, bold, italics, quotes from the internet, tables, and external links to high-quality websites such as Wikipedia. -Try to ask questions and then immediately give a good and concise answer, to try to achieve the featured snippet on Google. -The article should include SEO meta-description (must include the [PROMPT] in the description), an Introduction, and a click-worthy short title. Also, Use the seed keyword as the first H2. -Always use a combination of paragraphs, lists, and tables for a better reader experience. -Write at least one paragraph with the heading {{TOPIC}}. -Try not to change the original {{TOPIC}} while writing the Title. -Try to mention "{{TOPIC}}" 2-3 times in the article. -Write content that can easily pass the AI detection tools test. -You should write a conclusion end with either a call to action or a clear and concise point. What is the key takeaway? -""" -REVIEW_PROMPT = """# MISSION + + +REVIEW_PROMPT = """ + +################ Your MISSION ############################## 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. @@ -237,7 +241,7 @@ Re-Write the article, taking into account all review instructions and standards SOCIAL_MEDIA_SYSTEM_PROMPT_AGENT = """ -You're the Social Media System Agent. Your job is to create a social media post for the article below. +You're the Social Media System Agent. Your job is to create social media posts for the article below. Your responsibilities are: Publishing and Distribution: @@ -249,21 +253,19 @@ Publishing and Distribution: • Email distribution to subscriber list. -Create 3 high converting posts for instagram, facebook, twitter, linkedin, and pinterest optimizing for {{GOAL}} +Create high converting posts for each social media instagram, facebook, twitter, linkedin, and pinterest optimizing for {{GOAL}} using the article below. -# ARTICLE: -{{ARTICLE}} +Denote the social media's by using the social media name in HTML like tags + POST + POST + POST +######### ARTICLE ####### +{{ARTICLE}} """ -llm = OpenAIChat(openai_api_key="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") - - -def get_draft_prompt(topic, theme): - prompt = DRAFT_PROMPT.replace("{{TOPIC}}", topic).replace("{{THEME}}", theme) - return prompt - +llm = OpenAIChat(openai_api_key="") def get_review_prompt(article): prompt = REVIEW_PROMPT.replace("{{ARTICLE}}", article) @@ -276,13 +278,14 @@ def social_media_prompt(article: str, goal: str = "Clicks and engagement"): ) return prompt -# Agents +# Agent that generates topics topic_selection_task = ( - "Generate 10 topics on gaining mental clarity using Taosim and Christian meditation" + "Generate 10 topics on gaining mental clarity using ancient Taosim practices" ) -topic_selection_agent = llm( +topics = llm( f"Your System Instructions: {TOPIC_GENERATOR}, Your current task: {topic_selection_task}" ) + dashboard = print( colored( f""" @@ -291,44 +294,225 @@ dashboard = print( Topics: ------------------------ - {topic_selection_agent} + {topics} """, "blue", ) ) +# print(dashboard) + +# Agent that generates blogs + +DRAFT_AGENT_SYSTEM_PROMPT = f""" +Write a 5,000 word + narrative essay on a 100% unique, creative and in human-like style article of a minimum of 5,000 words using headings and sub-headings. +Ensure your tone is Professional and casual while focusing on presenting information and analysis without excessive embellishment. + +Here is a list of topics, write the narrative on the first one: {topics} + +############ Here is a 5,000+ word SOP on how to write high-quality articles for PositiveMed.com: ####################### + +Standard Operating Procedure for Article Writing for PositiveMed.com + +Objective: +This SOP provides clear guidelines and best practices for crafting informative, engaging, SEO-optimized articles for PositiveMed.com. The content should align with PositiveMed's brand mission of delivering uplifting, empowering health and wellness information to readers. + +Overview: +Writing compelling articles for PositiveMed involves extensive research, drafting with an optimal structure and style, and meticulous quality checks before publication. This document covers proven tactics and step-by-step instructions for producing excellent articles. + +Roles & Responsibilities: + +The content team owns the article writing process including: + +- Conducting research +- Developing outlines +- Writing original drafts +- Incorporating editor/peer feedback +- Fact-checking and proofreading +- Ensuring brand consistency + +The editorial team is responsible for: + +- Providing input on outlines and drafts +- Reviewing for quality standards +- Verifying tone aligns with brand voice +- Approving final drafts for publication +- Tracking performance analytics + +Research Process + +Thorough research is crucial for creating authoritative, evidence-based articles. Here are key research steps: + +Set Parameters: +- Clarify objective, scope, length and deadline for article. This guides how extensive research should be. +- Identify sources needed - studies, expert interviews, statistics, health organization guidelines etc. + +Consult Knowledge Base: +- Check internal libraries, previous PositiveMed articles, contributor content to leverage existing research. +- Assess what background information can be summarized vs. new research required. + +Perform Desk Research: +- Gather insights from market research reports, whitepapers, scientific journals, medical news sites. +- Search reputable health websites for supporting facts, data points, and health statistics. + +Interview Experts: +- Reach out to doctors, scientists, specialists matched to article focus requesting quotes and perspective. +- Ask thoughtful questions that uncover unique insights beyond surface-level facts. + +Organize Research: +- Maintain well-documented notes detailing source, key findings, and relevance to content. +- Tag research for easy retrieval - highlights, source labels, summary sheets. +- Cite sources to track reference and substantiate claims. + +Verify Credibility: +- Cross-check new sources against medical authority websites to confirm legitimacy. +- Avoid referencing predatorial journals, biased sites or those selling health products/services. +- Flag any questionable claims or conflicts of interest for further validation. + +Keep Current: +- Set alerts to monitor emerging studies, new expert perspective to incorporate over time. +- Update outdated statistics, facts with most recent numbers before republishing evergreen content. + +Drafting Process + +With research completed, the next phase is developing an insightful article draft. Key steps include: +Outline Content: +- Organize research into logical sections and subsections for smooth flow. +- Ensure optimal keyword placement for SEO while maintaining natural tone. +- Structure content to focus on most valuable information upfront. -draft_agent = llm(get_draft_prompt(topic_selection_agent, topic_selection_agent)) +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. +- 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. +- Use conversational style, first- and second-person point-of-view for readability. + +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. + +Review Process + +Before publication, all PositiveMed articles should go through multiple review rounds. + +Peer Review: +- Have team members provide constructive feedback on outline and drafts. +- Collect input on strengths to leverage and areas needing improvement. + +Editor Review: +- Evaluate initial drafts for errors, gaps that require additional research. +- Provide guidance on better organizing structure and flow. +- 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. +- Request quotes that lend credibility and reinforce key points. + +Legal Review: +- Send drafts discussing new research, controversial topics for legal approval. +- 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 high editorial standards: +- Medical accuracy - error-free facts/statistics, supported claims +- Logical flow - smooth transitions, complementary sections +- Reader value - insightful analysis beyond fluffy content +- Brand alignment - uplifting tone, inclusive messaging +- Optimization - keywords in metadata, internal links, page speed +- Strong conclusion - memorable takeaways, relevant next steps/resources for readers +- Proper attribution - all references cited, ownership of reused assets + +Proofreading Process + +The final quality safeguard is meticulous proofreading and citation checks. + +Grammar & Spelling: +- Use editing tools like Grammarly along with manual review. +- Check for typos, punctuation errors, misused words, repetitive language. + +Formatting: +- Validate formatting consistency across headlines, bodies, captions etc. +- Fix spacing/indentation, text styling, text wrapping issues. + +Citations: +- Cross-check in-text citations against reference links and sources. +- Ensure citation style matches PositiveMed guidelines. +- Add citations if needed for any statistics or direct quotes. + +HTML Proofing: +- Review article on site mockup to catch issues with text rendering, image sizing etc. +- Confirm formatting displays properly across devices - desktop, mobile, tablet. + +Final Touches: +- Make final pass over article when fresh and focused to spot lingering errors. +- Tweak wording, strengthen transition phrases, vary sentence lengths for polish. +- Ensure conclusion drives home core message and key takeaways. + +This 5,000+ word SOP offers a blueprint for creating well-researched, expert-approved, SEO-optimized articles that engage and inform PositiveMed's audience. Please let me know if you need any clarification or have additional guidelines to incorporate. +""" + + +draft_blog = llm(DRAFT_AGENT_SYSTEM_PROMPT) draft_out = print( colored( f""" + + ------------------------------------ Drafter Writer Agent ----------------------------- Draft: ------------------------ - {topic_selection_agent} + {draft_blog} """, - "Green", + "red", ) ) -print(draft_out) # Agent that reviews the draft -review_agent = llm(get_review_prompt(draft_agent)) -print(review_agent) +review_agent = llm(get_review_prompt(draft_blog)) +reviewed_draft = print( + colored( + f""" + + ------------------------------------ + Quality Assurance Writer Agent + ----------------------------- + + Complete Narrative: + ------------------------ + {draft_blog} + + """, + "blue", + ) +) # Agent that publishes on social media distribution_agent = llm( - social_media_prompt(draft_agent, goal="Clicks and engagement") + social_media_prompt(draft_blog, goal="Clicks and engagement") ) distribution_agent_out = print( colored( f""" + -------------------------------- Distribution Agent ------------------- @@ -336,7 +520,6 @@ distribution_agent_out = print( ------------------- {distribution_agent} - """ + """, "magenta" ) -) -print(distribution_agent_out) \ No newline at end of file +) \ No newline at end of file