<?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 Gabe Bouslov on Medium]]></title>
        <description><![CDATA[Stories by Gabe Bouslov on Medium]]></description>
        <link>https://medium.com/@gbouslov?source=rss-60ab276ea589------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*wKLL50ZeqcpGOnsDOV44VQ.jpeg</url>
            <title>Stories by Gabe Bouslov on Medium</title>
            <link>https://medium.com/@gbouslov?source=rss-60ab276ea589------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 03:56:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gbouslov/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[How to get OpenAI’s Deep Research for Free]]></title>
            <link>https://medium.com/@gbouslov/how-to-get-openais-deep-research-for-free-b8fe525bba68?source=rss-60ab276ea589------2</link>
            <guid isPermaLink="false">https://medium.com/p/b8fe525bba68</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[research-reports]]></category>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[ai-research]]></category>
            <dc:creator><![CDATA[Gabe Bouslov]]></dc:creator>
            <pubDate>Fri, 07 Feb 2025 02:13:23 GMT</pubDate>
            <atom:updated>2025-02-07T18:14:38.314Z</atom:updated>
            <content:encoded><![CDATA[<p>Gain access to a Deep Researcher Agent capable of PhD level reports in only 15 minutes of set-up</p><h3>Table of contents</h3><p>· What is Deep Research?<br>· Is this actually free?<br>· How to get Deep Research for free<br>∘ Part 1: Setting up your environment<br>∘ Part 2: Setting up required accounts<br>∘ Part 3: Getting the basic code set up<br>· Using the free Deep Research and how it works<br>· Final thoughts and predictions for Deep Research</p><h3>What is Deep Research?</h3><p>A few days ago, <strong>Open AI revealed their latest agent — a deep researcher.</strong> It’s an AI agent that can take a simple prompt and return a many thousand word PhD level report in minutes. <strong>It’s truly amazing </strong>and I think it will be instrumental to a lot of different industries and use cases.</p><p><strong>The big bummer? </strong>You can only use it if you have the ChatGPT Pro subscription, which<strong> costs a hefty $200 per month for 100 credits.</strong> Not to worry — <strong>there’s a way to get your very own deep researcher set-up for free.</strong></p><p>The below guide will work for someone with no coding background, just as it will work for a professional programmer. The project is open sourced, and I’ve tacked on a few valuable changes to bring it closer to parity with OpenAI’s tool.</p><h3>Is it actually free?</h3><p><strong>Yes and no</strong>. Downloading the repository and getting the agent is free. However, it requires API keys to an LLM (like the GPT models) and to an internet scraper / parser tool (like Firecrawl). There are, of course, ways to do this very cheaply or to use alternative LLMs or scraping tools for free.</p><p>At worst, a single research request using <strong>this method might cost you a couple of cents!</strong> Not too shabby when compared to $200 a month.</p><h3>How to get Deep Research for Free</h3><p>Okay, let’s dive into it. Let’s first get everything we need set-up and then dive into the actual code itself. Feel free to skip any steps that you don’t need and jump to those that you do.</p><h4>Part 1: Setting up your environment</h4><ol><li><strong>Install a code editor — I’m partial to </strong><a href="https://www.cursor.com/"><strong>Cursor</strong></a>, a fully AI-integrated code editor that makes programming a breeze. You can also use other options like <a href="https://code.visualstudio.com/download"><strong>Visual Studio Code (VS Code</strong></a><strong>)</strong></li><li><strong>Install </strong><a href="https://nodejs.org/en/download"><strong>node.JS </strong></a>— This will help you actually run the code (which is in javascript). As a python user, I would love to see a version of this repo in python .</li><li><strong>Create a folder on your desktop</strong> — You can call this whatever you like, such as “deep-researcher”</li></ol><h4>Part 2: Setting up required accounts</h4><p>You’ll need a couple of accounts for this to work. This should only take a few minutes.</p><ol><li><a href="https://beta.openai.com/signup/"><strong>Create an OpenAI account</strong></a><strong> </strong>if you don’t have one yet. Once you log in, you can create an API key by:<br>1) Clicking your profile in the top right<br>2) View API keys<br>3) Create new secret key. Be sure to save this key somewhere safe as you’ll need it later and it can’t be accessed again.</li><li><a href="https://github.com/"><strong>Create a github account</strong></a><strong> </strong>if you don’t have one yet. This will let you download / clone the repository, and is generally used by any programmer on earth.</li><li><a href="https://www.firecrawl.dev/app"><strong>Create a Firecrawl account</strong></a><strong>. </strong>Firecrawl turns entire websites into clean, LLM-ready markdown or structured data. This will let our agent actually get information back from the web and interpret / process it.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KujVrYNKkYQGviCbgZt2dA.png" /></figure><h4>Part 3: Getting the basic code set-up</h4><p>Great — now we’re ready to actually get our agent going! The repository we’ll be building off of is called <a href="https://github.com/dzhng/deep-research">Open Deep Research</a>. Now, let’s clone it.</p><ol><li><strong>Clone Deep Research</strong></li></ol><p>Open your code editor, and open your folder that you created earlier (e.g,. “deep-researcher”). Then find and open the terminal in the top-bar of the code editor window. Once that pops up, enter the following commands:</p><pre># Clone the project<br>git clone https://github.com/dzhng/deep-research.git<br>cd deep-research</pre><p><strong>2. Add your OpenAI and Firecrawl API keys</strong></p><p>Create a new file by right clicking the ‘src’ folder and call it ‘env.local’</p><p>In this file, copy and paste the following code.</p><pre><br># Add your API keys here within the quotes<br>FIRECRAWL_KEY=&quot;your_firecrawl_key&quot;<br>OPENAI_KEY=&quot;your_openai_key&quot;</pre><p>Copy and paste your OpenAI API key into this file, and copy and paste the Firecrawl API key from the dashboard. Boom — we’re good to go!</p><p><strong>3. Install packages and run your deep-researcher</strong></p><p>Enter the following commands into your terminal. This will install all of the libraries and packages that you need and then start the app.</p><pre>npm install<br>npm start</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*Jxotll0GQVNQN11KApzd-A.png" /><figcaption>OpenAI Deep Research — “What would you like to research?”</figcaption></figure><h3>Using the free Deep Research &amp; how it works</h3><p>Now for the fun part. The deep research agent has asked us what we would like to research!</p><p>Kicking off the research is a multi-step process. The agent will ask you:</p><ol><li>What would you like to research?</li><li>Specify research bredth (recommended: 2–10, default: 4)</li><li>Specify research depth (recommended: 1–5, default: 2)</li><li>[A series of follow-up questions depending on your prompt]</li></ol><p>The agent will then create a research plan (especially if you’re using the o3-mini model), start to conduct search queries online, collect information using firecrawl, and recursively dig deeper until it’s satisfied.</p><figure><img alt="Free Deep Research Space Request" src="https://cdn-images-1.medium.com/max/1024/1*BIj2B9buRvVfbkRLVUxuLQ.png" /><figcaption>Deep Research Request on Rare Earth Hypothesis</figcaption></figure><h4>Tips for each question</h4><p>Having experimented with both OpenAI Deep Research and this open-sourced version, it’s important to get the first prompt right!</p><p>If you want a deep-dive here, check out my <a href="https://medium.com/@gbouslov/best-practices-for-prompting-openais-deep-research-with-templates-b9a6c541330e">best-practice guide on prompting OpenAI deep research</a>.</p><ol><li>Without getting into too much detail, your query should a) be clear &amp; specific, 2) have clear boundaries on the research, c) include all relevant context (e.g., your background), d) be broken down into each piece of info you want, e) have clear output / section formats specified</li></ol><p>2. To get as close to the real OpenAI Deep Research product as possible, set this to around 4–6. Setting breadth too high can diminish the depth of research.</p><p>3. I would recommend setting this at 5. This means that it will run longer and cost slightly more money, but the outputs will be <strong><em>truly deep.</em></strong></p><p>4. Answer all of these questions with as much information as possible. If it seems that the agent has the wrong idea, restart the terminal and start from scratch with a more detailed prompt.</p><figure><img alt="Deep Research Follow-up Questions and Searches" src="https://cdn-images-1.medium.com/max/1024/1*-z3OHeNDJSQPIM7ZmfHVew.png" /><figcaption>Deep Research Search Queries</figcaption></figure><h4>How it works</h4><p>The agent follows a pretty standard chain-of-thought flow, where the model plans out its approach, executes a set of search queries. Then, depending on the level of depth that you’ve set, it will recursively go back through its findings and dig deeper until it feels that it’s satisfied your requirements.</p><p>There are a lot of ways to expand on this approach and make it better, but it’s a great start and intro into agentic behavior (which is becoming the topic of the year!).</p><figure><img alt="OpenAI Deep Research for free flow" src="https://cdn-images-1.medium.com/max/700/0*RUkaRAxci7-o1Jjy.png" /><figcaption>Deep Research Step by Step Flow</figcaption></figure><h4>Getting your output back</h4><p>When the agent finishes it’s research, you’ll see a newly created file called output.md. You’ll also be able to look at your terminal and see the agent’s searches and thought process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TbTjE-rAURSVTHzqJ4OGoA.png" /></figure><h3>Final thoughts and predictions for deep research</h3><p><strong>Deep Research is a step-change in what’s possible from a single prompt.</strong> This unprecedented access to deep, scholarly information (thousands and thousand of words) from a few short prompts is a gamechanger.</p><p>While the tool is valuable for learning about a topic or space, other use cases include (and certainly aren’t limited to):</p><ul><li>Competitive research (e.g., competitor pricing analysis, buzz on social media and forums)</li><li><a href="https://www.techradar.com/computing/artificial-intelligence/openais-deep-research-smashes-records-for-the-worlds-hardest-ai-exam-with-chatgpt-o3-mini-and-deepseek-left-in-its-wake">Solving complex problems with more time and ‘agentpower’</a> (e.g., deep research got 8X the score of GPT-4o on ‘Humanity’s Last Exam)</li><li>Comparison shopping (imagine deep research browsing Alibaba until it finds the cheapest, most reliable supplier)</li></ul><p>Some of the most fascinating and likely developments that I expect to come from Deep Research are:</p><ol><li><strong>Integration into AI Agent teams</strong></li></ol><p>AI Agent teams have been a point of discussion since early 2023, and many frameworks and infrastructures have been released (CrewAI, Autogen, OpenAI Swarm). Despite this, there have been<strong> few tangible use cases of an AI agent team</strong>. In nearly all cases, a singular, heavily-specialized AI agent can do just about everything a multi-agent team could do through the use of tools.</p><p>I can imagine that the ‘deep researcher’ agent archetype will evolve in tandem with a ‘deep research’ tool or task, an abstraction commonly used in AI agent architectures. Once a <strong>deep research capability can be layered into simple tool</strong>, many agent teams and workflows will leverage it to plan out their approach.</p><p><strong>2. New ‘deep’ agents</strong></p><p>With token usage as one of the only limitations, OpenAI and others in the space will likely continue to spawn other ‘deep’ agents. These <strong>agents will be more autonomous and more capable</strong> (actually interacting with the world), slowly moving towards complete domain dominance that rivals humans.</p><p>A few examples that we might see in 2025 are:</p><ul><li><strong>Deep Code: </strong>Imagine an agent that analyzes entire codebases, searches similar Github repos online, plans comprehensive and tactical solutions to fix or improve a repository, and then hands it off to a coding agent.</li><li><strong>Deep Strategy: </strong>Imagine an agent with a simple task — Help me start a business in X domain. The agent would identify a list of competitors, peruse their sites, learn all their strengths and weaknesses, and create an unbeatable plan to start a business in the same field.</li></ul><p><strong>3. Integration with capable agents like OpenAI Operator</strong></p><p>While deep research is powerful, it can only research and report findings for now. Just like Mustafa Suleyman (now CEO of Microsoft AI) said in his book ‘The Coming Wave’, <strong><em>Autonomous Capable Agents are coming.</em></strong></p><p><strong>Imagine a well-structured chain of agents that start with a deep researcher agent.</strong> This agent then <strong>spawns several ‘capable’ agents</strong> of its own that go and interact with the real world, gathering deeper insights that aren’t accessible to a researcher agent that only reads.</p><p>I hope that you’ve found this guide useful for yourself! As I continue to build on the open-source Deep Researcher and other agents, I’ll be sure to update this guide and share my learnings with you.</p><p>If you enjoyed the article, consider reading some of my <a href="https://medium.com/@gbouslov">other articles</a> on AI and agents or following me on my <a href="https://x.com/gab3ski">X account</a>. Thanks for reading!</p><figure><img alt="Free AI Agent for Deep Research" src="https://cdn-images-1.medium.com/max/1024/1*lzzfJAPDmKiRTfuIyxb6cg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b8fe525bba68" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Best practices for prompting OpenAIs Deep Research (with templates)]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@gbouslov/best-practices-for-prompting-openais-deep-research-with-templates-b9a6c541330e?source=rss-60ab276ea589------2"><img src="https://cdn-images-1.medium.com/max/2048/1*dWfumiPg0NRjztr4PAC_Ow.png" width="2048"></a></p><p class="medium-feed-snippet">Mastering Deep Research Prompts: A Practical Guide to AI Prompt Engineering</p><p class="medium-feed-link"><a href="https://medium.com/@gbouslov/best-practices-for-prompting-openais-deep-research-with-templates-b9a6c541330e?source=rss-60ab276ea589------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@gbouslov/best-practices-for-prompting-openais-deep-research-with-templates-b9a6c541330e?source=rss-60ab276ea589------2</link>
            <guid isPermaLink="false">https://medium.com/p/b9a6c541330e</guid>
            <category><![CDATA[prompting-technique]]></category>
            <category><![CDATA[deep-research]]></category>
            <category><![CDATA[agents]]></category>
            <category><![CDATA[openai]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Gabe Bouslov]]></dc:creator>
            <pubDate>Wed, 05 Feb 2025 00:26:28 GMT</pubDate>
            <atom:updated>2025-02-07T01:04:52.989Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Build a Perplexity Research Analyst Agent in 15 minutes]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@gbouslov/build-a-perplexity-research-analyst-agent-in-15-minutes-11f8fd540102?source=rss-60ab276ea589------2"><img src="https://cdn-images-1.medium.com/max/2048/1*p9ToykZffM65S-OhVM5NjQ.png" width="2048"></a></p><p class="medium-feed-snippet">Have you been reading about using AI for research but aren&#x2019;t quite sure how to get started?</p><p class="medium-feed-link"><a href="https://medium.com/@gbouslov/build-a-perplexity-research-analyst-agent-in-15-minutes-11f8fd540102?source=rss-60ab276ea589------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@gbouslov/build-a-perplexity-research-analyst-agent-in-15-minutes-11f8fd540102?source=rss-60ab276ea589------2</link>
            <guid isPermaLink="false">https://medium.com/p/11f8fd540102</guid>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[innovation]]></category>
            <category><![CDATA[automation]]></category>
            <dc:creator><![CDATA[Gabe Bouslov]]></dc:creator>
            <pubDate>Tue, 06 Aug 2024 17:50:26 GMT</pubDate>
            <atom:updated>2024-08-06T17:50:26.320Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Is AI the reason we’ve never met any aliens?]]></title>
            <link>https://medium.com/@gbouslov/is-ai-the-reason-weve-never-met-any-aliens-d69a1abe5858?source=rss-60ab276ea589------2</link>
            <guid isPermaLink="false">https://medium.com/p/d69a1abe5858</guid>
            <category><![CDATA[space]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[aliens]]></category>
            <category><![CDATA[ai-alignment-and-safety]]></category>
            <dc:creator><![CDATA[Gabe Bouslov]]></dc:creator>
            <pubDate>Mon, 24 Jun 2024 14:16:02 GMT</pubDate>
            <atom:updated>2024-06-24T14:16:02.310Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><strong>“Ours is the era of inadequate AI alignment theory. Any other facts about this era are relatively unimportant”,</strong> sat plainly in the Twitter bio of Eliezer Y., an AI researcher &amp; doomsdayist who’s convinced humanity only has a few years left</blockquote><p>AI alignment — the challenge of ensuring artificial general intelligence (AGI) acts in humanity’s best interests — isn’t just <em>relatively important</em>.</p><p>It is <em>the most</em> <em>important </em>obstacle our species has ever faced — and may even hold the key to answering humanity’s most ancient question: <em>Are we alone?</em></p><p>While AGI remains a theoretical concept, recent <a href="https://www.businessinsider.com/openai-staff-warned-board-of-ai-discovery-before-chaos-report-2023-11">leadership turmoil</a> at OpenAI suggests the alignment problem may already be at our doorsteps. Sam Altman, OpenAI’s CEO, sparked conspiracy theories late last year with his Reddit comment <a href="https://www.independent.co.uk/tech/chatgpt-ai-agi-sam-altman-openai-b2419449.html">“agi has been achieved internally”</a>. Though Altman later retracted this as an “obvious meme”, his subsequent firing and rehiring raised eyebrows across the world.</p><p>To add fuel to the fire, the OpenAI co-lead of <a href="https://openai.com/index/introducing-superalignment/"><em>superalignment</em></a><em> </em>recently tweeted:</p><blockquote><strong>“Yesterday was my last day as head of…superalignment @OpenAI.”<br></strong> — Jan Leike</blockquote><p>Leike’s departure amidst <a href="https://www.wral.com/story/more-openai-drama-exec-quits-over-concerns-about-focus-on-profit-over-safety/21437063/">other executive resignations</a> only adds to the mystery and urgency around AGI and proper AI alignment.</p><p><strong>What are these leaders at the forefront of AI development and AI safety aware of that we aren’t?</strong></p><p>I’m convinced that AI alignment failure is the missing piece in solving ‘The Fermi Paradox’, summed up in a single sentence by legendary physicist Enrico Fermi over 80 years ago— <em>“Where is everybody?”</em></p><h3>What is the Fermi Paradox and why does it matter?</h3><p>To fully appreciate the weight behind those three words, it’s important to break down this age-old question.</p><blockquote><strong>Fermi’s paradox</strong> — The discrepancy between the relatively high likelihood of advanced alien life existing and the lack of any conclusive evidence of their existence.</blockquote><p>Looking at the numbers, the existence of alien life seems inevitable:</p><ul><li>There are at least <a href="https://www.amnh.org/explore/ology/ology-cards/082-milky-way-galaxy#:~:text=The%20Milky%20Way%20is%20the,get%20across%20the%20Milky%20Way.">200 billion stars</a> in the Milky Way galaxy</li><li>Up to <a href="https://www.space.com/habitable-planets-common-sunlike-stars-milky-way">25% of these stars</a> have rocky planets in their habitable zone</li><li>In our galaxy alone, this would be many billions of Earth-like planets</li><li>In the entire universe, the potential number of habitable planets is hard to comprehend — over <a href="https://youtu.be/dww8Hekngmg?si=HajWhFekdYuPA2ul">100,000,000,000,000,000,000</a></li></ul><blockquote><strong>To put this staggering figure into perspective:</strong><br>The possible number of habitable planets in the universe — 100,000,000,000,000,000,000 — would be like every human alive today having over 12.5 trillion habitable planets to themselves. <br>TRILLION!</blockquote><p>Unsurprisingly, the “Great Silence” has puzzled scientists for decades.</p><p>One man, Frank Drake, created an equation to estimate the number of advanced civilizations in the Milky Way galaxy. The equation multiples seven varying cosmic factors to produce a fairly wide range of potential answers.</p><p>Though the formula can’t be used to draw any firm conclusions, estimates for the number of intelligent extraterrestrial civilizations in the Milky Way number somewhere between <em>20 civilizations and 50 million civilizations</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-14MgDueGfl8fk1p.png" /><figcaption>The Drake Equation broken down (Source: Scienceline)</figcaption></figure><p>Suffice to say, something doesn’t add up. Where are all of the aliens and why haven’t we seen any sign of their current or historical existence at all?</p><p>Dozens of theories have tried to explain the paradox, ranging from the <strong>Rare earth hypothesis</strong> (life is far rarer than we think) to the <strong>Zoo hypothesis</strong> (aliens observe us like animals at a zoo) to the <strong>Dark forest hypothesis </strong>(aliens are silent and paranoid of other life).</p><p>If you ever find yourself with a spare hour, treat yourself to the <a href="https://en.wikipedia.org/wiki/Fermi_paradox">Wikipedia article</a> on Fermi’s paradox and the many possible explanations — they’re equal parts fascinating and terrifying.</p><figure><img alt="Potential solutions to Fermi’s paradox" src="https://cdn-images-1.medium.com/max/1024/1*83YiW_Uu-N-n2drdl4DBBQ.jpeg" /><figcaption>Potential explanations to Fermi’s paradox (Source: wp.com)</figcaption></figure><p>While each explanation for offers its own possible insights, one that resonates particularly well in 2023 is the <strong>Self-destruction hypothesis</strong>.</p><blockquote><strong>Self-destruction hypothesis</strong> — Any advanced civilization headed toward interstellar travel and communication is likely to destroy itself before or shortly after developing radio or spaceflight technology. Potential means for global annihilation range from war to climate change to resource depletion.</blockquote><p>With AGI on the horizon, the failure to align AI and the resulting self-destruction of humanity as an explanation for Fermi’s paradox emerges as a deeply unsettling and increasingly urgent concern.</p><h3>AI Alignment and its Immeasurable Importance</h3><blockquote><strong>“I’ve not met anyone in AI [research laboratories] who says the risk [from training a next-gen model] is less than 1% of blowing up the planet” </strong><br>— <a href="https://en.wikipedia.org/wiki/Jaan_Tallinn">Jaan Tallinn</a>, Estonian billionaire programmer and AI investor.</blockquote><p>Read that again. Many leading AI experts worldwide believe that catastrophic consequences from a GPT-5-like model are not only possible but EXTREMELY likely.</p><p>So, how exactly do we go from creating cool images on DALL-E and generating 3-week Italy travel itineraries to the destruction of mankind?</p><p>Joe Carlsmith, an existential AI risk expert, presents a well-structured argument in his paper <a href="https://arxiv.org/pdf/2206.13353">“Is Power-Seeking AI an Existential Risk?”</a>.</p><p>Joe Carlsmith proposes the following claims to support his argument that AI will pose an existential risk to humanity by 2070 (and likely sooner):</p><blockquote>1. It will become possible and financially feasible to build relevantly powerful and agentic AI systems<br>2. There will be strong incentives to do so, conditional on (1)<br>3. It will be much harder to build aligned (and relevantly powerful/agentic) AI systems than to build misaligned (and relevantly powerful/agentic) AI systems that are still superficially attractive to deploy, conditional on (1) and (2)<br>4. Some such misaligned systems will seek power over humans in high-impact ways, conditional on (1)-(3)<br>5. This problem will scale to the full disempowerment of humanity, conditional on (1)-(4)<br>6. Such disempowerment will constitute an existential catastrophe, conditional on (1)-(5)</blockquote><p>Effectively, Carlsmith suggests that the future feasibility, affordability, and incentives of building powerful and agentic AI systems may lead to the development of misaligned AI systems that are attractive to deploy and could seek power over humans in many high-impact ways, potentially leading to the full disempowerment of humanity and resulting in an existential catastrophe.</p><p>In other words, a misaligned AI could very likely lead to the end of life on earth as we know it.</p><h3>AI alignment failure explains Fermi’s paradox</h3><p>Though Fermi’s paradox and the AI alignment problem might seem like two disparate concepts, they could actually be deeply intertwined. The crux of the hypothesis posits that the uncontrolled development of AGI could serve as a <em>‘Great Filter’</em> that stops civilizations from leaving their home planets.</p><p>The connection between these two concepts can be fairly easily laid out by a six-step argument that works backward from Fermi’s paradox.</p><blockquote><strong>1. Fermi’s paradox: </strong>To resolve the paradox between the high likelihood of alien life existing and the lack of any evidence so far, we would need to detect the presence of life somewhere in the universe.</blockquote><blockquote><strong>2. Detectability of life: </strong>An extraterrestrial civilization could be ‘detecable’ in one of three ways: a) Interstellar travel or communication, b) Large-scale impacts to their stellar/galactic neighborhoods, or c) Biosignatures in the home planet’s atmosphere.</blockquote><blockquote><strong>3. Technological advancements: </strong>For a civilization to achieve at least a) and b) and to some extent c), it would require significant technological advancement in one or more of: propulsion technology, energy production, or communications technology.</blockquote><blockquote><strong>4. AI as a pre/co-requisite:</strong> Given the complexity involved in developing this level of advancement, and the increasing importance of AI in current propulsion and energy tech on earth, it’s highly probable that an alien civilization would have developed AI to aid in these tasks.</blockquote><blockquote><strong>5. AI is likely to be misaligned: </strong>Given the inherent difficulty of aligning AI’s goals with a civilization’s own and the aggressive timelines needed to reign in the development of AGI, it’s likely that most civilizations would fail to perfectly align AI before the civilizations a) and b) develop to the point of being detectable.</blockquote><blockquote><strong>6. Catastrophic consequences result: </strong>Given the high likelihood of catastrophic consequences from a misaligned AI and the long timelines needed to make significant advancements in tech from 3a/3b, it’s possible and likely that AI acts as a great filter for civilizations and an indirect solution to Fermi’s paradox.</blockquote><p>Summed up more briefly, the argument is that:</p><blockquote>(1) Fermi’s paradox questions the lack of alien evidence despite the odds…<br>…(2) evidence or detectibility could manifest in one of three ways… <br>…(3) ways which require significant technological advancements…<br>…(4) the complexity of which effectively require AI development…<br>…(5) AI which we know is exceptionally hard/impossible to align…<br>…(6) which we know could result in a catastrophic end to the civilization</blockquote><p>This framework is certainly laden with assumptions and is by no means fool-proof. Though merely a hypothesis, it does beg the question — why is nobody talking about this very possibility happening here on earth?</p><p>To examine this possibility further, it’s crucial to consider where we stand on the evolutionary timescale and the implications for our own civilizations <em>detectability.</em></p><h3>Our Placement on the Evolutional Timescale</h3><p>Estimates for the arrival of AGI range from <em>“it’s already here”</em> to <em>“conscious machines are not possible”. </em>Though no one knows, Carlsmith&#39;s estimate of the year 2070 is one place to start (though perhaps far too hopeful.)</p><p>While AI is a rapidly growing domain, we must also keep in mind the 3 technological advancements. More specifically — how soon into our species 4.5 billion-year-old evolutional timescale will we reach detectable status?</p><p>To understand this, let’s benchmark humanity on the Kardashev scale.</p><blockquote>The Kardashev Scale is a method of measuring a civilization’s level of technological advancement based on the amount of energy it is capable of using.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*goLE1Jg9vjTXtSK8q01KNw.jpeg" /><figcaption>The Kardashev Scale Visualized (Source: Quora)</figcaption></figure><p>Proposed by Soviet astronomer Nikolai Kardashev in 1964, the scale is purely hypothetical, and the original variation proposes classifying civilizations into three types.</p><p><em>Homo Sapiens</em> has reached record peaks across development, lifespans, free time, and more. Yet, our civilization ranks a modest 0.7 on the scale.</p><p>It’s also important to note that the Kardashev scale is exponential. This then means that a Type 1 civilization would consume many millions of times <a href="https://en.wikipedia.org/wiki/Kardashev_scale#:~:text=A%20Type%20I%20civilization%20consumes,build%20cities%20on%20the%20oceans.">more power</a> than our current planetary output.</p><blockquote><strong>Experts estimate we’ll reach Type 1 status between the years </strong><a href="https://www.nature.com/articles/s41598-023-38351-y"><strong>2371 and 4000</strong></a><strong>.</strong></blockquote><p>Furthermore, studies by astrophysicists propose that the first civilization that humanity would come into contact with, therefore being ‘detectable’, would be about a 1.5–1.8 on the Kardashev scale. Using the earth’s growing rate of energy consumption as a proxy, this rating would make such a civilization many thousands of years more technologically advanced than ours across propulsion tech, communications tech, and energy production.</p><p>Though we are steadily developing in these three areas, rapid acceleration in AI development threatens to change our trajectory — or even render our advancements irrelevant.</p><h3>AI and it’s Unprecedented Growth</h3><p>AI computing power is currently doubling <a href="https://cset.georgetown.edu/publication/ai-and-compute/#:~:text=Between%202012%20and%202018%2C%20the,field%2C%20this%20trendline%20is%20unsustainable.">every 3.4 months</a>. This astronomical figure outpaces <a href="https://www.ml-science.com/exponential-growth">Moore’s Law </a>measly 2-year doubling time by a factor of seven.</p><blockquote>In other words — <strong>AI is the most rapidly-accelerating technology of all time.</strong></blockquote><p>Amidst rumors of an AGI-like GPT-5, releases of <a href="https://groq.com/">100X faster</a> AI-tuned chips, and reports of ‘<a href="https://www.independent.co.uk/tech/ai-anthropic-chatgpt-artificial-intelligence-b2282110.html">compounding exponential progress</a>’, it’s no wonder AI risk experts are concerned. With each iteration, AI models are becoming more sophisticated, capable and autonomous. <br>Don’t believe me? Here are just a few examples from the <strong><em>last 3 months</em></strong>.</p><ul><li><a href="https://www.cnn.com/2024/02/01/politics/election-deepfake-threats-invs/index.html">Election-rigging hyperrealistic deepfake videos indistinguishable from genuine footage</a></li><li><a href="https://www.asisonline.org/security-management-magazine/articles/2024/06/deepfakes/generative-ai-crimes/">AI voice models mimicking any voice in real-time, targeting the accounts of high net worth individuals in sophisticated scams</a></li><li><a href="https://www.cambridge.org/core/journals/european-journal-of-international-security/article/transcending-the-fog-of-war-us-military-ai-vision-and-the-emergent-postscopic-regime/35BCDEE8E28B076BCD597AFDC8976824">Autonomous drones independently identifying and attacking targets without human input in conflict zones​</a></li></ul><p>Efforts to align AI are actively ongoing, with companies like OpenAI dedicating upwards of 20% of their compute to solving the AI alignment problem.</p><p>However, AI alignment is inherently tricky. Many current techniques, such as reinforcement learning, rely on humans’ ability to supervise and correct AI behavior. As these systems become increasingly more intelligent and autonomous, our ability to supervise them drastically diminishes.</p><p>Interpretability, an alignment subfield dedicated to explaining the AI thinking process, remains unsolved due to the ‘<a href="https://www.scientificamerican.com/article/why-we-need-to-see-inside-ais-black-box/">black box</a>’ nature of AI. While techniques like automated alignment research and scalable oversight show some promise, they currently provide a superficial understanding at best.</p><p>To truly solve the alignment problem, we need a <a href="https://www.theguardian.com/commentisfree/article/2024/jun/15/hows-this-for-a-bombshell-the-us-must-make-ai-its-next-manhattan-project">Manhattan Project-level</a> commitment from world governments. This would need to be a global, multidisciplinary effort uniting brilliant minds through extensive public-private partnerships and tens of billions in funding.</p><p>Even a 1% chance of <a href="https://en.wikipedia.org/wiki/P(doom)">P(doom) </a>— the probability of human extinction due to misaligned AI —is unthinkably high.</p><h3>Conclusion: A transitory phenomenon?</h3><blockquote><strong>“I think it very likely — in fact, inevitable — that biological intelligence is only a transitory phenomenon… If we ever encounter extraterrestrial intelligence, I believe it is very likely to be postbiological in nature.” </strong><br>— Paul Davies, renowned astrophysict and cosmobiologist</blockquote><p>Having considered this very subject for decades, Davis’ 2010 book “The Eerie Silence”, includes this terrifying and thought provoking comment.</p><p>Is our human species destined to become simply a <em>transitory phenomenon</em>?</p><p>Over <a href="https://www.prb.org/articles/how-many-people-have-ever-lived-on-earth/#:~:text=No%20demographic%20data%20exist%20for,ever%20been%20born%20on%20Earth.">100 billion humans</a> have walked the earth before us, all with their own memories, experiences, and dreams.</p><p>Is all of it — this raw and unique human experience of ours—fated to be replaced by a cold, machine-dominated future?</p><blockquote><em>Will a peaceful alien starship land on our planet in 2371 and melancholironically ask, </em>“Where is everybody?”</blockquote><p>Today, we stand the precipice of a technological revolution many magnitudes more daunting than any others before it.</p><p>This may be our last chance to come together as a species and preserve the only whisper of consciousness that we know of in the entire universe.</p><p>Only by internalizing what’s at stake and uniting can we build a future where <em>Homo sapiens </em>thrives on our little blue planet and beyond. A future where we may yet overcome the “Great Filter”, and become the peaceful aliens who make contact with other beings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1008/1*MbKBDgbkNLIyZyvGQiuVWg.png" /><figcaption>A pale blue dot and the home of the human species</figcaption></figure><blockquote><strong>Look again at that dot. That’s here. That’s home. That’s us.</strong> On it everyone you love, everyone you know, everyone you ever heard of, every human being who ever was, lived out their lives. The aggregate of our joy and suffering, thousands of confident religions, ideologies, and economic doctrines, every hunter and forager, every hero and coward, every creator and destroyer of civilization, every king and peasant, every young couple in love, every mother and father, hopeful child, inventor and explorer, every teacher of morals, every corrupt politician, every “superstar,” every “supreme leader,” every saint and sinner in the history of our species lived there — on a mote of dust suspended in a sunbeam.</blockquote><blockquote><strong>The Earth is a very small stage in a vast cosmic arena.</strong> Think of the rivers of blood spilled by all those generals and emperors so that, in glory and triumph, they could become the momentary masters of a fraction of a dot. Think of the endless cruelties visited by the inhabitants of one corner of this pixel on the scarcely distinguishable inhabitants of some other corner, how frequent their misunderstandings, how eager they are to kill one another, how fervent their hatreds.</blockquote><blockquote>Our posturings, our imagined self-importance, the delusion that we have some privileged position in the Universe, are challenged by this point of pale light.<strong> </strong>Our planet is a lonely speck in the great enveloping cosmic dark. <strong>In our obscurity, in all this vastness, there is no hint that help will come from elsewhere to save us from ourselves.</strong></blockquote><blockquote><strong>The Earth is the only world known so far to harbor life. </strong>There is nowhere else, at least in the near future, to which our species could migrate. Visit, yes. Settle, not yet. Like it or not, for the moment the Earth is where we make our stand.</blockquote><blockquote>It has been said that astronomy is a humbling and character-building experience. There is perhaps no better demonstration of the folly of human conceits than this distant image of our tiny world. <strong>To me, it underscores our responsibility to deal more kindly with one another, and to preserve and cherish the pale blue dot, the only home we’ve ever known.</strong></blockquote><blockquote>— Carl Sagan, <em>Pale Blue Dot</em>, 1994</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d69a1abe5858" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Zero To GenAI Chatbot hero: Step-by-Step guide and best practices for building advanced…]]></title>
            <link>https://medium.com/@gbouslov/from-zero-to-genai-chatbot-hero-29b1f45f6542?source=rss-60ab276ea589------2</link>
            <guid isPermaLink="false">https://medium.com/p/29b1f45f6542</guid>
            <category><![CDATA[innovation]]></category>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[chatbots]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Gabe Bouslov]]></dc:creator>
            <pubDate>Wed, 20 Sep 2023 19:44:14 GMT</pubDate>
            <atom:updated>2023-09-20T19:49:24.668Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>From Zero To GenAI Chatbot hero: Step-by-Step guide and best practices for building advanced chatbots</strong></h3><h3>TL;DR</h3><ul><li>Over the last 2 months, I embarked on a journey to build a Generative AI innovation chatbot. I learned a lot and share my learnings below.</li><li>No deep technical knowledge is required. This guide is designed to help anyone build a unique, advanced, chatbot in an hour or two.</li><li>This article covers optimal tech stack, key definitions, comprehensive code snippets, advanced functionalities, and many learnings/tips</li><li>Streamlit is used for the UI/UX, OpenAI is used for chat completions, and various other libraries to support additional functionalities</li><li>My goal is to encourage you to bring your AI ideas to life — it’s truly never been easier than it is today</li><li><strong>TEMPLATE:</strong> Sample github repository <a href="https://github.com/innovationcopilot/Sample_code">here</a> and sample chatbot <a href="https://sample-genai-chatbot.streamlit.app/">here</a></li></ul><h3>Table of contents</h3><p>· <a href="#83fb">Introduction</a><br>· <a href="#2688">Why I built this chatbot and why I’m sharing it</a><br>· <a href="#d512">Creating a Basic Chatbot: step by step</a><br> ∘ <a href="#ba87">Part 1: Setting up your environment</a><br> ∘ <a href="#9d5f">Part 2: Setting up required accounts</a><br> ∘ <a href="#908c">Part 3: Creating the most basic chatbot</a><br>· <a href="#a41c">Advanced Chatbot Features</a><br>· <a href="#9f95">Other functionalities to consider adding</a><br>· <a href="#bee3">Building your own chatbot off of my template</a><br>· <a href="#dc04">Final thoughts and recommendations/tips</a><br>· <a href="#fe6c">Valuable links and references to learn more</a><br>· <a href="#ccdf">Key Concepts for Understanding Chatbots</a><br>· <a href="#e3da">Recommended Chatbot Tech Stack</a></p><h3>Introduction</h3><p>Since wrapping up my CS minor from university a few years back, I can count on one hand the number of times I’ve written code for fun. Despite that, I recently tackled one of the most rewarding challenges of my career so far: developing the ‘Innovation CoPilot’ chatbot. This project not only revitalized my rusty coding skills, but also deepened my understanding and appreciation of the exciting and rapidly growing GenAI space. This article is my attempt to distill these learnings into a step-by-step guide, so you can build your own GenAI chatbot quicker and with fewer roadblocks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*hK0WS3-9DgusuyHkEUpLMA.png" /></figure><h3>Why I built this chatbot and why I’m sharing it</h3><p>During the work week, I’m an associate at The Boston Consulting Group and work as a generalist, meaning I get to try my hand at a variety of projects across industries and functional areas — not many of which involve coding. A few months ago, an opportunity came up to help demonstrate the value of GenAI in innovation at BCG by developing the Innovation CoPilot chatbot.</p><p>With rusty coding skills, a bit of uncertainty, and a supportive leadership team, I jumped at the opportunity to build the chatbot.</p><p>The final product is the ‘Idea Challenger’, a customizable, fine-tuned GenAI chatbot capable of refining ideas and pressure-testing them against BCG’s tried-and-tested idea validation frameworks.</p><p>It’s well known that ChatGPT (and other LLMs) can help with ideation, and there are powerful tools out there that help with exactly this already (like the <a href="https://ideator.mit.edu/">MIT Ideator</a>).</p><blockquote><em>However, existing implementations center around </em>idea generation<em>, rather than </em>idea validation or refinement<em>. Ideas are, of course, a dime a dozen — it’s the quality of the idea that really matters.</em></blockquote><p>With this in mind, the goal became to develop a tool that doesn’t just offer users a bunch of ideas, but instead iteratively refines the ideas that have the most scale-up potential to be a valuable product/business.</p><p>With a combination of 1) rigorous idea validation frameworks, 2) extensive prompt engineering, and 3) significant testing, the CoPilot is able to do just that — all in a conversational and enjoyable experience.</p><p>After starting from near-zero knowledge and reading through dozens of articles, code documentations, and tweets, I finally found myself relatively comfortable with the technologies discussed in this article. Just a few weeks later, the underlying technology makes a lot more sense and I’ve gained a newfound appreciation and excitement for what’s possible with just a bit of tinkering.</p><p>My goal is to help empower you in a similar way, regardless of your technical background, and help you take full advantage of the exciting new technological era we’re approaching.</p><h3><strong>Creating a Basic Chatbot: step by step</strong></h3><h4>Part 1: Setting up your environment</h4><p>The following steps assume that you’re a beginner at creating chatbots and developing, and will guide you through the basic setup process.</p><ol><li><strong>Install </strong><a href="https://code.visualstudio.com/download"><strong>Visual Studio Code (VS Code</strong></a><strong>)</strong> — A free code editor made by Microsoft which I use to write and run the code for the chatbot. Feel free to use another code editor that you prefer. <a href="https://m.youtube.com/watch?v=MlIzFUI1QGA&amp;t=213s">Video tutorial</a>.</li><li><strong>Install </strong><a href="https://www.python.org/downloads/"><strong>Python</strong></a> —If you don’t already have Python installed on your computer, it’s quite easy to get started. This will be vital for building out the necessary functionality for the chatbot. <a href="https://www.youtube.com/watch?v=cUAK4x_7thA">Video tutorial</a>.</li><li><a href="https://www.youtube.com/watch?v=fEp5nWvujhI"><strong>Build out the folder structure for the chatbot</strong></a> — To follow coding best practices, it’s recommended to create separate files for the various components of the chatbot. In VS Code, create a working folder and within it create 5 separate files called:<br>- <strong>main.py</strong> — This is where the main body of the chatbot code will sit<br>- <strong>setup_st.py</strong> — This is where we’ll set up the chatbot UI/UX<br>- <strong>requirements.txt </strong>— This is where we’ll install the necessary Python libraries for our implementation<br>- <strong>helper_functions.py </strong>— This is where we’ll store both vital functions and complex functions for the chatbot<br>- <strong>index_functions.py</strong> — This is where we’ll store functions related to our knowledge base, indexing, and vectorizing. These are complex functionalities and are not necessary for a basic chatbot.</li><li><a href="https://www.youtube.com/watch?v=oLlT6c6jA-M"><strong>Install necessary libraries</strong></a> — by adding the following lines to the <strong>requirements.txt</strong> file and saving it. <br>streamlit<br>openai<br>langchain<br>nltk<br>scikit-learn<br>Then, open a new terminal in VS Code (Terminal &gt; New Terminal) and navigate to the folder in which the requirements.txt file is stored. <br>Run the following command in your terminal to install these libraries.<br>pip install -r requirements.txt<br>Voila! Now after creating the required accounts, we’ll dive into the fun stuff — building out the chatbot.</li></ol><h4>Part 2: Setting up required accounts</h4><ol><li><a href="https://beta.openai.com/signup/"><strong>Create an OpenAI account</strong></a><strong> </strong>if you don’t have one yet. Once you log in, you can create an API key by: <br>1) Clicking your profile in the top right<br>2) View API keys<br>3) Create new secret key. Be sure to save this key somewhere safe as you’ll need it later and it can’t be accessed again.</li><li><a href="https://streamlit.io/cloud"><strong>Create a Streamlit cloud account</strong></a> if you don’t have one by yet and sign up with GitHub, Google or email. You don’t need to do anything else with this account for the moment.</li></ol><h4>Part 3: Creating the most basic chatbot</h4><ol><li>Open the main.py and add the following code:</li></ol><pre># 1. Importing necessary libraries<br>import streamlit as st  # Import the Streamlit library<br>import random  # Import the random library<br>import time  # Import the time library<br><br># 2. Creating a title for our streamlit web application<br>st.title(&quot;Simple chat&quot;)  # Set the title of the web application<br><br># 3. Initializing the chat history in the session state (how the chatbot tracks things)<br>if &quot;messages&quot; not in st.session_state:  # Check if &quot;messages&quot; exists in session state<br>    st.session_state.messages = []  # Initialize &quot;messages&quot; as an empty list<br><br># 4. Displaying the existing chat messages from the user and the chatbot<br>for message in st.session_state.messages:  # For every message in the chat history<br>    with st.chat_message(message[&quot;role&quot;]):  # Create a chat message box<br>        st.markdown(message[&quot;content&quot;])  # Display the content of the message<br><br># 5. Accepting the user input and adding it to the message history<br>if prompt := st.chat_input(&quot;What is up?&quot;):  # If user enters a message<br>    with st.chat_message(&quot;user&quot;):  # Display user&#39;s message in a chat message box<br>        st.markdown(prompt)  # Display the user&#39;s message<br>    st.session_state.messages.append({&quot;role&quot;: &quot;user&quot;, &quot;content&quot;: prompt})  # Add user&#39;s message to chat history<br><br># 6. Generating and displaying the assistant&#39;s response<br>with st.chat_message(&quot;assistant&quot;):  # Create a chat message box for the assistant&#39;s response<br>    message_placeholder = st.empty()  # Create an empty placeholder for the assistant&#39;s message<br>    full_response = &quot;&quot;  # Initialize an empty string for the full response<br>    assistant_response = random.choice([<br>        &quot;Hello there! How can I assist you today?&quot;,<br>        &quot;Hi, human! Is there anything I can help you with?&quot;,<br>        &quot;Do you need help?&quot;<br>    ])  # Select assistant&#39;s response randomly<br><br>    # Simulate &quot;typing&quot; effect by gradually revealing the response<br>    for chunk in assistant_response.split():  # For each word in the response<br>        full_response += chunk + &quot; &quot;<br>        time.sleep(0.05)  # Small delay between each word<br>        message_placeholder.markdown(full_response + &quot;▌&quot;)  # Update placeholder with current full response and a blinking cursor<br><br>    message_placeholder.markdown(full_response)  # Remove cursor and display full response<br>    st.session_state.messages.append({&quot;role&quot;: &quot;assistant&quot;, &quot;content&quot;: full_response})  # Add assistant&#39;s response to chat history</pre><p>This implementation is taken directly from Streamlits documentation <a href="https://docs.streamlit.io/knowledge-base/tutorials/build-conversational-apps">here</a> and is far from the final product that we’ll get to. However, this simple code with comments is a great way to understand how the chatbot (and chatbots in general) function at their core.</p><p><a href="https://docs.streamlit.io/knowledge-base/using-streamlit/how-do-i-run-my-streamlit-script"><strong>Running this chatbot</strong></a> — To give this simple chatbot a go:<br>1) Go to File &gt; Open Folder and select the folder containing your chatbot project (main.py file).<br>2) Open the integrated terminal by going to View &gt; Terminal<br>3) In the terminal, type streamlit run main.py and press enter.<br>4) After running the command, Streamlit will display a URL in the terminal (usually <a href="http://localhost:8501/).">http://localhost:8501/)</a>, and your chatbot should load so that you can play around with it!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/739/1*Z3FTXJctBbiaedTzosrg0Q.png" /><figcaption>Actual output from the Innovation Pilot; includes many advanced features</figcaption></figure><h3><strong>Advanced Chatbot Features</strong></h3><p>Now that we understand how a basic streamlit chatbot works at the core, let’s take a look at how we can build one with the following functionalities.</p><blockquote>NOTE: For a completed GenAI chatbot template which incorporates and packages up these features and more, check out my repository <a href="https://github.com/innovationcopilot/Sample_code">here</a>.</blockquote><ul><li><strong>Incorporate OpenAI/LLM responses. </strong>Instead of the random phrases from above, looping in an LLM like OpenAI will allow us to summarize, criticize, converse, and all of the other magic you’ve seen ChatGPT do.</li></ul><pre># An implementation of a response function which captures the initial message,<br># last chatbot message, last user message, and constructs a prompt with this<br># Note: This does not included indexed information (more on that below)<br><br>def generate_response(prompt, history, model_name, temperature):<br>      # Get the last message sent by the chatbot<br>      chatbot_message = history[-1][&#39;content&#39;]<br><br>      # Extract the user&#39;s initial message from history<br>      first_message = history[1][&#39;content&#39;]<br><br>      # Extract the last message sent by the user<br>      last_user_message = history[-2][&#39;content&#39;]<br>    <br>      # Now, we&#39;re creating a &#39;full_prompt&#39;. Think of this as the complete message we send to the chatbot, giving it all the context it needs to understand our request.<br>      # The &#39;\n\&#39; line breaks and the &#39;###&#39; help to structure our prompt in a more understandable format for an LLM.<br>      full_prompt = f&quot;{prompt}\n\<br>      ### The original message: {first_message}. \n\<br>      ### Your latest message to me: {chatbot_message}. \n\<br>      ### Previous conversation history for context: {history}&quot;<br>      <br>      # Generate a response using OpenAI API<br>      api_response = openai.ChatCompletion.create(<br>        model=model_name, # Specifying which model to use. This can be hardcoded or passed as a user value depending on your use case.<br>        temperature=temperature,<br>        messages=[<br>            {&quot;role&quot;: &quot;system&quot;, &quot;content&quot;: full_prompt},<br>            {&quot;role&quot;: &quot;user&quot;, &quot;content&quot;: last_user_message},<br>        ]<br>      )<br>      <br>      # Then we add this part of the response to our &#39;full_response&#39; placeholder.<br>      full_response = api_response[&#39;choices&#39;][0][&#39;message&#39;][&#39;content&#39;]<br><br>      # After getting the chatbots full response, we package it in a specific format and present it as the final result of this function.<br>      yield {&quot;type&quot;: &quot;response&quot;, &quot;content&quot;: full_response}</pre><ul><li><strong>Create your setup_st.py file. </strong>This will enable us to adjust the page design, the sidebar, and the session_state variables. The session state variables allow<strong> </strong>us to create more dynamic and flexible conversations tailored to our use case by tracking variables, messages and other aspects of our conversation.</li></ul><pre># Example of a setup_st.py file which is called in your main file to setup the UI/UX and initialize the session<br><br>#1. Function to set up the page&#39;s layout and design elements<br>def set_design():<br>    # Creating a 3-column layout for the Streamlit app<br>    col1, col2, col3 = st.columns([1, 2, 1])<br>    <br>    # The main logo will be displayed in the middle column<br>    with col2:<br>        # Loading and displaying a logo image from the repository, and centering it<br>        st.image(&quot;sample_logo.png&quot;, use_column_width=True)<br><br>    # Adding a title to the Streamlit app, center-aligned<br>    st.markdown(&quot;&lt;p style=&#39;text-align: center; font-size: 30px;&#39;&gt;&lt;b&gt;[Sample Generative AI Chatbot]&lt;/b&gt;&lt;/p&gt;&quot;, unsafe_allow_html=True)<br><br># 2. Function to initialize variables that will hold the state of the app (illustrative list, not complete)<br>def initialize_session_state():<br>    # Used to generate the initial message for the conversation<br>    if &#39;messages&#39; not in st.session_state:<br>        st.session_state[&#39;messages&#39;] = [<br>            {&quot;role&quot;: &quot;assistant&quot;, &quot;content&quot;: &quot;Hi there, what can I help you with today?&quot;}<br>        ]<br>    # Can be used to make the chatbot end the convo or perform an action when some limit is reached<br>    if &#39;message_count&#39; not in st.session_state:<br>        st.session_state[&#39;message_count&#39;] = 0<br>    # Initializes the model_name session state variable<br>    if &#39;model_name&#39; not in st.session_state:<br>        st.session_state[&#39;model_name&#39;] = &quot;&quot;<br>    # Initializes the temperature session state variable<br>    if &#39;temperature&#39; not in st.session_state:<br>        st.session_state[&#39;temperature&#39;] = []<br>    # Initializes the OpenAI API key variable<br>    if &#39;api_key&#39; not in st.session_state:<br>        st.session_state[&#39;api_key&#39;] = &quot;&quot;<br>    # Initializes the use index variable to determine if we use index in replies<br>    if &#39;use_index&#39; not in st.session_state:<br>        st.session_state[&#39;use_index&#39;] = False<br><br># 3. Function to initialize the sidebar UI elements<br>def sidebar():<br>    # Adding a header to the sidebar<br>    st.sidebar.markdown(&quot;&quot;&quot;<br>    &lt;h1 style=&#39;color: black; font-size: 24px;&#39;&gt;Chatbot Configuration&lt;/h1&gt;<br>    &quot;&quot;&quot;, unsafe_allow_html=True)<br><br># 4.Function to create a &#39;Clear Conversation&#39; button on the sidebar<br>def clear_button():<br>    # Creating the &#39;Clear Conversation&#39; button<br>    clear_button = st.sidebar.button(&quot;Clear Conversation&quot;, key=&quot;clear&quot;)<br>    <br>    # If the button is clicked, this block will execute and the conversation will clear<br>    if clear_button:<br>        st.session_state[&#39;messages&#39;] = [<br>            {&quot;role&quot;: &quot;assistant&quot;, &quot;content&quot;: &quot;Hi there, what can I help you with today?&quot;}<br>        ]<br>        st.session_state[&#39;message_count&#39;] = 0<br><br># 5. Function to track the conversation for download functionality<br>def download_convo():<br>    # Checking if there are enough messages to download<br>    if &#39;messages&#39; in st.session_state and len(st.session_state[&#39;messages&#39;]) &gt; 0:<br>        # Concatenating all messages into a single string<br>        full_conversation = &quot;\n&quot;.join([<br>            f&quot;\n{&#39;-&#39;*20}\n&quot;<br>            f&quot;Role: {msg[&#39;role&#39;]}\n&quot;<br>            f&quot;{&#39;-&#39;*20}\n&quot;<br>            f&quot;{msg[&#39;content&#39;]}\n&quot;<br>            for msg in st.session_state[&#39;messages&#39;]<br>        ])<br>        return full_conversation<br>    else:<br>        # If not enough messages, show a warning<br>        st.warning(&quot;There aren&#39;t enough messages in the conversation to download it. Please refresh the page&quot;)<br>        return &quot;&quot;<br><br># 6. Function to create a &#39;Download Conversation&#39; button on the sidebar<br>def download_button():<br>    # Generating the full conversation text<br>    full_conversation = download_convo()<br>    <br>    # Creating a download button for the full conversation<br>    st.sidebar.download_button(<br>        label=&quot;Download conversation&quot;,<br>        data=full_conversation,<br>        file_name=&#39;conversation.txt&#39;,<br>        mime=&#39;text/plain&#39;<br>    )</pre><ul><li><strong>Add user-customizable chatbot configurations. </strong>This is where you can be most creative. Some of the ones I looped into the Innovation CoPilot include GPT model selection, temperature (randomness) adjustment, custom prompts, API keys, and more.</li></ul><pre># Note: Add this code into your setup_set.py file<br>#7.  This function is designed to capture the user&#39;s preferences for how the chatbot should respond. The possibilities here are endless!<br>def get_user_config():<br>    # Define a few AI models the user can choose from.<br>    model_options = {<br>        &quot;GPT-3.5 Turbo (16K tokens)&quot;: &quot;gpt-3.5-turbo-16k-0613&quot;, # Recommended as it has a 16K token limit, much higher than the other two. This allows longer &#39;memory recall&#39;.<br>        &quot;GPT-3.5 Turbo&quot;: &quot;gpt-3.5-turbo&quot;, # Fewer token version of above - not recommended<br>        &quot;GPT-4&quot;: &quot;gpt-4&quot; # Latest model from OpenAI. Recommended for complex chatbots, though has a lower token limit, higher token usage cost, and slower returns.<br>    }<br><br>    # Display button choices in the sidebar of the app for the user to pick their desired model from the ones just defined.<br>    st.sidebar.markdown(&quot;&lt;b style=&#39;color: darkgreen;&#39;&gt;Choose a GPT model:&lt;/b&gt;&quot;, unsafe_allow_html=True) # HTML for beautifying the label, not necessary<br>    # Create the radio button. Label is hidden (since we have HTMl label), it defaults to the first option (turbo 16k) of the model_options above.<br>    model_name = st.sidebar.radio(&quot;&quot;, list(model_options.keys()), index=0, label_visibility=&quot;collapsed&quot;) <br><br>    # Display a slider option for the user to choose &#39;temperature&#39; or randomness of the chatbot responses. Higher values are recommended for creative chatbots.<br>    st.sidebar.markdown(&quot;&lt;b style=&#39;color: darkgreen;&#39;&gt;Choose a temperature (randomness):&lt;/b&gt;&quot;, unsafe_allow_html=True)<br>    temperature = st.sidebar.slider(&quot;&quot;, min_value=0.1, max_value=1.0, value=0.5, step=0.1, label_visibility=&quot;collapsed&quot;)<br><br>    # Display an input text box to capture user&#39;s OpenAI API key so that the chatbot will be able to generate responses<br>    st.sidebar.markdown(&quot;&lt;b style=&#39;color: darkgreen;&#39;&gt;Enter OpenAI API Key to use chatbot:&lt;/b&gt;&quot;, unsafe_allow_html=True)<br>    api_key = st.sidebar.text_input(&quot;&quot;, type=&quot;password&quot;, label_visibility=&quot;collapsed&quot;)  # Hides the entered text for privacy<br><br>    # Display a checkbox to include users data so that the chatbot will be able to append information to its responses<br>    st.sidebar.markdown(&quot;&lt;b style=&#39;color: darkgreen;&#39;&gt;Use indexed data for responses:&lt;/b&gt;&quot;, unsafe_allow_html=True)<br>    use_index = st.sidebar.checkbox(&quot;&quot;, value=st.session_state.get(&#39;use_index&#39;, False), label_visibility=&quot;collapsed&quot;)<br><br>    # Save the values to the Streamlit &#39;memory&#39; to be used later<br>    st.session_state[&#39;model_name&#39;] = model_options[model_name]<br>    st.session_state[&#39;temperature&#39;] = temperature<br>    st.session_state[&#39;api_key&#39;] = api_key<br>    st.session_state[&#39;use_index&#39;] = use_index</pre><ul><li><strong>Create your ‘index_functions.py file’ file to manage indexed data.<br></strong>This file is responsible for managing the indexed data that the chatbot will use to provide more context-aware and informative responses. It enables the chatbot to interact with various types of documents, such as PDFs, databases, and even audio/video files.</li></ul><pre># Importing necessary libraries for indexing and Streamlit<br>import streamlit as st<br>from llama_index import VectorStoreIndex, ServiceContext, Document<br>from llama_index.llms import OpenAI<br>from llama_index import SimpleDirectoryReader<br><br># 1. Function to load and index data in your index_functions.py file<br>@st.cache_resource(show_spinner=True)  # Cache the data to avoid reloading every time<br>def load_data():<br>    # Spinner for user feedback while data is loading<br>    with st.spinner(text=&quot;Loading and indexing the data – hang tight! This shouldn&#39;t take more than a minute.&quot;):<br>        # Read documents from the directory and load them into memory<br>        reader = SimpleDirectoryReader(input_dir=&quot;./data&quot;, recursive=True)<br>        docs = reader.load_data()<br>        <br>        # Define the service context for the indexing, using GPT-3.5 Turbo model<br>        service_context = ServiceContext.from_defaults(<br>            llm=OpenAI(model=&quot;gpt-3.5-turbo&quot;, temperature=0.5, <br>            system_prompt=&quot;You are an expert on the Innovation CoPilot and your job is to answer questions about it. Assume that all questions are related to the Innovation CoPilot. Keep your answers technical and based on facts – do not hallucinate features.&quot;)<br>        )<br>        # Create the index using the loaded documents and service context<br>        index = VectorStoreIndex.from_documents(docs, service_context=service_context)<br>        # Return the created index<br>        return index<br>###############################################################################<br><br># 2. This is how you would construct the index in the main.py file<br>    # Call load_data function to get the indexed data<br>    index = load_data()<br>    <br>    # Create a chat engine using the indexed data; set the chat mode and verbosity (many options)<br>    chat_engine = index.as_chat_engine(chat_mode=&quot;condense_question&quot;, verbose=True)<br><br># 3. Example of how this index can be used in a generate_response function<br>def generate_response_index(prompt, history, model_name, temperature, chat_engine):<br># [Beginning of the function where full_prompt is constructed remains unchanged]<br>...<br>    # Initialize an empty string to store response fetched from the indexed data<br>    index_response = &quot;&quot;<br>    # Query the chat_engine using the last user message to get relevant data from indexed documents<br>    response = chat_engine.chat(last_user_message)<br>    # Store the relevant data fetched from indexed documents<br>    index_response = response.response<br>    # Append the relevant indexed data to the full_prompt to provide additional context to the chatbot<br>    full_prompt += f&quot;\n### Relevant data from documents: {index_response}&quot;<br>...<br># [The rest of the function, and how the function is called remains unchanged]</pre><h3><strong>Other functionalities to consider adding</strong></h3><ul><li><a href="https://docs.streamlit.io/library/get-started/multipage-apps/create-a-multipage-app"><strong>Multi-page apps</strong></a> to create landing , instruction or customization pages</li><li><a href="https://docs.streamlit.io/streamlit-community-cloud/share-your-app"><strong>Sharing your chatbot</strong></a> with others by hosting it on Streamlit Cloud</li><li><a href="https://towardsdatascience.com/5-simple-ways-to-tokenize-text-in-python-92c6804edfc4"><strong>Tokenizing &amp; summarizing</strong></a> documents/data to include in responses</li><li><a href="https://blog.streamlit.io/build-a-chatbot-with-custom-data-sources-powered-by-llamaindex/"><strong>Appending relevant material</strong></a><strong> </strong>based on key words used in chat</li><li><strong>Grading user responses</strong> to augment chatbot replies</li><li><strong>Creating a final ‘report’</strong> of your conversation with next steps / recs</li><li><strong>Stage/convo-flow — specific prompts</strong> guide the conversation</li><li><strong>Multi-step responses</strong> (e.g., summarize function + reply function)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*80QrV7DN2b34U8GYaOPyAA.png" /><figcaption>Some of the pages built out for the Innovation CoPilot</figcaption></figure><h3>Building your own chatbot off of my template</h3><blockquote><strong>TEMPLATE:</strong> You can find a full sample chatbot code repository <a href="https://github.com/innovationcopilot/Sample_code/tree/main">here</a></blockquote><blockquote>Similarly, you can find the chatbot that builds from this repository <a href="https://sample-genai-chatbot.streamlit.app/">here</a></blockquote><p>To get a headstart on your chatbot development, follow these steps:</p><ol><li><a href="https://docs.github.com/en/get-started/quickstart/fork-a-repo"><strong>Fork the GitHub repository:</strong></a> In the top-right corner of my Github repository <a href="https://github.com/innovationcopilot/Sample_code/tree/main">here</a>, click on the button labeled “Fork”. This will create a copy in your Github account which you can then customize to your unique context and needs.</li><li><a href="https://github.com/innovationcopilot/Sample_code/tree/main"><strong>Make your desired changes: </strong></a><strong><br>- </strong>Replace the document in the ‘data’ folder with one or more of your own documents to serve as the ‘knowledge base’<br>- Change the title and style of the chatbot in the setup_st.py file as well as the .streamlit/config.toml file<br>- Upload your own logo image by replacing ‘sample_logo.png’<br>- Add any additional functionalities you desire in the main.py and helper_functions.py file</li><li><a href="https://docs.streamlit.io/streamlit-community-cloud/deploy-your-app"><strong>Deploy the app on Streamlit cloud:</strong></a> Sign into streamlit, go to the ‘Deploy’ menu, and click on ‘New App’. Choose Github as your repository host and the fork as your repo. Click “Deploy” to launch your app — this may take a few minutes.</li><li><a href="https://openai.com/blog/openai-api"><strong>Add your OpenAI API key:</strong> </a>The chatbot will not function without an API key entered into the sidebar. After you enter this, you should be able to test and play around with the chatbot!</li></ol><h3>Final thoughts and recommendations/tips</h3><p>I sincerely hope that you found this article helpful. Whether you’re an AI guru or someone with an idea — it has never been easier to bring an AI idea to life. Thank you for reading and please don’t hesitate to reach out with your thoughts, questions or creations! I’ll leave you with a few tips to kickstart your chatbot development.</p><ol><li><strong>Start Simple, Scale Later. </strong>Don’t try to build Rome in a day. Start with a basic chatbot and add complexity incrementally to save yourself headaches later on.</li><li><strong>Community Learning. </strong>Platforms like X (formerly Twitter) have a vibrant AI community. Follow experts (<a href="https://twitter.com/gab3ski">and me!</a>), join discussions, and stay up-to-date on the latest trends in the space.</li><li><strong>Leverage ChatGPT/LLMs to help you debug. </strong>They say the brain named itself. Well then GenAI should be able to code itself :). Areas where you could utilize ChatGPT:<br>a) Interpreting complex documentation<br>b) Testing (e.,g rapidly generating responses on your behalf)<br>c) Cleaning up formatting<br>d) Commenting your code<br>e) Identifying areas for improvement</li><li><strong>Mind token limits. </strong>LLMs have a cap on how much they can process take in and output. Long conversations and convoluted prompts can quickly lead to your chatbot <em>forgetting</em> earlier messages.</li><li><strong>Randomize as much as possible.</strong> Stock chatbots can get boring fast. Leverage randomizing functions (like in the sample codebase) to add some flavor to greetings, replies, and questions that the chatbot asks.</li><li><strong>Spend some time brushing up on vocab.</strong> Taking 30 minutes to skim through the key concepts of GenAI / chatbots will give you a good base to understand documentation, tweets and your code functionality. You can even try to leverage ChatGPT as a tutor to test your knowledge.</li><li><strong>Take advantage of existing code.</strong> To save a lot of time and headache, start off with my <a href="https://github.com/innovationcopilot/Sample_code">chatbot code template</a> and leverage other folks’ open-source repositories and function definitions.</li><li><strong>Clearly structure prompts in an LLM-digestible way.</strong> LLMs are masters of input/output. A poorly structured or detailed prompt will likely lead to a less-than-ideal response — following best practices is your best bet.</li><li><strong>Security is paramount.</strong> LLMs are known to use input as training data, so make sure that what you’re feeding into them is not proprietary! Similarly, ensure that you’re protecting your API keys :)</li><li><strong>Have Fun.</strong> Building a chatbot can be challenging, but it’s also incredibly rewarding when you have that first genuine, useful conversation. So have fun with it and enjoy the process!</li></ol><blockquote>Below are important concepts, definitions and links to additional resources to help guide learning and understanding of chatbots and GenAI in general.</blockquote><h3>Valuable links and references to learn more</h3><p><a href="https://machinelearningmastery.com/what-are-zero-shot-prompting-and-few-shot-prompting/"><strong>Zero-shot and few-shot prompting:</strong></a> Learn how LLMs work and how to structure your prompts for much more complex functionality/output</p><p><a href="https://platform.openai.com/docs/guides/gpt-best-practices/strategy-use-external-tools"><strong>GPT-best practices from OpenAI:</strong></a><strong> </strong>Learn of the limitations and how to overcome them with proven techniques from the creators of ChatGPT</p><p><a href="https://medium.com/@eunice.choi/designing-a-chatbot-with-chatgpt-79afd818cbff"><strong>User-centric conversational AI:</strong></a> Learn and see examples of how to structure prompts to improve chatbot interpretation, tone, and voice</p><p><a href="https://extras.streamlit.app/"><strong>Library of chatbot extras:</strong></a> This link contains code snippets for dozens of additional functionalities, designs and use cases for your chatbot</p><p><a href="https://help.openai.com/en/articles/6654000-best-practices-for-prompt-engineering-with-openai-api"><strong>Prompt engineering best practices:</strong></a> Learn about the best practices for prompt engineering more broadly and use them to improve your output!</p><p><a href="https://openai.com/blog/function-calling-and-other-api-updates"><strong>Function calling for a more interconnected chatbot:</strong></a> Learn how to more reliably connect GPT’s capabilities with external tools and APIs</p><p><a href="https://blog.streamlit.io/building-gpt-lab-with-streamlit/"><strong>GPT Lab — a fascinating project to learn from:</strong></a> GPT Lab is one of the most beautiful and well-designed streamlit products I’ve seen — check it out!</p><h3><strong>Key Concepts for Understanding Chatbots</strong></h3><ul><li><strong>Generative AI: </strong>The type of AI under the hood of the most cutting-edge chatbots, and the technology we’ll be mastering in this article</li><li><strong>LLM (Large Language Model): </strong>A type of deep learning model architecture trained on vast amounts of text data to understand and generate human language output.</li><li><strong>Prompt: </strong>The input given to a language model, based on which it generates a response.</li><li><strong>Prompt Engineering: </strong>The art of crafting effective prompts to guide the AI’s responses in a desired direction.</li><li><strong>Token: </strong>The smallest unit of text that a language model can understand. A token can be as short as one character or as long as one word.</li><li><strong>Temperature:</strong> A parameter that controls the randomness of the AI’s output. Higher temperatures result in more random answers.</li><li><strong>Knowledge Base:</strong> A collection of information that a chatbot can access to provide relevant facts, data, and context to conversations.</li><li><strong>Embedding:</strong> The mathematical process of converting text into numerical representations that capture semantic meaning, allowing them to be compared and analyzed by an LLM.</li><li><strong>Vectorization:</strong> Transforming text into vector embeddings using machine learning algorithms. This numerical representation of text is used when indexing and querying knowledge bases.</li><li><strong>Indexing:</strong> Analyzing and organizing a knowledge base into an efficient lookup structure to enable quick retrieval of relevant information.</li><li><strong>Querying:</strong> Searching a knowledge base for specific information related to the current conversation and returning relevant excerpts.</li></ul><h3><strong>Recommended Chatbot Tech Stack</strong></h3><blockquote>Largely, the chatbot will be coded in Python and will utilize Streamlit for UI/UX and hosting, OpenAI for response generation, and a few other libraries for more complex chatbot functionalities.</blockquote><p>In-depth details on on the tech stack used to build the chatbot are listed below. These are purely recommendations, and many other alternatives exist.</p><ul><li><a href="https://streamlit.io/"><strong>Streamlit</strong></a><strong>: </strong>A Python library used for creating interactive web applications. It’s used in this project to build the chatbot’s user interface.</li><li><a href="https://streamlit.io/cloud"><strong>Streamlit Cloud</strong></a><strong>: </strong>A platform for deploying, managing, and sharing Streamlit apps. It’s used to host the chatbot.</li><li><a href="https://www.python.org/downloads/"><strong>Python</strong></a><strong>:</strong> The programming language used to write the chatbot’s code.</li><li><a href="https://www.langchain.com/"><strong>Langchain</strong></a><strong>: </strong>A Python library for natural language processing tasks.</li><li><a href="https://www.nltk.org/"><strong>NLTK</strong></a><strong>: </strong>The Natural Language Toolkit is a leading platform for building Python programs to work with human language data.</li><li><a href="https://scikit-learn.org/stable/"><strong>Sklearn</strong></a><strong>:</strong> A machine learning library for Python that can be used for a variety of complex tasks to improve your chatbot.</li><li><a href="https://www.llamaindex.ai/"><strong>VectorStoreIndex, SimpleDectoryReader, ServiceContext</strong></a><strong>:</strong> These classes are part of the llama_index module are used for indexing data, reading it, and crafting prompts.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=29b1f45f6542" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>