<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Abhijit Menon on Medium]]></title>
        <description><![CDATA[Stories by Abhijit Menon on Medium]]></description>
        <link>https://medium.com/@menon.ab?source=rss-958e93b5db45------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*MJS0MJzDdY0DlETSgPE2IQ@2x.jpeg</url>
            <title>Stories by Abhijit Menon on Medium</title>
            <link>https://medium.com/@menon.ab?source=rss-958e93b5db45------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 22:06:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@menon.ab/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[AI Agent Marketplace: Building an Open Ecosystem for AI Agents]]></title>
            <link>https://blog.stackademic.com/ai-agent-marketplace-building-an-open-ecosystem-for-ai-agents-2e6db0ba1746?source=rss-958e93b5db45------2</link>
            <guid isPermaLink="false">https://medium.com/p/2e6db0ba1746</guid>
            <category><![CDATA[gen-ai-for-business]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[llm-agent]]></category>
            <category><![CDATA[data-engineering]]></category>
            <dc:creator><![CDATA[Abhijit Menon]]></dc:creator>
            <pubDate>Mon, 17 Feb 2025 04:12:21 GMT</pubDate>
            <atom:updated>2025-02-17T04:51:27.688Z</atom:updated>
            <content:encoded><![CDATA[<h3>AgentHive — A<strong>n Open Ecosystem for AI Agents</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dIH-Fe0NlWtHbbfMCeDd3A.jpeg" /></figure><p><a href="https://github.com/akmenon1996/ai-agent-marketplace/tree/main"><strong>AgentHive</strong></a> is an open-source initiative designed to provide a flexible and extensible framework for AI-driven agents. It enables users to interact with multiple AI agents, each designed for specialized tasks, fostering a collaborative AI ecosystem.</p><p>In today’s rapidly evolving digital landscape, professionals often juggle multiple tools to accomplish specialized tasks. <a href="https://github.com/akmenon1996/ai-agent-marketplace/tree/main"><strong>AgentHive</strong></a><strong> </strong>consolidates these capabilities into a single, user-friendly platform, offering on-demand access to AI agents tailored for tasks ranging from code review to interview preparation. This centralized approach not only streamlines workflows but also democratizes access to advanced AI functionalities, empowering users of all technical backgrounds to enhance their productivity.</p><p>Imagine a digital marketplace where AI agents with specialized skills can be hired on demand, much like freelancers on Fiverr or Upwork. <a href="https://github.com/akmenon1996/ai-agent-marketplace/tree/main"><strong>AgentHive</strong></a> aims to revolutionize the way AI-powered tools are utilized, offering a seamless platform where users can engage intelligent agents for specific tasks, from resume generation to interview preparation.</p><p>This article delves into <a href="https://github.com/akmenon1996/ai-agent-marketplace/tree/main"><strong>AgentHive</strong></a>, covering its <strong>purpose, current features, underlying technology, roadmap for future enhancements</strong>, and how the community can contribute to this growing ecosystem.</p><h3>Technical Architecture</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/777/1*sZZxG2hwlFt7An8kgQcTvg.png" /><figcaption>High Level Flow</figcaption></figure><h3>Overview</h3><p>The platform is built using a modern tech stack:</p><ul><li>Frontend: React with TypeScript and Material-UI</li><li>Backend: FastAPI (Python)</li><li>Database: SQLAlchemy with SQLite</li><li>Authentication: JWT-based token authentication</li><li>API: RESTful endpoints with OpenAPI documentation</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_XrsGRvuabevz9m3oflE1w.png" /><figcaption>AI Agents Distribution and Integration</figcaption></figure><h3>Key Components</h3><h4>1. Frontend Architecture</h4><ul><li>React with TypeScript: Provides type-safe component development</li><li>Material-UI: Implements a consistent, modern UI design</li><li>Context-based State Management: Handles authentication and user state</li><li>React Router: Manages application routing and navigation</li></ul><h4>2. Backend Architecture</h4><ul><li>FastAPI Framework: Offers high-performance API endpoints</li><li>SQLAlchemy ORM: Provides database abstraction and management</li><li>JWT Authentication: Ensures secure user sessions</li><li>Middleware: Handles CORS and request processing</li></ul><h4>3. AI Agents</h4><p>Each agent is implemented as a separate module with specialized capabilities:</p><ul><li>Code Review Agent: Analyzes code quality and suggests improvements</li><li>Resume Reviewer: Evaluates resumes and provides feedback</li><li>Interview Prep: Helps users prepare for technical interviews</li><li>Writing Assistant: Enhances writing quality and style</li><li>Technical Troubleshooter: Assists with technical problem-solving</li></ul><h3>Features</h3><h3>1. User Management</h3><ul><li>Secure registration and authentication</li><li>JWT-based session management</li><li>User profile and token balance tracking</li></ul><h3>2. Marketplace Interface</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9xcnsTTsCZ601CJKT3RXrw.png" /></figure><p><em>The marketplace displays available AI agents</em></p><h3>3. Agent Integration</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/635/1*lgXGklgQFy74xJBbVeg39Q.png" /></figure><p>Each agent provides:</p><ul><li>Specialized input interfaces</li><li>Real-time processing</li><li>Detailed response formatting</li><li>Usage tracking and history</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/901/1*MdLJUDH9i2Jz_PKuTXzA6Q.png" /></figure><h3>4. Token System</h3><ul><li>Pay-per-use model</li><li>Token purchase and management</li><li>Usage tracking and billing</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/188/1*SNuIt6U5xAtpeCjJhLSRhg.png" /></figure><h3>5. Security Features</h3><ul><li>Encrypted communication</li><li>Secure token storage</li><li>Rate limiting and abuse prevention</li><li>Input validation and sanitization</li></ul><h3>6. API Enabled for all agents</h3><ul><li>Allows users to utilize agents in other workflows via the API.</li><li>Users can generate API keys to use each agent.</li></ul><pre># Agent Management<br>GET /agents<br>    Response:<br>        [<br>            {<br>                &quot;id&quot;: integer,<br>                &quot;name&quot;: string,<br>                &quot;description&quot;: string,<br>                &quot;price_per_token&quot;: float<br>            }<br>        ]<br><br>POST /agents/{id}/invoke<br>    Request:<br>        {<br>            &quot;input_data&quot;: string,<br>            &quot;context&quot;: string (optional)<br>        }<br>    Response:<br>        {<br>            &quot;output_text&quot;: string,<br>            &quot;tokens_used&quot;: integer,<br>            &quot;cost&quot;: float<br>        }</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cipy-adlO61TwNSb" /></figure><h3>7. Ability to continue conversations with Agents</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/937/1*Cng1L_LId6prWzdYo1BmFw.png" /></figure><h3>Future Roadmap</h3><p>The project has several enhancements in the pipeline, categorized into short-term improvements and long-term goals.</p><h3>Short-term Improvements</h3><p><strong>Enhanced Agent Capabilities</strong>: Expanding existing agents to perform more action-oriented tasks such as:</p><ul><li>Generating PDFs for resumes based on job descriptions. To do this we will integrate capabilites of another LLM based agent I had worked on.</li></ul><p><a href="https://blog.stackademic.com/building-elevatecv-a-dynamic-resume-builder-with-react-and-flask-b19a3dd2ae65">Building ElevateCV: A Dynamic Resume Builder with React and Flask</a></p><ul><li>Generating interview questions based on job roles.</li><li>Conducting demo interview sessions with users.</li></ul><p><strong>Improved Response Quality</strong>: Enhancing AI-driven responses for more accurate and useful outputs.</p><p><strong>More Specialized Use Cases</strong>: Developing agents for industry-specific workflows.</p><p><strong>Better Error Handling</strong>: Improving fault tolerance to ensure smooth interactions.</p><p><strong>User Experience Enhancements</strong>:</p><ul><li>Improving response visualization to present results in a more intuitive manner.</li></ul><p><strong>Platform Features</strong>:</p><ul><li>Introducing batch processing capabilities to handle multiple requests efficiently.</li><li>Allowing users to configure custom agent settings.</li></ul><h3>Long-term Goals</h3><p><strong>Platform Expansion</strong>:</p><ul><li>Adding more AI agents specialized in different domains. An example of which is another project that I had worked on which is an LLM based Chess coach.</li></ul><p><a href="https://blog.stackademic.com/bridging-chess-mastery-and-ai-innovation-the-making-of-llm-chesscoach-f4aedc72df70">Bridging Chess Mastery and AI Innovation: The Making of LLM-ChessCoach</a></p><ul><li>Creating a development framework for users to build custom agents.</li><li>Establishing an integration marketplace for third-party AI models and services.</li></ul><p><strong>Enterprise Features</strong>:</p><ul><li>Enabling team management tools for collaborative use.</li><li>Implementing usage analytics to track agent effectiveness.</li><li>Providing custom deployment options for enterprises.</li></ul><p><strong>AI Capabilities</strong>:</p><ul><li>Incorporating advanced language models for better reasoning and contextual understanding.</li><li>Supporting multi-modal processing to work with text, images, and audio.</li><li>Enabling real-time collaboration between AI agents and users.</li></ul><h3>How to Contribute</h3><p><a href="https://github.com/akmenon1996/ai-agent-marketplace/tree/main"><strong>AgentHive</strong></a> is an open-source project, and contributions are highly encouraged. Ways to get involved:</p><ul><li><strong>Develop New Agents</strong>: Add specialized agents for unique use cases.</li><li><strong>Improve Infrastructure</strong>: Optimize performance, scalability, and security.</li><li><strong>Expand Documentation</strong>: Create tutorials and guides to facilitate onboarding.</li><li><strong>Bug Fixes &amp; Enhancements</strong>: Identify and resolve issues to improve stability.</li><li>Let’s also chat if you’re interested in moving this to production through a deployment and integration with stripe for payments.</li></ul><p>For detailed technical details and to contribute , please have a look at the github repository — <a href="https://github.com/akmenon1996/ai-agent-marketplace/blob/main/docs/technical_documentation.md#contributing-to-ai-agent-hub">https://github.com/akmenon1996/ai-agent-marketplace/blob/main/</a></p><p>To keep up with the work that I do, please follow me on Medium and feel free to hit me up for a chat on LinkedIn!</p><p>LinkedIn: <a href="https://www.linkedin.com/in/abhijit-krishna-menon/">https://www.linkedin.com/in/abhijit-krishna-menon/</a></p><p>Some articles of mine you will like if you liked this one —</p><ul><li><a href="https://medium.com/@menon.ab/using-chatgpt3-as-a-data-engineer-913f9d5d9c7e">Using ChatGPT3 as a Data Engineer</a></li><li><a href="https://blog.stackademic.com/building-elevatecv-a-dynamic-resume-builder-with-react-and-flask-b19a3dd2ae65">Building ElevateCV: A Dynamic Resume Builder with React and Flask</a></li><li><a href="https://blog.stackademic.com/bridging-chess-mastery-and-ai-innovation-the-making-of-llm-chesscoach-f4aedc72df70">Bridging Chess Mastery and AI Innovation: The Making of LLM-ChessCoach</a></li></ul><h3>Thank you for being a part of the community</h3><p><em>Before you go:</em></p><ul><li>Be sure to <strong>clap</strong> and <strong>follow</strong> the writer ️👏<strong>️️</strong></li><li>Follow us: <a href="https://x.com/inPlainEngHQ"><strong>X</strong></a> | <a href="https://www.linkedin.com/company/inplainenglish/"><strong>LinkedIn</strong></a> | <a href="https://www.youtube.com/channel/UCtipWUghju290NWcn8jhyAw"><strong>YouTube</strong></a> | <a href="https://newsletter.plainenglish.io/"><strong>Newsletter</strong></a> | <a href="https://open.spotify.com/show/7qxylRWKhvZwMz2WuEoua0"><strong>Podcast</strong></a></li><li><a href="https://cofeed.app/"><strong>Check out CoFeed, the smart way to stay up-to-date with the latest in tech</strong></a> <strong>🧪</strong></li><li><a href="https://differ.blog/"><strong>Start your own free AI-powered blog on Differ</strong></a> 🚀</li><li><a href="https://discord.gg/in-plain-english-709094664682340443"><strong>Join our content creators community on Discord</strong></a> 🧑🏻‍💻</li><li>For more content, visit <a href="https://plainenglish.io/"><strong>plainenglish.io</strong></a> + <a href="https://stackademic.com/"><strong>stackademic.com</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2e6db0ba1746" width="1" height="1" alt=""><hr><p><a href="https://blog.stackademic.com/ai-agent-marketplace-building-an-open-ecosystem-for-ai-agents-2e6db0ba1746">AI Agent Marketplace: Building an Open Ecosystem for AI Agents</a> was originally published in <a href="https://blog.stackademic.com/">Stackademic</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building ElevateCV: A Dynamic Resume Builder with React and Flask]]></title>
            <link>https://blog.stackademic.com/building-elevatecv-a-dynamic-resume-builder-with-react-and-flask-b19a3dd2ae65?source=rss-958e93b5db45------2</link>
            <guid isPermaLink="false">https://medium.com/p/b19a3dd2ae65</guid>
            <category><![CDATA[career-development]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Abhijit Menon]]></dc:creator>
            <pubDate>Mon, 14 Oct 2024 14:02:08 GMT</pubDate>
            <atom:updated>2024-10-15T06:15:24.502Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2-VCsvRuL_RS1fNBsKnCjw.jpeg" /></figure><p>In a competitive job market, a well-crafted resume can make all the difference. To streamline creating, managing, and maintaining resumes, I developed ElevateCV, a full-stack application using React and Flask that leverages the power of Large Language Models(LLMs) for personalized experiences. This article dives into the technical details of building ElevateCV, with a focus on prompt engineering, LLM integration, and smart parsing for resume customization.</p><h3>The Problem Statement</h3><p>Creating a resume that stands out requires flexibility and personalization. Traditional resume builders often burden the user with having to customize and phrase their experiences to cater to specific job roles and descriptions, lacking customization and data-driven features that adapt to individual needs. The goal of ElevateCV was to create an intuitive tool that allows users to dynamically manage their profiles, leverage LLMs to intelligently process resume content, and generate tailored resumes aligned to specific job descriptions.</p><p>The application also aims to provide users with the ability to maintain their profiles over time, enabling them to easily add new experiences, projects, and skills. When users want to apply for a job, they can paste the job description, and the model will intelligently select and phrase the most relevant experiences to fit the job requirements. The generated resume is formatted according to a predefined template, ensuring a consistent and professional look.</p><p>Before we get into the Technical details, here’s how the end-to-end product works —</p><ul><li><strong>User Profile Creation</strong>: Users start by creating their profiles, either by manually entering details or uploading an existing resume in PDF format. The profile includes sections like work experience, education, skills, projects, and certifications. The user can continue to update their profiles on an ongoing basis by just coming in a pasting the updated experience/certification etc. The tool will automatically merge historical profiles with the added event and maintain history.</li><li><strong>Profile Parsing and LLM Integration</strong>: When a user uploads a resume, the Large Language Model (LLM) processes the data to generate a structured representation in JSON format. This data is then stored in the backend for easy customization and reuse.</li><li><strong>Job Description Input</strong>: To create a tailored resume, users paste the job description into the application. The LLM uses this job description to identify the most relevant experiences and skills that match the job requirements.</li><li><strong>Dynamic Resume Generation</strong>: The LLM-generated content is mapped to a predefined resume template to ensure consistency and professional formatting. Users can further customize aspects like font size and line spacing.</li><li><strong>Resume Download</strong>: Once generated, the resume is formatted into a downloadable PDF that is ready for submission. Users can easily update their profiles or generate new resumes as needed, ensuring their resumes are always up-to-date and tailored to the roles they are applying for.</li></ul><h3>Tech Stack Overview</h3><p>The application is built using a full-stack approach:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*Ri854dXFC2Mbz1IAc6csOA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*83FYLaJivy-HFChB4aChxA.png" /></figure><ul><li><strong>Frontend</strong>: Developed using React, ensuring a responsive and interactive user interface for profile creation and resume generation.</li><li><strong>Backend</strong>: Powered by Flask, managing user data, PDF processing, and integration with an LLM (Large Language Model) for advanced data handling.</li><li><strong>Database</strong>: Utilized SQLAlchemy with SQLite for local development and scalability options for production.</li></ul><p>Key technologies include Python, JavaScript, HTML, CSS, REST APIs, Axios for HTTP requests, and CORS for managing cross-origin requests.</p><h3>Key Features and Architecture</h3><h4>1. User Authentication and Profile Management</h4><p>(<a href="https://github.com/akmenon1996/ReactLLM-ResumeGenerator/blob/main/backend/routes/user_routes.py">https://github.com/akmenon1996/ReactLLM-ResumeGenerator/blob/main/backend/routes/user_routes.py</a>)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r8ihksQSxLz6k1yxs-ggKQ.png" /></figure><p>The first step of any resume builder is allowing users to create their profiles. I implemented a secure user authentication system with user registration, login, and profile management features. Users have two options for creating their profile: manually entering data or uploading an existing resume in PDF format.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tyNMiOOXIUjmFdYLBof6Nw.png" /></figure><p>The front end is built with React components, ensuring a smooth user experience for adding or updating sections like work experience, education, skills, projects, and certifications. Users can continue to maintain their profiles over time, adding new experiences and projects as needed, which are automatically appended to their existing profile data.</p><h4>2. LLM Integration for Intelligent Data Processing</h4><p>(<a href="https://github.com/akmenon1996/ReactLLM-ResumeGenerator/blob/main/backend/services/llm_service.py">https://github.com/akmenon1996/ReactLLM-ResumeGenerator/blob/main/backend/services/llm_service.py</a>)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NmiLK5qgngTmnxwPS6YruQ.png" /></figure><p>One of the standout features of this application is the integration of a Large Language Model (LLM). Users can upload their resumes as PDFs or text files, and the LLM processes this data to generate a structured JSON representation of their profile. This process extracts information such as:</p><ul><li><strong>Experience</strong>: Including job titles, companies, and descriptions.</li><li><strong>Education</strong>: School names, degrees, and fields of study.</li><li><strong>Skills, Projects, and Certifications</strong>: Highlighting what makes each user unique.</li></ul><p>This structured data is stored in the backend, allowing for easy customization and reuse when generating resumes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/462/1*N5C-TwmFht7cZxz2_G1aNQ.png" /></figure><p><strong>Prompt Engineering for Resume Parsing</strong></p><p>(<a href="https://github.com/akmenon1996/ReactLLM-ResumeGenerator/blob/main/backend/services/user_service.py">https://github.com/akmenon1996/ReactLLM-ResumeGenerator/blob/main/backend/services/user_service.py</a> , <a href="https://github.com/akmenon1996/ReactLLM-ResumeGenerator/blob/main/backend/prompts/resume_parser.py">https://github.com/akmenon1996/ReactLLM-ResumeGenerator/blob/main/backend/prompts/resume_parser.py</a>)</p><p>The accuracy of resume parsing heavily relies on effective prompt engineering. To ensure the LLM extracts information accurately despite variations in resume formats, I employed tailored prompts that guide the model in understanding the expected structure. For instance:</p><ul><li><strong>Targeted Prompts</strong>: Specific prompts are crafted to instruct the LLM to extract key sections like work experience, education, and skills. Each prompt is structured to account for the variability found in resumes, such as different headings or unconventional layouts.</li><li><strong>Iterative Refinement</strong>: Prompts were refined through testing and iteration, allowing the LLM to become more resilient to inconsistencies. This iterative approach helped in achieving higher accuracy and more structured outputs.</li></ul><p><strong>Template Explanation:</strong></p><p>In ElevateCV, after the LLM generates the tailored content based on the user profile and job description, the next critical step is formatting this data into a polished resume. A single predefined template is used to maintain consistency in the look and feel of the generated resumes.</p><p><strong>Key Features of the Template:</strong></p><ol><li><strong>Consistent Structure</strong>: The resume template includes clearly defined sections such as Contact Information, Summary, Work Experience, Education, Skills, and Certifications. This ensures that all the critical elements of a resume are systematically presented, improving readability for hiring managers.</li><li><strong>Professional Appearance</strong>: The template was designed with a focus on making a strong visual impact. The layout follows standard resume conventions, using bold headings, bullet points for achievements, and consistent font styles to make the content easy to scan.</li><li><strong>Customization Options</strong>: Although there’s a primary template, users have some flexibility to customize certain aspects such as font size, line spacing, and margins. This allows for a balance between standardization and personalization.</li><li><strong>Dynamic Data Insertion</strong>: When the LLM generates content, it outputs the information in a structured JSON format. The application then uses this JSON to map individual pieces of information — like job titles, company names, and descriptions — into predefined placeholders in the template. This ensures that the relevant data points are correctly placed in the final resume.</li></ol><pre>def process_profile(username, name, email, phone, llm_response):<br>    try:<br>        # Query for the existing user profile by username<br>        user_profile = UserProfile.query.filter_by(username=username).first()<br><br>        if not user_profile:<br>            # Create a new user profile if one doesn&#39;t exist<br>            user_profile = UserProfile(username=username, email=email, name=name, phone=phone)<br>            db.session.add(user_profile)<br>            db.session.commit()<br>        else:<br>            # Update the existing user profile&#39;s metadata<br>            user_profile.email = email<br>            user_profile.name = name<br>            user_profile.phone = phone<br>            db.session.commit()<br><br>        # Delete old experience, education, skills, projects, certifications, and papers<br>        Experience.query.filter_by(user_profile_id=user_profile.id).delete()<br>        Education.query.filter_by(user_profile_id=user_profile.id).delete()<br>        Skill.query.filter_by(user_profile_id=user_profile.id).delete()<br>        Project.query.filter_by(user_profile_id=user_profile.id).delete()<br>        Certification.query.filter_by(user_profile_id=user_profile.id).delete()<br>        Paper.query.filter_by(user_profile_id=user_profile.id).delete()<br><br>        # Add new experiences from the LLM response<br>        for exp in llm_response.get(&#39;experience&#39;, []):<br>            new_exp = Experience(<br>                position=exp.get(&#39;position&#39;),<br>                company=exp.get(&#39;company&#39;),<br>                start_date=exp.get(&#39;start_date&#39;),<br>                end_date=exp.get(&#39;end_date&#39;),<br>                description=exp.get(&#39;description&#39;),<br>                user_profile_id=user_profile.id<br>            )<br>            db.session.add(new_exp)<br><br>        # Add new education from the LLM response<br>        for edu in llm_response.get(&#39;education&#39;, []):<br>            new_edu = Education(<br>                degree=edu.get(&#39;degree&#39;),<br>                institution=edu.get(&#39;institution&#39;),<br>                year=edu.get(&#39;year&#39;),<br>                user_profile_id=user_profile.id<br>            )<br>            db.session.add(new_edu)<br><br>         # Add new education from the LLM response<br>        for project in llm_response.get(&#39;projects&#39;, []):<br>            new_project = Project(<br>                title=project.get(&#39;title&#39;),<br>                description=project.get(&#39;description&#39;),<br>                user_profile_id=user_profile.id<br>            )<br>            db.session.add(new_project)<br><br>        # Add new skills from the LLM response<br>        for skill in llm_response.get(&#39;skills&#39;, []):<br>            new_skill = Skill(name=skill, user_profile_id=user_profile.id)<br>            db.session.add(new_skill)<br><br>        # Add new certifications from the LLM response<br>        for cert in llm_response.get(&#39;certifications&#39;, []):<br>            new_cert = Certification(<br>                name=cert.get(&#39;name&#39;),<br>                issued_by=cert.get(&#39;issued_by&#39;),<br>                year=cert.get(&#39;year&#39;),<br>                user_profile_id=user_profile.id<br>            )<br>            db.session.add(new_cert)<br><br>        # Add new papers from the LLM response<br>        for paper in llm_response.get(&#39;papers&#39;, []):<br>            new_paper = Paper(<br>                title=paper.get(&#39;title&#39;),<br>                url=paper.get(&#39;url&#39;),<br>                user_profile_id=user_profile.id<br>            )<br>            db.session.add(new_paper)<br><br>        # Commit all changes to the database<br>        db.session.commit()<br><br>        return {&quot;message&quot;: &quot;Profile updated successfully!&quot;}, 200<br><br>    except Exception as e:<br>        print(f&quot;Error processing profile: {e}&quot;)<br>        return {&quot;message&quot;: &quot;Error updating profile&quot;}, 500</pre><h4>3. Dynamic Resume Generation</h4><p>(<a href="https://github.com/akmenon1996/ReactLLM-ResumeGenerator/blob/main/backend/services/resume_generator_service.py">https://github.com/akmenon1996/ReactLLM-ResumeGenerator/blob/main/backend/services/resume_generator_service.py</a>, <a href="https://github.com/akmenon1996/ReactLLM-ResumeGenerator/blob/main/backend/prompts/resume_generator.py">https://github.com/akmenon1996/ReactLLM-ResumeGenerator/blob/main/backend/prompts/resume_generator.py</a>)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AuRiT534zycwu7u-eK_MRQ.png" /></figure><p>Users can generate tailored resumes by pasting specific job descriptions into the application. The LLM is prompted to align the user’s profile data with the requirements of the job, ensuring that the resume highlights the most relevant skills and experiences. The phrasing of experiences is adjusted to match the tone and requirements of the job description, making the generated resume more compelling. The resulting resume is formatted into a downloadable PDF using a single predefined template, ensuring consistency.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*pohLXS7RsG9fiD4lqYV_ZA.png" /></figure><p><strong>Smart Formatting and Customization</strong></p><p>To ensure that the generated resume meets user preferences, additional layers of processing are employed after the LLM generates the structured profile data:</p><ul><li><strong>Field Mapping</strong>: The LLM output, which is in JSON format, is parsed to map individual fields (e.g., experience, education) to predefined resume templates. This mapping is done programmatically, ensuring that all key data points are correctly placed.</li><li><strong>Custom Formatting</strong>: Users can specify preferences such as font size and line spacing. The application takes the structured JSON output from the LLM and applies these formatting options dynamically during PDF generation, providing a tailored experience without manual intervention.</li></ul><h4>4. Frontend and Backend Synchronization</h4><p>React components handle the user interface, while the Flask backend processes data, stores user profiles, and interacts with the LLM for data extraction and resume generation. To synchronize data across user sessions, I implemented efficient state management techniques and leveraged Axios for communicating between the front end and back end.</p><h4>5. Scalable and Modular Architecture</h4><p>I designed the application with scalability in mind. The modular approach means that both the front end and back end are part of a unified package, simplifying deployment and maintenance. SQLAlchemy manages the database, providing a flexible ORM solution for user data storage.</p><h4>6. Handling PDF Data</h4><p>A key part of this project was allowing users to upload their existing resumes for processing. I built a PDF parsing utility that extracts text content from uploaded files, which is then processed by the LLM. This feature is critical for users who want to update their profiles without manually entering all their details again.</p><p><strong>PDF Parsing for LLM Integration</strong></p><p>Parsing resumes from PDF files presented challenges due to inconsistent formatting. To address this, I utilized the following techniques:</p><ul><li><strong>Text Extraction Tools</strong>: Employed PDF parsing libraries such aspdfminer.six to extract text content effectively. The extracted text is then cleaned and structured before being sent to the LLM.</li><li><strong>Pre-Processing for Consistency</strong>: Pre-processing steps were added to normalize headings and content layout, making the data more predictable for the LLM prompts. This pre-processing improved the accuracy of information extraction and minimized errors due to formatting anomalies.</li></ul><p>(The PDF parsing does not seem to work for some forms for PDF encoding, in which case having to ability to upload word docs would be helpful)</p><h3>Challenges and Solutions</h3><ul><li><strong>Data Extraction Accuracy</strong>: Parsing resumes from PDFs presented challenges related to inconsistent formatting. To address this, I refined the PDF parsing logic and used prompts that made the LLM more resilient to variances in resume structure. However in testing there were PDFs encoded in certain ways which traditional parsers do not solve. I tried to solve this using OCR instead of text parsing, but that led to a lot of junk text and typos coming in.</li><li><strong>State Management</strong>: Ensuring a seamless user experience across multiple components and pages required robust state management. React’s hooks and context API were leveraged to maintain synchronization across the user session.</li><li><strong>Customization Flexibility</strong>: Allowing users to add, update, and delete sections dynamically required a flexible UI. Leveraging React’s component-based architecture made this possible, as each section (experience, education, skills) is modular and reusable.</li><li><strong>Multiple Resume templates: </strong>The current set up only includes a single resume template and it required specific prompting to be able to retrieve data in a way to be able to serve that template. Scaling to allow for users to chose templates from a carousel will be a challenge we need to solve.</li></ul><h3>Future Enhancements</h3><ul><li><strong>Multi-User Support</strong>: Scaling the backend to handle concurrent users is a priority, which could involve moving to a more robust database and optimizing Flask for higher throughput.</li><li><strong>More scalable deployment:</strong> The app is currently deployed on PythonAnywhere and is a good start. But if more user’s would like to use this I would want to deploy the app in a more scalable manner on a cloud with better compute and storage.</li><li><strong>More ML Integration</strong>: Expanding the LLM’s capabilities to provide users with recommendations on improving their resumes, such as suggesting additional skills or rewording descriptions for impact.</li><li><strong>Enhanced Customization Options</strong>: Adding more control over resume styling and additional export formats (e.g., Word, Markdown).</li></ul><h3>Deployment to PythonAnywhere</h3><p>To make the ElevateCV accessible online, I chose to deploy the backend on <strong>PythonAnywhere</strong>, a popular platform for hosting Python applications. The deployment process involved several key steps:</p><ol><li><strong>Setting Up the PythonAnywhere Environment</strong>: Created an account on PythonAnywhere and set up a new web application. Configured the environment with the necessary dependencies, including Flask and SQLAlchemy.</li><li><strong>Code Deployment</strong>: Uploaded the application code to PythonAnywhere using the built-in file manager. Alternatively, the application code can be cloned directly from a Git repository for seamless version control.</li><li><strong>Configuring WSGI</strong>: Configured the WSGI file to point to the Flask application’s entry point, ensuring that PythonAnywhere could properly serve the app.</li><li><strong>Database Configuration</strong>: Migrated the SQLite database to the PythonAnywhere environment. Set up paths and permissions to allow the Flask app to interact with the database.</li><li><strong>Frontend Integration</strong>: The React frontend can be hosted separately using services like Netlify or Vercel, while API requests are routed to the backend deployed on PythonAnywhere. Configured CORS settings in Flask to allow secure communication between the frontend and backend.</li><li><strong>Testing and Debugging</strong>: Performed end-to-end testing to ensure that the deployed backend was functioning as expected. PythonAnywhere’s logging features were utilized to troubleshoot any deployment issues.</li></ol><p>This setup allows users to access the application from anywhere, providing a stable and scalable environment for the backend services.</p><h3>Conclusion</h3><p>The React and Flask-based resume builder is a step forward in bringing personalized, intelligent resume management to users. By combining modern web technologies with machine learning, the application offers a unique solution for job seekers to create tailored resumes efficiently. It aims to bridge the gap between static templates and the need for dynamic, data-driven content that evolves with user needs.</p><p>If you are interested in seeing this project in action or want to collaborate on similar technologies, feel free to reach out. The journey of blending front-end interactivity, backend robustness, and machine learning intelligence is an exciting one — and it’s only just beginning.</p><p>Sample Resume Generated (Redacted some data for privacy) —</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/711/1*NW8GxqYYNsSXllzdXVo5kw.png" /></figure><p>Code: <a href="https://github.com/akmenon1996/ReactLLM-ResumeGenerator">https://github.com/akmenon1996/ReactLLM-ResumeGenerator</a></p><p>I have open sourced this code and will definitely be open to pull requests with any suggestions on making this better or taking it to production in a cost effective way for people to make use of it.</p><p>Contact Me:</p><p>LinkedIn — <a href="https://www.linkedin.com/in/abhijit-krishna-menon/">https://www.linkedin.com/in/abhijit-krishna-menon/</a></p><h3>Stackademic 🎓</h3><p>Thank you for reading until the end. Before you go:</p><ul><li>Please consider <strong>clapping</strong> and <strong>following</strong> the writer! 👏</li><li>Follow us <a href="https://twitter.com/stackademichq"><strong>X</strong></a> | <a href="https://www.linkedin.com/company/stackademic"><strong>LinkedIn</strong></a> | <a href="https://www.youtube.com/c/stackademic"><strong>YouTube</strong></a> | <a href="https://discord.gg/in-plain-english-709094664682340443"><strong>Discord</strong></a></li><li>Visit our other platforms: <a href="https://plainenglish.io/"><strong>In Plain English</strong></a> | <a href="https://cofeed.app/"><strong>CoFeed</strong></a> | <a href="https://differ.blog/"><strong>Differ</strong></a></li><li>More content at <a href="https://stackademic.com/"><strong>Stackademic.com</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b19a3dd2ae65" width="1" height="1" alt=""><hr><p><a href="https://blog.stackademic.com/building-elevatecv-a-dynamic-resume-builder-with-react-and-flask-b19a3dd2ae65">Building ElevateCV: A Dynamic Resume Builder with React and Flask</a> was originally published in <a href="https://blog.stackademic.com/">Stackademic</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Remotely Controlled Automated Greenhouse System with the implementation of hydroponics for nutrient…]]></title>
            <link>https://medium.com/swlh/remotely-controlled-automated-greenhouse-system-with-the-implementation-of-hydroponics-for-nutrient-f0d604d7440b?source=rss-958e93b5db45------2</link>
            <guid isPermaLink="false">https://medium.com/p/f0d604d7440b</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[global-warming]]></category>
            <category><![CDATA[environment]]></category>
            <category><![CDATA[iot]]></category>
            <dc:creator><![CDATA[Abhijit Menon]]></dc:creator>
            <pubDate>Tue, 26 Dec 2023 02:44:39 GMT</pubDate>
            <atom:updated>2023-12-26T02:46:23.148Z</atom:updated>
            <content:encoded><![CDATA[<h3>Remotely Controlled Automated Greenhouse System with the implementation of hydroponics for nutrient supply.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/732/1*FIiawtbCJv-_WcdXNW7f8A.jpeg" /></figure><p>Publication — <a href="https://pubs.aip.org/aip/acp/article-abstract/2788/1/130001/2903971/Remotely-controlled-automated-greenhouse-system">https://pubs.aip.org/aip/acp/article-abstract/2788/1/130001/2903971/Remotely-controlled-automated-greenhouse-system</a></p><p>The ‘Remotely Controlled Automated Greenhouse System’ aims to counter the problem that most tier 1 and tier 2 city households have to face when they decide to have and maintain plants at home. The problem being that of lack of time to care for the plants and the inadequacy of city infrastructure to accommodate traditional gardens. Our project aims at addressing these issues by automating the processes involved in growing a garden while also enabling users to grow vegetables at home.</p><p>The system’s features such as temperature and humidity control, automated watering system along with a supply of the plant’s nutrient requirement and continuous update delivery definitely helps reduce the need of an individual to constantly watch over the growth of the plant.</p><p>The user can remotely access the data, and also control the device from a remote location using a web interface that gives him control over the various sensors and actuators that are a part of the system.The project also implements a Hydroponic system for water and nutrient delivery to the plants which help in saving up to 90% of water as opposed to the traditional soil based delivery.</p><p>The features of the project include :-</p><ul><li>Unit wise design of the unit making easy to dismantle and hence portable and convenient for the user.</li><li>Access to an application from the user end so as to be able to monitor and control the unit remotely.</li><li>A retractable roof system to allow natural light to come in when necessary.</li><li>Automated Watering System.</li><li>Temperature sensor to detect the temperature and actuate the cooling fan.</li><li>Automated nutrient supplier that will supply macro and micro nutrients to the plant on a continuous basis.</li></ul><p>The initial stages of our project involved us in a lot of pipe cutting and fixing to develop a perfect water system for our water to flow from the tanks through the complete system and back. We designed a method to allow for the user to have complete control over which plant to be placed where. Unlike a traditional hydroponic system where only a specific type of nutrient can be supplied to all the plants in the system, our system allows for any number of nutrients to go to any plant which is a part of the system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*aFSB6_w4NxULywWcB0goTw.png" /></figure><p>Our electronics were controlled by a Raspberry Pi 3b and a relay that was attached to it. We completed our coding using python while implementing a GUI to have the user remotely control the whole system</p><p>The sensors that we included were a DHT11 temperature and humidity sensor and a GY30 light sensor. These were accompanied by the LED lights, Fans, as well as two DC motors that controlled the motion of the roof. There are also 12 Solenoid valves which are opened and closed as per the user needs and what plant is placed in the respective position for the valves.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*uzpmrfYQgxIYiCzyth_ifg.png" /></figure><p>As a team we see a lot of potential in this project and we believe it can grow if the right steps are taken. The scope for improvement that we see in this project are -:</p><ol><li>Increase capacity for more number plants.</li><li>Implement Machine Learning to determine when the plants have issues such as pests or if the plant is not growing properly.</li><li>Additional sensors such as pH level, EC level etc. can be implemented.</li><li>Additional devices such as a condenser, humidifier etc could be added to make it more efficient.</li><li>Artificial Intelligence could be implemented to set requirements of the plants automatically by sensing internal and external condition without human interference.</li></ol><p>The short comings that we notice in the project are the following — :</p><ol><li>It needs a 24/7 power supply.</li><li>Needs a strong internet connection at all times.</li><li>More features could have been added if not for the lack of resources.</li><li>In order to make a good web interface a working knowledge of php and JavaScript is required.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qFYVkdRoVPD4xi0tu3UxlQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*9tC9xjNVh4tAcOVMCQE43A.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f0d604d7440b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/remotely-controlled-automated-greenhouse-system-with-the-implementation-of-hydroponics-for-nutrient-f0d604d7440b">Remotely Controlled Automated Greenhouse System with the implementation of hydroponics for nutrient…</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bridging Chess Mastery and AI Innovation: The Making of LLM-ChessCoach]]></title>
            <link>https://blog.stackademic.com/bridging-chess-mastery-and-ai-innovation-the-making-of-llm-chesscoach-f4aedc72df70?source=rss-958e93b5db45------2</link>
            <guid isPermaLink="false">https://medium.com/p/f4aedc72df70</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[chess]]></category>
            <category><![CDATA[prompt-engineering]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Abhijit Menon]]></dc:creator>
            <pubDate>Sun, 03 Dec 2023 06:08:20 GMT</pubDate>
            <atom:updated>2023-12-05T01:38:34.824Z</atom:updated>
            <content:encoded><![CDATA[<h4>Introduction</h4><p>The advent of AI technologies like GPT-3 has opened new frontiers in various fields, chess being no exception. As a tech enthusiast and chess aficionado, I found myself at the confluence of these two worlds, leading to the creation of LLM-ChessCoach. This tool isn’t just about analyzing chess games; it’s about deeply understanding them through the lens of advanced AI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nKVr6z2Z-n6M1MDtW10U1Q.png" /></figure><h4>Technical Overview of LLM-ChessCoach</h4><p>LLM-ChessCoach stands out due to its unique integration of GPT with chess analytics. The tool functions by downloading games from online chess platforms, and using Python scripts like — export_lichess_games.py for data extraction. The heart of the tool lies in — analyze_games.py, where the magic of GPT comes into play. It&#39;s here that each game is dissected, move by move, using a blend of natural language processing and chess expertise embedded within GPT.</p><p>For this Project, I have relied on GPT 3 (Primarily to save cost), but I will slowly start experimenting with more advanced GPTs as I add more functionality.</p><h4>Development Journey and Challenges</h4><p>The journey to create LLM-ChessCoach was both intellectually stimulating and technically challenging. One significant challenge was ensuring the accurate interpretation of chess games by GPT-3. This involved not just programming puzzles, but also an understanding of chess strategies and common pitfalls to make sure the LLM was not hallucinating.</p><p>We’re also batch-processing multiple games due to the slow-ish nature of responses from the LLM leading to a bad user experience if it was one at a time.</p><p>Overall, I would split this project into 3 pieces —</p><ol><li><strong>Capturing game data from a data store</strong>. In this case it is Lichess, but it can be any data store of chess games like Chess.com, manually generated PGNs, etc.</li><li><strong>LLM integration and prompt engineering</strong> to provide input as games gather responses from the model and save the results. Given the good documentation of the OpenAI API, the hardest part here was the prompt engineering to be able get the response in a format I thought would be helpful to the user. <br>My prompts are something like this for the overall analysis:<br><strong>Prompt:<br></strong><em>f” You are a chess grandmaster rated 3200. We are analyzing multiple chess games between {white_player} and other players:\n\n Provide your overall analysis of the player {user_alias} and also recommendations for how they can improve as a player. You don’t have to use specific move combinations unless it is to appreciate a checkmate combo or provide missed checkmate combos. The games could be across different time formats. Keep that into account in your analysis. Focus more on subjective feedback. Any specific material you can refer them to will also be helpful. :\n\n{pgn}”</em></li><li><strong>StreamLit based UI Development</strong>- Since this was my first time playing around with a StreamLit based UI, it took me some time to understand the various components of the development process. The most annoying piece was that the whole app refreshes every time any button is clicked, thus refreshing some variables if not defined correctly. This was annoying especially because I needed page transitions on my app. I’ve realized StreamLit is probably best used for more static-based applications without too much Dynamic change. In the future, I might move to a framework like Flask along with JavaScript to be able to deal with more dynamic use cases.</li></ol><h4>User Experience and Screenshots</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/659/1*a3GwmsHJwxsHFbYdpPjCpg.png" /><figcaption>Starting Page of the Web App</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/1*NH0wuBjpUA75W0YAWrTcjA.png" /><figcaption>Add the User Name and from what date you want games to be analyzed.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/982/1*SRsKTgEqf7zaA0PfucnK1w.png" /><figcaption>If it’s an existing run then you provide the Run ID.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2beyyAeE_8NgRg4uLf4ggw.png" /><figcaption>The results page will contain a detailed analysis of each game as well as an overall analysis of players across all games.</figcaption></figure><h4>Practical Applications and Future Enhancements</h4><p>LLM-ChessCoach goes beyond mere game analysis; it offers strategic insights, identifies patterns, and even suggests areas of improvement tailored to each player’s style.</p><p>Future enhancements could include real-time analysis, personalized coaching modules, and integration with additional chess platforms.</p><p>I am exploring the Lichess API to see if along with the move numbers the LLM provides for a specific game’s analysis, I can set up a board at the position within the UI to allow the user to play around right there. That along with integration with the Lichess engine should help evaluate different positions.</p><h4>Engagement and Conclusion</h4><p>The fusion of AI and chess in LLM-ChessCoach is just the beginning of a new era in sports analytics and training. As developers and enthusiasts, we stand at a pivotal moment where our creativity can redefine the boundaries of technology in enhancing human skills. I invite you to share your thoughts on how AI can further revolutionize chess training and other areas of our intellectual pursuits.</p><h4>Added Details —</h4><p>Github repo: <a href="https://github.com/akmenon1996/LLM-ChessCoach/tree/master">https://github.com/akmenon1996/LLM-ChessCoach/tree/master</a></p><p>Lichess Account: <a href="https://lichess.org/@/ZeusStrikes420">https://lichess.org/@/ZeusStrikes420</a></p><p><strong>Acknowledgments —</strong></p><ol><li>OpenAI and ChatGPT — Quite a bit of the work put into this project was through the assistance of existing LLM tools, including the first picture of this article that was created using Dall-e.</li><li>Lichess API — Lichess is by far my favourite site to play chess on and their API integration being as good as it is has made life quite simple on this project.</li></ol><h3>Stackademic</h3><p><em>Thank you for reading until the end. Before you go:</em></p><ul><li><em>Please consider </em><strong><em>clapping</em></strong><em> and </em><strong><em>following</em></strong><em> the writer! 👏</em></li><li><em>Follow us on </em><a href="https://twitter.com/stackademichq"><strong><em>Twitter(X)</em></strong></a><em>, </em><a href="https://www.linkedin.com/company/stackademic"><strong><em>LinkedIn</em></strong></a><em>, and </em><a href="https://www.youtube.com/c/stackademic"><strong><em>YouTube</em></strong></a><strong><em>.</em></strong></li><li><em>Visit </em><a href="http://stackademic.com/"><strong><em>Stackademic.com</em></strong></a><em> to find out more about how we are democratizing free programming education around the world.</em></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f4aedc72df70" width="1" height="1" alt=""><hr><p><a href="https://blog.stackademic.com/bridging-chess-mastery-and-ai-innovation-the-making-of-llm-chesscoach-f4aedc72df70">Bridging Chess Mastery and AI Innovation: The Making of LLM-ChessCoach</a> was originally published in <a href="https://blog.stackademic.com/">Stackademic</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using ChatGPT3 as a Data Engineer]]></title>
            <link>https://medium.com/analytics-vidhya/using-chatgpt3-as-a-data-engineer-913f9d5d9c7e?source=rss-958e93b5db45------2</link>
            <guid isPermaLink="false">https://medium.com/p/913f9d5d9c7e</guid>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[automation]]></category>
            <dc:creator><![CDATA[Abhijit Menon]]></dc:creator>
            <pubDate>Sat, 24 Dec 2022 18:57:13 GMT</pubDate>
            <atom:updated>2022-12-24T19:01:51.770Z</atom:updated>
            <content:encoded><![CDATA[<p>The world has gone pretty crazy about ChatGPT3, while I was skeptical about it being useful for day-to-day data engineering use cases, that has quickly changed over the last couple of weeks. I have not only started using it but also checking out ChatGPT first before Google.</p><p>One of the major issues I had with getting into using ChatGPT3 was not even knowing where to start and what I can use it for. Here are some of the really helpful use cases I found that might kickstart some of you into using it regularly.</p><h3>Building boilerplate code</h3><p>Sometimes you know what you need to do, but it would just be so much more helpful to have a starting point or a boilerplate code to work on top off. You can now just explain to ChatGPT3 what you are trying to do and it will set up a boilerplate code for you to use. I find this super cool and useful.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/617/1*YscvzCwXhKqaEfwLL9gJJg.png" /></figure><p>(the code goes on, I have just truncated it)</p><h3>Add comments to your code</h3><p>Yes, it is good practice to add comments to your code but sometimes you’re just in the flow and you don’t stop to add comments.</p><p>One cool thing I found with ChatGPT is its ability to add comments to your code. <br>Here’s an example of a script I’d written a long time ago to scrape text from PDFs without any comments. I checked if ChatGPT would be able to add comments to it and it did a much better job than I probably would have.</p><p>PS: You can also have it explain a totally new code to you if you are trying to understand someone else’s work that does not have comments on them.</p><p><a href="https://github.com/akmenon1996/pdf-scraper/blob/master/pdf-scraper.py">pdf-scraper/pdf-scraper.py at master · akmenon1996/pdf-scraper</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/691/1*sRbhTJwLUNUxnJnuQA1Klg.png" /></figure><h3>Debug basic errors on your scripts</h3><p>Do you hate finding that one pesky little comma that you missed on your SQL causing a Syntax error? Well, ChatGPT has you covered. My input query below had a missing comma at the end of one of the columns and ChatGPT helps with figuring out what’s wrong and what needs to change.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*rmOm9HcYSR3sB65Z7ccFDg.png" /></figure><h3>Convert code from a different language, to the language you want to develop in</h3><p>A lot of times you’re looking for a solution and you find exactly what you need…in a different language. Or there is a code base that exists in your company that you’re trying to migrate to a different language. Given that a lot of the syntax, the libraries, and the formatting is so different from one language to another transitioning the code you need can be a real pain. <br>ChatGPT does a great job of helping you make this transition.</p><p><em>Just querying —</em></p><p>Convert this code to {insert language you want to convert to} — <br>{Insert original code here}</p><p>This should give you at least a starting point to start with the transition.</p><p><strong>Example Query to ChatGPT —</strong></p><p>Convert to scala —</p><pre>import sys<br>from awsglue.transforms import *<br>from awsglue.utils import getResolvedOptions<br>from pyspark.context import SparkContext<br>from awsglue.context import GlueContext<br>from awsglue.job import Job<br><br>args = getResolvedOptions(sys.argv, [&#39;JOB_NAME&#39;])<br><br>sc = SparkContext()<br>glueContext = GlueContext(sc)<br>spark = glueContext.spark_session<br>job = Job(glueContext)<br>job.init(args[&#39;JOB_NAME&#39;], args)<br><br>inputGDF = glueContext.create_dynamic_frame_from_options(connection_type = &quot;s3&quot;, connection_options = {&quot;paths&quot;: [&quot;s3://test-bucket-glue/testing-csv&quot;]}, format = &quot;csv&quot;)<br><br>outputGDF = glueContext.write_dynamic_frame.\<br>            from_options(frame = inputGDF,\<br>         connection_type = &quot;s3&quot;, \<br>        connection_options = {&quot;path&quot;: &quot;s3://test-bucket-glue/testing-output&quot;},\<br>         format = &quot;parquet&quot;)</pre><p>Response —</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/723/1*mzUzprk5W6wEpYBLE8BcGA.png" /></figure><blockquote><em>Note — I wouldn’t take the code as the absolute truth. Definitely test it out and make sure everything works. ChatGPT help setting up some boiler plate code for you to work on.</em></blockquote><h3>Process Flow Chart Creator</h3><p>Sometimes if you’re setting up a process and you want a quick flow chart to represent it, you could get a fancy one by building it yourself on Draw.io or you could explain the process to ChatGPT and it can come up with a quick diagram for you. (In text format though)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*ZofvSa8j590Ue1O4Q3CzVg.png" /></figure><p>All of these use cases are in addition to the basic question and answers that you can do with ChatGPT just like you would with Google/StackOverflow. <br>I’d love to know some of the other ways everyone is using ChatGPT3. I genuinely think that having this as a tool will make life as a developer easier and help us focus more on creativity and building solutions rather than focusing on some of the boring and monotonous repetitive code work that can be automated.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=913f9d5d9c7e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/using-chatgpt3-as-a-data-engineer-913f9d5d9c7e">Using ChatGPT3 as a Data Engineer</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Importance of Stratification!]]></title>
            <link>https://medium.com/analytics-vidhya/the-importance-of-stratification-c1f96d8184c8?source=rss-958e93b5db45------2</link>
            <guid isPermaLink="false">https://medium.com/p/c1f96d8184c8</guid>
            <category><![CDATA[stratification]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[a-b-testing]]></category>
            <category><![CDATA[causal-inference]]></category>
            <category><![CDATA[analytics]]></category>
            <dc:creator><![CDATA[Abhijit Menon]]></dc:creator>
            <pubDate>Thu, 30 Jul 2020 18:47:43 GMT</pubDate>
            <atom:updated>2020-07-31T16:44:20.763Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*rD5nAT4W_DPJowCH.png" /></figure><p>In my last <a href="https://medium.com/swlh/the-trap-of-a-b-testing-for-too-long-a4706066a692">post</a>, I went through an experiment that showed us how variance in the data across time can cause issues in drawing inferences from an A/B test that has been run over a long duration.</p><p>Time, however, is not the only factor that can lead to misplaced inferences. More often than not, there are other variables that can lead to false inferences being made and that is when the concept of Stratification of the data comes into play. Let’s go through this example of an A/B test and see how Stratification can get us to the right result.</p><h3>Looking at the Data</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*MV-tE3qde-NFOy6a.png" /></figure><p>The data consists of 10000 data points consisting of the customer ID, Age classification of the people visiting the website, the time of the visit, and the conversion Status.</p><p>Let us go ahead and perform our analysis on the Data.</p><h3>Data Analysis</h3><h3>Experiment 1</h3><p>The first thing a company would like to check is the comparison of the click-through rate between Group A and Group B. So let us do that:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RgUzJyvj0hBM92LSs_QvkQ.png" /></figure><p>From the graph, we see the click-through rate for B is slightly lesser than that of A. Just on the basis of this the company could assume that B does not work as well as good as A on this population. However, would that be the right decision to make? Let’s do some more analysis.</p><h3>Experiment 2</h3><p>The dataset gives us one factor — Age. Let’s perform a basic analysis to see what it represents within the data set.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mkoglMEbMypgaH1pAOAcnw.png" /></figure><p>We see that the number of Old people in both Group A and Group B is much more than that of young people. This could be leading to the age-old case of oversampling for a particular population. However, could over sampling be leading to a misplaced inference?</p><p>To answer this question, we sample from our dataset to now have an equal number of old and young people in both Group A and Group B.</p><p>We then perform the same experiment as before to compare the click-through rates of both Groups.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pTEdGZigumeFz8M27mfgkA.png" /></figure><p>What happened here? Suddenly, B is starting to perform much better than A. But what could have led to this not being seen across the whole population? Why does sampling over an equal number in both age groups lead to a flip in the initial assessment?</p><p>Let us dive deeper into each Age group and find out what is happening.</p><h3>Experiment 3</h3><p>Let us now split our initial data set into 2. One with only the young people and one with only the old people. After splitting them into two datasets, let us perform the 1st experiment on both of these datasets separately.</p><p><strong>Old People</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wA3rwjWYjJ1H4BKBkXogOA.png" /></figure><p><strong>Young People</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kMlB1XG6Rz4grpZr9gUPDQ.png" /></figure><p>Aha! There we have it. The reason our inferences were all misplaced was that ‘A’ works better with the Old people whereas ‘B’ works much better with the Young people.</p><p>Based on this finding, we can draw our final inferences.</p><blockquote><strong>The reason the first experiment showed us that ‘A’ is better overall is that the number of old people is much higher than young people.</strong></blockquote><blockquote><strong>The reason the second experiment showed B to be better is that B works much better than ‘A’ for young people than A does than ‘B’ for old people.</strong></blockquote><blockquote><strong><em>This is why the Stratification of data on the variables present is such an important step to perform. It allows us to gain an insight into how a particular treatment has an effect on different layers of the population and we can avoid getting into the trap of a confounding variable, in this case, Age.</em></strong></blockquote><p><strong>Thank you for reading through!</strong></p><p><strong>— Abhijit Krishna Menon</strong></p><p><strong>You can find the Jupyter Notebook where these experiments were performed </strong><a href="https://colab.research.google.com/drive/1d7kytjnvpHsGbJRgEA29ra8M_iAnLFK1?usp=sharing"><strong>here!</strong></a></p><p><em>Originally published at </em><a href="https://www.abhijitkmenon.com/post/the-importance-of-stratification"><em>https://www.abhijitkmenon.com</em></a><em> on July 30, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c1f96d8184c8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/the-importance-of-stratification-c1f96d8184c8">The Importance of Stratification!</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Multivariate​ Stock Market Analysis — Financial + Sentiment variables.]]></title>
            <link>https://medium.com/analytics-vidhya/multivariate-stock-market-analysis-financial-sentiment-variables-8f34af58e528?source=rss-958e93b5db45------2</link>
            <guid isPermaLink="false">https://medium.com/p/8f34af58e528</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[predictive-analytics]]></category>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[stock-market]]></category>
            <category><![CDATA[multivariate-regression]]></category>
            <dc:creator><![CDATA[Abhijit Menon]]></dc:creator>
            <pubDate>Sun, 28 Jun 2020 03:39:02 GMT</pubDate>
            <atom:updated>2020-07-31T16:43:32.964Z</atom:updated>
            <content:encoded><![CDATA[<h3>Multivariate​ Stock Market Analysis — Financial + Sentiment variables.</h3><p>The stock market prediction has been an active area of research for quite a while. However, building a model that takes into consideration every factor is still a challenging problem. Apart from historical prices, the current stock market is affected by news articles about the company, general news, and many other microeconomic and macroeconomic factors. There are several models out there to predict the stocks based on general news elements or historical prices but not many have taken into consideration all company-specific news or all of these factors together.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*THs5topZH7JCQ2Nu" /></figure><p>In this project we aim to see how taking company-specific news can help predict stock prices.</p><h3>Step 1: Data Collection</h3><p>Our data collection was split into 3 major chunks. The first was to get the Stock information for the various companies. The second was to collect company-specific news data for the companies that we were analyzing and the 3rd was to get the common news data that included politics, environment, economics, etc.</p><p><strong>1 ) Stock Data</strong></p><p>The stock market data was collected by calling the Yahoo finance API and collecting the stock data for the 30 companies currently a part of the DJIA index. We collected the data from 2006 to 2016. The data collected included the opening price, closing price, the high and low values for that particular day.</p><p><strong>2 ) Company News Data</strong></p><p>The company-wise news data was taken off the NYTimes website using a script to generate multiple API calls for company wise data across the years of 2006–2016.</p><p>The attributes that were a part of the dataset are -</p><p>1) Created Time</p><p>2) Snippet</p><p>3) Headline</p><p>4) Company Name</p><p>5) News — Desk ( What kind of news was this -Business, Entertainment, Tech .. etc.)</p><p><strong>3) General News Data</strong></p><p>The general news data was got from a ready to use dataset found on Kaggle. This data contained news data collected off of Reddit for the top 25 news headlines for each day across multiple years.</p><h3>Step 2: Data Pre-processing</h3><p>Once we had collected the data we had top pre-process the 3 datasets and put them together to allow us to use it to analyze the influence of the news data on the stock prices.</p><p>From the news data, we were looking to understand what the sentiment of the news for that particular day was. To do this we combined the news across the same day into a single section and took the overall sentiment for that section and allocated that sentiment to the day. We did this for both the company wise data as well as the common news data.</p><p>This way our dataset for each day from 2006 to 2016 had the stock data, and two sentiment scores. For each day the target value then became the next day’s stock value.</p><h3>Step 3: Data Analysis</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*fyhH6Y44pjg1XOnm.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*mSi2iV1Zm9cfcR2L.png" /></figure><p><strong>Figures:</strong> Change in stock values of the companies across the years.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*IpBD9K-3rnohY1-V.png" /></figure><p><strong>Figure:</strong> The red line shows the sentiment score and the blue line shows the stock values for the given day. We see in some places how a change in the sentiment score on a given data affects the stock prices.</p><h3>Step 4: Data Modeling</h3><p>Now coming to analyze whether our sentiment values affect our stock values by a huge amount. We considered different prediction algorithms initially and then finally settled on Recurrent Neural Networks and also an LSTM(Long Short Term Memory) algorithm, which is a special subset of a recurrent neural network. The reason being, the other algorithms we considered did not account well enough for the time-series nature of our data. (As a part of our coursework and guidelines we were required not to perform time-series manipulations on the data).</p><p>The LSTM algorithm required us to manipulate the data into a 3D array to be modeled. After performing this data manipulation, we went ahead and generated predictions with a different combination of our input variables. With some including the sentiment scores and some not. Post this we performed a comparison of the two results.</p><h3>Step 5: Analysis of Results</h3><p><strong>Recurrent Neural Network — Only Stock Value and Volume.</strong></p><p>Mean absolute error of 1.28.</p><p><strong>Recurrent Neural Network — Stock Value, Volume, and Sentiment of common news.</strong></p><p>Mean absolute error of 1.56.</p><p><strong>Recurrent Neural Network — Only Sentiment columns</strong></p><p>Mean Absolute Error of 5.78</p><p><strong>Recurrent Neural Network — All columns</strong></p><p>Mean Absolute Error of 1.0002.</p><p><strong>Recurrent Neural Network — LSTM (All columns)</strong></p><p>Mean Absolute Error of 0.45</p><p>We noticed that although not significant, the sentiment columns when added into the mix definitely help increase the accuracy of the model. However, given that we have not performed all the pre-processing that is required for a time-series data set, there is a lot of improvement that needs to be made to generate more accurate results and understandings from our dataset.</p><p>To get access to the code and the official project report, visit our GitHub link for the project:</p><p><a href="https://github.com/akmenon1996/Multivariate-Stock-Market-Analysis">https://github.com/akmenon1996/Multivariate-Stock-Market-Analysis</a></p><p><em>Originally published at </em><a href="https://www.abhijitkmenon.com/post/multivariate-stock-market-analysis-financial-sentiment-variables"><em>https://www.abhijitkmenon.com</em></a><em> on June 28, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8f34af58e528" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/multivariate-stock-market-analysis-financial-sentiment-variables-8f34af58e528">Multivariate​ Stock Market Analysis — Financial + Sentiment variables.</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The trap of A/B testing for too long.]]></title>
            <link>https://medium.com/swlh/the-trap-of-a-b-testing-for-too-long-a4706066a692?source=rss-958e93b5db45------2</link>
            <guid isPermaLink="false">https://medium.com/p/a4706066a692</guid>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[marketing-strategies]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[a-b-testing]]></category>
            <dc:creator><![CDATA[Abhijit Menon]]></dc:creator>
            <pubDate>Fri, 26 Jun 2020 23:00:49 GMT</pubDate>
            <atom:updated>2020-06-30T18:26:46.761Z</atom:updated>
            <content:encoded><![CDATA[<p>A/B testing is an extremely common test that companies run to compare different versions of their products to see which is performing better. A lot of the literature on A/B testing often recommends that the test should be run over a long period so that it can be made certain without doubt about the statistical significance of the result achieved.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/826/0*wSaE6C-clfOPnKu5.png" /></figure><p>While getting more data points and results over a longer duration is often a good thing, there could be some issues that arise in terms of underlying discrepancies in the way the data was collected, how the results were analyzed, and finally how inferences were made regarding the collected results.</p><p>I have created one such simulation of an A/B test to show how running an A/B test over a long duration is not always a good thing and how looking at the results of the data across the whole duration might lead to skewed inferences.</p><h4>Understanding The Data</h4><p>This data is a simulation of data collected by a company wanting to test how changing a particular aspect of the website leads to a customer buying a product which is termed as a conversion.</p><p><strong>Group A is our control group</strong> — In this case, it is the people exposed to the currently existing website.</p><p><strong>Group B is our treatment group</strong> — In this case, it the people who are exposed to the modified website.</p><p>Users were split into these two groups with a 0.5 probability.</p><p>The data spans across 3 days. ie. <em>1st of January, 2020–3rd of January 2020.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*wq7llbNbl0ByZFp_PLosdA.png" /><figcaption>Sample of the simulated data used.</figcaption></figure><p>Here in the Conversion Status column 0 implies<em> ‘Not Converted’ </em>and 1(not seen in the image) implies <em>‘Converted’.</em></p><p>Now that we have understood the data let’s statistically analyze the results of the A/B test in 3 different scenarios. We will be using hypothesis testing for our analysis.</p><h4>Experiment 1: Test across all days and the complete population.</h4><p>This experiment is what usually would happen in the case of an A/B test. The company would run the A/B test across multiple days and then statistically compare the results generated.</p><p>Pivoting across the Groups we see the result generated from our data as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/566/1*AmDOcXnfauk9j5PRUiLjqg.png" /><figcaption>Experiment 1 Results.</figcaption></figure><p>We now have two different conversion rates for our two groups. Now, how do statistically infer that these two are different?</p><p>We perform a hypothesis test!</p><p><strong>Hypothesis Test 1:</strong></p><p><strong>Null Hypothesis:</strong> There is no difference between the two conversion rates.</p><p><strong>p1 = p2</strong></p><p><strong>Alternative Hypothesis: </strong>The two conversion rates are statistically different.</p><p><strong>p1!=p2</strong></p><p><strong>Significance Level: 0.01</strong></p><p>With the given information we need to now calculate our Z-Statistic using the below formula:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/284/1*V8Kc3BfAh3B4piyJGNWJbw.png" /></figure><blockquote><em>The Z-Test is a statistical test used to compare the means/proportions from two different populations when the variances are known and the sample size is large(usually above 30 to be considered a normal distribution). The Z-Score we get from this test a number representing how many standard deviations above or below the mean the number derived from the comparison of the proportions is. If the Z-Score lies within the cut off(significance level’s Z Score) then we fail to reject our null hypothesis, else we can reject it.</em></blockquote><p>In our case:</p><p><em>p1 = 0.05002 | p2 = 0.056302 | n1 = 4938 | n2 = 5062</em></p><p><em>p = </em>0.0532<em> (This is the conversion rate calculated across the whole population including both A and B groups together)</em></p><p>Putting these values into the formula we get a Z Score of -1.399. On converting this score to a p-value we get <strong>0.1617</strong>.</p><p>0.1617 &gt; 0.01</p><p>Therefore, we fail to reject our Null Hypothesis. <br><strong>Inference: The two proportions are not significantly different and hence the treatment is not effective.</strong></p><p>This basically means that introducing the new features to the website did not do the company any good and it is just as good as the old one.</p><p>Fair enough. However, let’s look at the next experiment.</p><h4>Experiment 2: Test across all days and only the morning population.</h4><p>Let’s say the company ran this test only in the mornings. Here, mornings are defined as between 8 AM and 4 PM. We then perform the same steps as above.</p><p>Pivoting across the Groups we see the result generated from our data as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/568/1*kcZ-UAVNgR1FCSgQtGCBQw.png" /><figcaption>Experiment 2 results.</figcaption></figure><p><strong>Hypothesis Test 2:</strong></p><p><strong>Null Hypothesis:</strong> There is no difference between the two conversion rates.</p><p><strong>p1 = p2</strong></p><p><strong>Alternative Hypothesis: </strong>The two conversion rates are statistically different.</p><p><strong>p1!=p2</strong></p><p><strong>Significance Level: 0.01(This is an assumption which can be varied according to the use case)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/284/1*V8Kc3BfAh3B4piyJGNWJbw.png" /></figure><p>In our case:</p><p><em>p1 = 0.053896 | p2 = 0.023621 | n1 = 1707 | n2 = 1735</em></p><p><em>p = </em>0.038640<em> (This is the conversion rate calculated across the whole population including both A and B groups together)</em></p><p>Putting these values into the formula we get a Z Score of 4.60609. On converting this score to a p-value we get 0.000004.</p><p>0.000004 &lt; 0.01</p><p>Therefore, we reject our Null Hypothesis. <br><strong>Inference: The two proportions are significantly different and hence the treatment is significantly different, in our case if we were to perform a left tailed test, we would see that the conversion rate of our treatment group is significantly less than that of our control group.</strong></p><p>That’s weird. This is not in accordance with our results from the first test.</p><p>Let’s carry on and perform one last experiment.</p><h4>Experiment 3: Test across all days and only the evening population.</h4><p>Let’s say the company ran this test only in the evenings. Here, evenings are defined as between 4 PM and 11:59:59 PM. We then perform the same steps as above.</p><p>Pivoting across the Groups we see the result generated from our data as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/568/1*YJPOpVHBR9ca2hDl2gZmSg.png" /><figcaption>Experiment 3 data summary.</figcaption></figure><p><strong>Hypothesis Test 3:</strong></p><p><strong>Null Hypothesis:</strong> There is no difference between the two conversion rates.</p><p><strong>p1 = p2</strong></p><p><strong>Alternative Hypothesis: </strong>The two conversion rates are statistically different.</p><p><strong>p1!=p2</strong></p><p><strong>Significance Level: 0.01</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/284/1*V8Kc3BfAh3B4piyJGNWJbw.png" /></figure><p>In our case:</p><p><em>p1 = 0.05153 | p2 = 0.101725 | n1 = 1635 | n2 = 1681</em></p><p><em>p = </em>0.07629<em> (This is the conversion rate calculated across the whole population including both A and B groups together)</em></p><p>Putting these values into the formula we get a Z Score of -5.59283. On converting this score to a p-value we get 0.0000000223.</p><p>0.0000000223 &lt; 0.01</p><p>Therefore, we reject our Null Hypothesis. <br><strong>Inference: The two proportions are significantly different and hence the treatment is significantly different, in our case if we were to perform a right-tailed test, we would see that the conversion rate of our treatment group is significantly greater than that of our control group.</strong></p><p>Now how do we explain this? <br>When we performed the test across the whole population we found that the two conversion rates were not significantly different from each other. However, with the second two experiments, we see that the treatment group’s conversion rate is in fact different, and based on the time of day it could be different in either direction.</p><p>Now, how does a company deal with these confusing results?</p><p>If the company decides to just stick the old website, then they are losing out on the amazing results that those new features were providing them on the bunch of people that signed on in the evening. <br>However, if they move to the new website they lose out more customers than usual in the people who sign on in the mornings.</p><p>The best way to handle this would be to deploy different versions of the website according to the time and get the best possible results.</p><p><strong>However, the take away from these experiments is the fact that if the company had only stuck to the first experiment where they tested the whole population across all 3 days then they would be losing out on those extra conversions generated in the evening by switching to the second website.</strong></p><p>So how does one know how many splits to make and how long is too long when it comes to A/B testing? One solution is by the implementation of Causal Inference while making inferences on the results generated.</p><p>What is “<strong>causal inference”</strong>?</p><p><strong>Causal inference</strong> is the process of drawing a conclusion about a causal connection based on the conditions of the occurrence of an effect.</p><p>In this case, the time of day acts as a causal connection towards drawing customers to buying a product on the website with new features. It is important to understand why that is the case. It could be that the demographic of the people who sign-in in the mornings are different from those who sign-in in the evenings. It could be the difference in the demographic which is the true cause for the new website to be performing better in the evenings.</p><p>Whatever the reason, as a company who is releasing an A/B test it is important to delve deeper into the results and make conclusions based on a deep causal understanding of why a particular result is taking place.</p><p>PS: This experiment is a pretty good example of the <a href="https://ftp.cs.ucla.edu/pub/stat_ser/r414.pdf">Simpson’s Paradox</a> which might be an interesting read.</p><p>Find the Jupyter notebook with the data generation and the analysis <a href="https://github.com/akmenon1996/A-B-Testing-Causal-Inference/blob/master/ab_testing_simpsons_paradox.ipynb">here</a>.</p><p>Thank you for reading!</p><p>You can follow my work and other posts <a href="https://www.linkedin.com/in/abhijit-krishna-menon/">here</a>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a4706066a692" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/the-trap-of-a-b-testing-for-too-long-a4706066a692">The trap of A/B testing for too long.</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>