<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Vignesh Sankar Iyer</title>
    <description>The latest articles on DEV Community by Vignesh Sankar Iyer (@vigneshsankariyer1234567890).</description>
    <link>https://dev.to/vigneshsankariyer1234567890</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1140145%2Ff08a6df5-229f-41f8-bd05-e4c0b75645e4.jpeg</url>
      <title>DEV Community: Vignesh Sankar Iyer</title>
      <link>https://dev.to/vigneshsankariyer1234567890</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vigneshsankariyer1234567890"/>
    <language>en</language>
    <item>
      <title>BotTalk: Gathering requirements for our LLM-powered Telegram Chat Bot</title>
      <dc:creator>Vignesh Sankar Iyer</dc:creator>
      <pubDate>Thu, 24 Aug 2023 07:38:44 +0000</pubDate>
      <link>https://dev.to/vigneshsankariyer1234567890/bottalk-gathering-requirements-for-our-llm-powered-telegram-chat-bot-2gp3</link>
      <guid>https://dev.to/vigneshsankariyer1234567890/bottalk-gathering-requirements-for-our-llm-powered-telegram-chat-bot-2gp3</guid>
      <description>&lt;p&gt;&lt;em&gt;Part II of the series where I chronicle the journey of building &lt;strong&gt;&lt;u&gt;BotTalk&lt;/u&gt;&lt;/strong&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Building on the motivation and vision articulated in our first entry, we now turn to a more granular level of planning. In the world of software development, the foundation of a successful project is a clear and comprehensive understanding of its requirements. These requirements can broadly be categorised into &lt;strong&gt;Functional&lt;/strong&gt; and &lt;strong&gt;Non-functional&lt;/strong&gt;. But what do these terms mean, and why are they pivotal?&lt;/p&gt;

&lt;h2&gt;
  
  
  Functional vs. Non-Functional Requirements: A Brief Primer
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Functional requirements&lt;/strong&gt; pertain to the essential functions a system must execute. Think of them as the definitive list of features or services a system needs to provide. They answer the "what" of a system — what tasks it should perform, what its input/output behaviour should be, and the interactions it must support.&lt;/p&gt;

&lt;p&gt;On the other hand, &lt;strong&gt;Non-functional requirements&lt;/strong&gt;, detail how these functions are realised, focusing on system behaviour and quality. They're often the attributes that users expect by default, such as reliability, security, and performance. In essence, they address the "how" — how fast, how secure, how scalable, and so on.&lt;/p&gt;

&lt;p&gt;Together, these requirements give us a 360-degree view of what we aim to achieve and set the stage for future phases of our software development journey.&lt;/p&gt;

&lt;p&gt;Now, let's cover the Functional Requirements of &lt;strong&gt;&lt;u&gt;BotTalk&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Functional Requirements of &lt;strong&gt;&lt;u&gt;BotTalk&lt;/u&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;In the context of &lt;strong&gt;&lt;u&gt;BotTalk&lt;/u&gt;&lt;/strong&gt;, there are a couple key components that would drive the motivation for creating such a service. Of course, that would mean comparing it to the most prevalent chat assistant service right now: ChatGPT.&lt;/p&gt;

&lt;p&gt;Dissecting the UI gives us an idea of how &lt;strong&gt;&lt;u&gt;BotTalk&lt;/u&gt;&lt;/strong&gt; could enhance its use-case.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_yvI4zLj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sljt0vxyzvjp0eh06j8d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_yvI4zLj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sljt0vxyzvjp0eh06j8d.png" alt="UI of ChatGPT, taken on 23/08/2023" width="800" height="406"&gt;&lt;/a&gt;&lt;br&gt;Fig.1 - ChatGPT UI, taken on 23/08/2023
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;In the context of ChatGPT, conversations with the model are organised in threads, sorted by date on the left side. As for opening new chats, ChatGPT gives an option to select the preferred model above, while maintaining contexts per conversation within each tab and even providing suggestions for prompts.&lt;/p&gt;

&lt;p&gt;Taking inspiration from ChatGPT then gives us some understanding of the user requirements for a chat bot like &lt;strong&gt;&lt;u&gt;BotTalk&lt;/u&gt;&lt;/strong&gt;. These include: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Initialisation &amp;amp; Individual Usage:&lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;The bot should initialise in a one-on-one chat setting, primarily recording user details.&lt;/li&gt;
&lt;li&gt;Users should be able to select the LLM model they prefer from a provided list. We're initially focusing on OpenAI's models, but a future iteration might allow user-driven customisation. This choice ensures users have control over the conversational quality and style, fostering a sense of familiarity and empowerment.&lt;/li&gt;
&lt;li&gt;Users should dictate the level of context retrieval, graded on a scale from 1-10. This permits dynamic adaptability, tailoring conversations to the desired depth and relevance.&lt;/li&gt;
&lt;li&gt;To ensure quality, only one prompt will be answered at a time. Over-zealous prompters will be kindly asked to pace their inquiries.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Group Integration:&lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Bot should effortlessly integrate into group chats, answering based on the collective context offered by the group's members.&lt;/li&gt;
&lt;li&gt;Unregistered users must engage with the bot privately before group chat participation.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Monetisation &amp;amp; Subscription:&lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Users will operate on a token-based system, reflective of their usage. &lt;/li&gt;
&lt;li&gt;Users will be able to track their usage thus far.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Input Sanitation And Moderation:&lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Inputs by users will be monitored and checked for hateful language, mirroring ChatGPT's input sanitation mechanism&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These user requirements give a reasonable road map for the project, and allows for extendibility such as the use and deployment of models that is fine tuned on the collection of prompts stored by &lt;strong&gt;&lt;u&gt;BotTalk&lt;/u&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Next, let's take a look at some of the non-functional requirements of &lt;strong&gt;&lt;u&gt;BotTalk&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Non-functional Requirements of &lt;strong&gt;&lt;u&gt;BotTalk&lt;/u&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Examining some of the network connections and requests also gives us an idea of some of the system choices and non-functional requirements taken in mind while building ChatGPT, which we could use towards the development of BotTalk.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pbBc_3Sd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ugjmy6cuijkz6ajnbyk3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pbBc_3Sd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ugjmy6cuijkz6ajnbyk3.png" alt="Network requests of ChatGPT, taken on 23/08/2023" width="800" height="412"&gt;&lt;/a&gt;&lt;br&gt;Fig.2 - ChatGPT Network Requests, taken on 23/08/2023
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;This is the network request of a prompt that requests an implementation of a distributed queue system.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IYqeD_EE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1gr1a5moeusg97fbjsr7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IYqeD_EE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1gr1a5moeusg97fbjsr7.png" alt="Network request to generate implementation of a distributed queue system" width="800" height="411"&gt;&lt;/a&gt;Fig.3 - Request to generate implementation of a distributed queue system, taken on 23/08/2023&lt;br&gt;&lt;/p&gt;

&lt;p&gt;First, we see that the return content-type of the sent GET request is in fact an event stream. The model's response is streamed to the client to provide a better user experience, allowing the user to feel like the user is having a conversation with the model in real time. On top of that, while the entire content of the response in fact took 45 seconds to complete downloading, the server response only takes 2 seconds, even with millions of users around the world. This gives us an idea of the non-functional requirements that BotTalk should adopt:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;u&gt;Scalability&lt;/u&gt;: BotTalk should be built to cater to thousands of users globally. As the user base grows, the bot's architecture should gracefully handle the increased load.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;u&gt;Low Latency&lt;/u&gt;: In the world of chatbots, speed is paramount. Our bot aims for real-time communication, offering quick, concise, and pertinent responses.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;u&gt;Security&lt;/u&gt;: Conversations are personal. Our bot should ensure data integrity and prevent users from accessing other people's interaction histories. While ChatGPT achieves this with individual conversation threads with the user, we should be limiting the context to only the chat the user participates in with the bot. For example, if the user participates in 2 groups with the bot enabled &lt;em&gt;Chat A&lt;/em&gt; and &lt;em&gt;Chat B&lt;/em&gt;, user should not be able to get responses with the context for &lt;em&gt;Chat A&lt;/em&gt; while participating in &lt;em&gt;Chat B&lt;/em&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;With the functional and non-functional requirements in mind, let's generate user-stories, partitioned by phases. This allows for strategic, incremental development and testing. Breaking it down phase-by-phase ensures that each part of the project is validated before moving on to the next, minimising potential issues, as well as a road map for product release.&lt;/p&gt;




&lt;h2&gt;
  
  
  User Stories
&lt;/h2&gt;

&lt;p&gt;User stories are informal, general explanations of a software feature written from the perspective of the end user, which often follow a format of "As a [type of user], I want [an action] so that [a benefit/a value]". I have divided the user stories up into 4 phases,&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Initial Setup and Single-User Interaction,&lt;/li&gt;
&lt;li&gt;Group Integration,&lt;/li&gt;
&lt;li&gt;Monetisation and Credit System, and&lt;/li&gt;
&lt;li&gt;Sanitation and Moderation&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;At the end of each phase or iteration, I expect to have completed the user stories and have a working version of the bot that has completed the phase's user stories and maintained the status of previous phases's completed work.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Phase 1: Initial Setup and Single-User Interaction&lt;/u&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;As an alpha user, I want to initiate the bot in a private chat so that I can have personalized interactions.&lt;/li&gt;
&lt;li&gt;As a new user, I want the bot to record and recognize my details so that my interactions are personalized.&lt;/li&gt;
&lt;li&gt;As a user, I want to choose from available GPT models so that I can tailor the chat experience.&lt;/li&gt;
&lt;li&gt;As an advanced user, I want the option to fine-tune or select advanced models in the future so that I can continuously improve the chat experience.&lt;/li&gt;
&lt;li&gt;As a user, I want to set a context sensitivity level so that my chat reflects the depth of conversation history I desire.&lt;/li&gt;
&lt;li&gt;As a user, I want to be sure my chats are isolated so that my interactions are not influenced by other users' interactions.&lt;/li&gt;
&lt;li&gt;As a user, I want to receive a response for each of my prompts so that I feel the bot is attentive and interactive.&lt;/li&gt;
&lt;li&gt;As a user, I want the bot to inform me if I'm sending prompts too quickly so that I can adjust my interaction speed.&lt;/li&gt;
&lt;li&gt;As a user, I want to view my usage statistics so that I can understand my interaction patterns with the bot.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;u&gt;Phase 2: Group Integration&lt;/u&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;As a group admin, I want to add the bot to my group chat so that multiple users can interact with it.&lt;/li&gt;
&lt;li&gt;As a group member, I want the bot to consider all user inputs so that it provides relevant group context in its responses.&lt;/li&gt;
&lt;li&gt;As a new group member, I want the bot to prompt me for registration so that I can also participate in group interactions.&lt;/li&gt;
&lt;li&gt;As a group admin, I want to ensure only fellow admins can control the bot so that its functionalities aren't misused.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;u&gt;Phase 3: Monetization and Credit System&lt;/u&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;As a user, I want to know about my available credits so that I can manage my usage.&lt;/li&gt;
&lt;li&gt;As a user, I want to purchase additional credits so that I can continue using the bot extensively.&lt;/li&gt;
&lt;li&gt;As a super admin, I want to grant certain users unlimited access so that they can have uninterrupted interactions for promotional or testing purposes.&lt;/li&gt;
&lt;li&gt;As a user, I want my credits to be used uniformly across different chats so that I don't have to manage multiple balances.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;u&gt;Phase 4: Input Moderation&lt;/u&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;As a responsible developer, I want to ensure that users are not misusing the chat bot by sending inappropriate prompts, which could possibly influence the set of prompts collected by the users.&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;With our requirements in place, our next step is to take this blueprint and begin crafting our chatbot. The journey of BotTalk is only getting started, and there's much more ground to cover. I hope you'll continue to join me as we embark on this meticulous journey, watching an idea mature through each SDLC phase.&lt;/p&gt;

&lt;p&gt;Thank you and see you in the next article!&lt;/p&gt;

</description>
      <category>softwareengineering</category>
      <category>systemdesign</category>
      <category>ai</category>
    </item>
    <item>
      <title>BotTalk Begins: Introducing the LLM-powered Chatbot for Telegram Groups</title>
      <dc:creator>Vignesh Sankar Iyer</dc:creator>
      <pubDate>Sun, 20 Aug 2023 12:34:03 +0000</pubDate>
      <link>https://dev.to/vigneshsankariyer1234567890/bottalk-begins-introducing-the-llm-powered-chatbot-for-telegram-groups-1m1o</link>
      <guid>https://dev.to/vigneshsankariyer1234567890/bottalk-begins-introducing-the-llm-powered-chatbot-for-telegram-groups-1m1o</guid>
      <description>&lt;p&gt;&lt;em&gt;This post is the first part in a series whereby I document my progress on my side project.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Large Language Models (LLMs) have been all the rage, especially since the release of OpenAI's ChatGPT: a web-based chat application that utilises Generative Pre-trained Transformer (GPT) models to provide one-on-one conversational prowess, including understanding context, generating coherent responses, and adapting to various conversational topics.&lt;/p&gt;

&lt;p&gt;However, tools like ChatGPT currently offer one-on-one chats and often come with a price tag. This limits who can use them and how. Imagine having a chatbot in group chats on apps like Telegram or WhatsApp. It would mean more people could benefit from just one subscription. Plus, a chatbot in a group would need to respond to different topics and voices, making it even smarter and more useful. This isn't just about making chatbots available to more people; it's about making them fit better into how we talk online today, and better integrating them into our workflows.&lt;/p&gt;

&lt;p&gt;After laying down the broader motivations for such an application, I'd like to share some personal driving forces behind embarking on this side project of building a Telegram bot powered by GPT.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Gaining System Design Experience&lt;/strong&gt;: As I navigate my final year in university, I've recognized a gap in hands-on system design experience in many academic curriculums. Taking on this project isn't just about addressing an industry need, but also about furnishing myself with a practical understanding of building scalable systems. It's one thing to read about system design, but entirely another to implement it from scratch.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Exploring Diverse Technologies&lt;/strong&gt;: The realm of technology is vast, and every project can be approached with myriad tools and methodologies. My aim is to craft an affordable and resource-efficient system, leaning heavily on open-source solutions. This doesn't just democratize access to models like GPT, but also grants me an invaluable learning opportunity, enabling me to familiarize myself with a range of technologies.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Diving Deeper into Natural Language Models&lt;/strong&gt;: While the surface-level applications of models like GPT are fascinating, the underlying mechanics and intricacies intrigue me even more. This project serves as a deep dive into understanding natural language models, their workings, and most importantly, tailoring them for real-world applications.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In essence, this isn't just a side project. It's a personal journey of exploration, learning, and growth, bridging the gap between academic knowledge and practical application. So, come join me as I build a scalable, functional GPT-based chat bot that can participate and collaborate with you in your group conversations: &lt;strong&gt;&lt;u&gt;BotTalk&lt;/u&gt;&lt;/strong&gt;! This series will serve as a dev-journal as I develop my application, as well as keep me accountable for the progress that I make.&lt;/p&gt;

&lt;p&gt;Transitioning from motivation to action, I've envisioned this series of articles to closely align with the stages of the Software Development Life Cycle (SDLC). Each instalment will not only mark a developmental milestone for &lt;strong&gt;&lt;u&gt;BotTalk&lt;/u&gt;&lt;/strong&gt; but also offer insights into the intricacies of each phase. With our next piece, we will be immersing ourselves in "Requirement Gathering", laying out foundational needs, and sketching the personas &lt;strong&gt;&lt;u&gt;BotTalk&lt;/u&gt;&lt;/strong&gt; seeks to serve. As we journey forward, upcoming articles will delve into system design, development, testing, and deployment. Through these chronicles, my goal is to provide a panoramic view of both the technical landscape and the myriad decisions and challenges that punctuate the creation journey. Whether you're deep into the tech realm, just dipping your toes, or simply curious about the evolution of a chatbot, I invite you to accompany me on this meticulous journey, watching an idea mature through each SDLC phase.&lt;/p&gt;

&lt;p&gt;Thank you and see you in the next article!&lt;/p&gt;

</description>
      <category>bot</category>
      <category>ai</category>
      <category>systemdesign</category>
      <category>softwareengineering</category>
    </item>
  </channel>
</rss>
