<?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"><channel><title><![CDATA[Pitayan's RSS Feed]]></title><description><![CDATA[A place where we share how we learn, innovate and improve ourselves]]></description><link>https://saaslabs.co</link><generator>GatsbyJS</generator><lastBuildDate>Tue, 06 Jun 2023 17:02:57 GMT</lastBuildDate><item><title><![CDATA[From Zero to One in AI - How Relentless Exploration Led Us to an Unfair Advantage 💪🔥]]></title><description><![CDATA[How we at built our AI framework from scratch. Dive into our tech stack.]]></description><link>https://saaslabs.co/posts/From-Zero-to-One-in-AI</link><guid isPermaLink="false">https://saaslabs.co/posts/From-Zero-to-One-in-AI</guid><category><![CDATA[AI]]></category><category><![CDATA[conversational AI]]></category><pubDate>Mon, 05 Jun 2023 00:00:00 GMT</pubDate><content:encoded>&lt;h1 id=&quot;introduction&quot; style=&quot;position:relative&quot;&gt;&lt;a href=&quot;#introduction&quot; aria-label=&quot;introduction permalink&quot; class=&quot;heading-anchor before&quot;&gt;&lt;span&gt;#&lt;/span&gt;&lt;/a&gt;Introduction&lt;/h1&gt;&lt;p&gt;Over the past year, we have witnessed a remarkable transformation in the industry, as artificial intelligence (AI) has transitioned from being perceived as niche and technical to being embraced by businesses worldwide. Its adoption has become widespread across various industries. &lt;/p&gt;&lt;p&gt;At SaaS Labs, we embarked on an AI journey just a year ago, armed with enthusiasm and a determination to succeed. With no prior experience in the AI space, we relied on relentless exploration and a commitment to learning from industry leaders. 
Today, we are proud to share our progress and the framework that has empowered us to develop and deploy over 10 AI models within a year, which now form an integral part of our product suite, including &lt;a href=&quot;https://iq.justcall.io/&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;Justcall iQ&lt;/a&gt;, &lt;a href=&quot;http://justcall.io/&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;Justcall&lt;/a&gt;, &amp;amp; &lt;a href=&quot;https://helpwise.io&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;Helpwise&lt;/a&gt; giving us an unfair advantage in the industry.&lt;/p&gt;&lt;h1 id=&quot;the-power-of-exploration&quot; style=&quot;position:relative&quot;&gt;&lt;a href=&quot;#the-power-of-exploration&quot; aria-label=&quot;the power of exploration permalink&quot; class=&quot;heading-anchor before&quot;&gt;&lt;span&gt;#&lt;/span&gt;&lt;/a&gt;The Power of Exploration&lt;/h1&gt;&lt;p&gt;When starting from scratch, it can be overwhelming to navigate the complex world of AI. We recognized the need to immerse ourselves in the latest industry trends, insights, and best practices. Our team actively sought out and devoured numerous articles, research papers, and case studies to gain a deeper understanding of AI fundamentals. We also engaged in meaningful conversations with established experts who graciously shared their knowledge and experiences. This relentless exploration became the bedrock of our success.&lt;/p&gt;&lt;h1 id=&quot;building-the-framework&quot; style=&quot;position:relative&quot;&gt;&lt;a href=&quot;#building-the-framework&quot; aria-label=&quot;building the framework permalink&quot; class=&quot;heading-anchor before&quot;&gt;&lt;span&gt;#&lt;/span&gt;&lt;/a&gt;Building the Framework&lt;/h1&gt;&lt;p&gt;Armed with newfound knowledge, we set out to create a robust framework that would enable us to develop and deploy AI models quickly and efficiently. Our aim was to establish a process that would support scalability while maintaining high standards of quality and reliability.&lt;/p&gt;&lt;h3 id=&quot;1-data-collection-and-preparation&quot; style=&quot;position:relative&quot;&gt;&lt;a href=&quot;#1-data-collection-and-preparation&quot; aria-label=&quot;1 data collection and preparation permalink&quot; class=&quot;heading-anchor before&quot;&gt;&lt;span&gt;#&lt;/span&gt;&lt;/a&gt;1. Data Collection and Preparation&lt;/h3&gt;&lt;p&gt;In data collection, we gathered relevant data from public sources and modified it to suit our specific use case. Our team played a vital role in refining and preparing the data for training our AI models. This meticulous process ensured the quality and accuracy of our models.&lt;/p&gt;&lt;h3 id=&quot;2-development-testing&quot; style=&quot;position:relative&quot;&gt;&lt;a href=&quot;#2-development-testing&quot; aria-label=&quot;2 development testing permalink&quot; class=&quot;heading-anchor before&quot;&gt;&lt;span&gt;#&lt;/span&gt;&lt;/a&gt;2. Development &amp;amp; testing.&lt;/h3&gt;&lt;p&gt;During the development and testing phase, we utilized tools such as &lt;a href=&quot;https://jupyter.org/&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;Jupyter Notebook&lt;/a&gt; and &lt;a href=&quot;https://colab.research.google.com/&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;Google Colab&lt;/a&gt; to build our models. Our approach was flexible, and we explored various solutions to find the optimal fit for our needs. In some cases, we employed &lt;a href=&quot;https://cloud.google.com/compute&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;virtual machines&lt;/a&gt; (VMs) for training our models, and we also explored the capabilities of &lt;a href=&quot;https://cloud.google.com/vertex-ai&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;Vertex AI&lt;/a&gt;. While we continue to search for the ideal solution that can fulfill all our use cases, our focus remains on finding the perfect fit to meet our specific needs and drive optimal results.&lt;/p&gt;&lt;h3 id=&quot;3-deployment-and-scalability&quot; style=&quot;position:relative&quot;&gt;&lt;a href=&quot;#3-deployment-and-scalability&quot; aria-label=&quot;3 deployment and scalability permalink&quot; class=&quot;heading-anchor before&quot;&gt;&lt;span&gt;#&lt;/span&gt;&lt;/a&gt;3. Deployment and Scalability.&lt;/h3&gt;&lt;p&gt;In deploying our AI models and ensuring scalability, DevOps team played a crucial role. We leveraged technologies such as &lt;a href=&quot;https://www.docker.com/&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;Docker&lt;/a&gt;, &lt;a href=&quot;https://cloud.google.com/kubernetes-engine&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;Google Kubernetes Engine&lt;/a&gt; (GKE), &lt;a href=&quot;https://www.jenkins.io/&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;Jenkins&lt;/a&gt;, and &lt;a href=&quot;https://bitbucket.org/product&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;Bitbucket&lt;/a&gt;. Docker enabled easy deployment, while GKE provided a scalable environment. Jenkins automated our CI/CD processes, and Bitbucket facilitated efficient source code management. With the help of our DevOps team and these tools, we successfully deployed and scaled our AI models&lt;/p&gt;&lt;h1 id=&quot;realizing-our-unfair-advantage&quot; style=&quot;position:relative&quot;&gt;&lt;a href=&quot;#realizing-our-unfair-advantage&quot; aria-label=&quot;realizing our unfair advantage permalink&quot; class=&quot;heading-anchor before&quot;&gt;&lt;span&gt;#&lt;/span&gt;&lt;/a&gt;Realizing Our Unfair Advantage&lt;/h1&gt;&lt;p&gt;The fruits of our labor quickly became evident as we witnessed the successful deployment of over 10 AI models across our products within a year. Our framework streamlined the development process, reducing time-to-market and increasing efficiency. With each new model, our knowledge base expanded, allowing us to tackle more complex challenges and deliver even greater value to our customers.&lt;/p&gt;</content:encoded><tags>AI,conversational AI</tags><featuredImage>https://saaslabs.co/static/f2f66c9dfe7ab7fc3c72fe0fb69a4782/MLOps.png</featuredImage></item><item><title><![CDATA[Demystifying Search]]></title><description><![CDATA[How does a search query work?]]></description><link>https://saaslabs.co/posts/demystifying-search</link><guid isPermaLink="false">https://saaslabs.co/posts/demystifying-search</guid><category><![CDATA[search]]></category><pubDate>Sat, 22 Oct 2022 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Search is a very normal use case while building communication applications. As customers send and receive messages using our products, they’re generating lots of information that they also want to access using text queries. Let’s take the example of  &lt;a href=&quot;https://helpwise.io&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;Helpwise&lt;/a&gt;, which needs to find the correct email from millions of emails.
This post discusses how we find the correct message for a search query in Helpwise &amp;amp; how we make our search engine able to handle gazillions of messages.&lt;/p&gt;&lt;h1 id=&quot;search-query&quot; style=&quot;position:relative&quot;&gt;&lt;a href=&quot;#search-query&quot; aria-label=&quot;search query permalink&quot; class=&quot;heading-anchor before&quot;&gt;&lt;span&gt;#&lt;/span&gt;&lt;/a&gt;Search Query&lt;/h1&gt;&lt;p&gt;Let’s look at how this search works for your use cases. Suppose we have 100 emails to search; then, in general, we need to check all of those documents 1 by 1 and see which document matches our query. In SQL, this can be written as:&lt;/p&gt;&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;sql&quot;&gt;&lt;pre class=&quot;language-sql&quot;&gt;&lt;code class=&quot;language-sql&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;SELECT&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;FROM&lt;/span&gt; emails &lt;span class=&quot;token keyword&quot;&gt;WHERE&lt;/span&gt; body &lt;span class=&quot;token operator&quot;&gt;LIKE&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&amp;#x27;%&amp;lt;query here&amp;gt;%&amp;#x27;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you look carefully, this query has a complexity of O(n) as the underlying Database that goes through each and every record to match the search query. This means if we have millions of emails, then the time taken would increase, which is pretty bad as the number of messages is virtually infinite.&lt;/p&gt;&lt;p&gt;This can be further optimized by restricting the database to search into the records of the particular customer by having a secondary index on something like the account id.
Below is the syntax for the same:&lt;/p&gt;&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;sql&quot;&gt;&lt;pre class=&quot;language-sql&quot;&gt;&lt;code class=&quot;language-sql&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;SELECT&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;FROM&lt;/span&gt; emails &lt;span class=&quot;token keyword&quot;&gt;WHERE&lt;/span&gt; body &lt;span class=&quot;token operator&quot;&gt;LIKE&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&amp;#x27;%&amp;lt;query here&amp;gt;%&amp;#x27;&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;AND&lt;/span&gt; account_id&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;account id&lt;span class=&quot;token operator&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Still, we don’t know how many emails can be in a single account, and it doesn’t allow us to offer performant searches.&lt;/p&gt;&lt;h1 id=&quot;elasticsearch-to-the-rescue&quot; style=&quot;position:relative&quot;&gt;&lt;a href=&quot;#elasticsearch-to-the-rescue&quot; aria-label=&quot;elasticsearch to the rescue permalink&quot; class=&quot;heading-anchor before&quot;&gt;&lt;span&gt;#&lt;/span&gt;&lt;/a&gt;ElasticSearch to the rescue&lt;/h1&gt;&lt;p&gt;Elastic Search is the rescue to the basic search query &amp;amp; it helps to accelerate the search results.
According to &lt;a href=&quot;https://elastic.co&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;elastic&lt;/a&gt;, &lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;Elasticsearch is a distributed, free and open search and analytics engine for all types of data, including textual, numerical, geospatial, structured, and unstructured. &lt;/p&gt;&lt;/blockquote&gt;&lt;h4 id=&quot;how-it-works&quot; style=&quot;position:relative&quot;&gt;&lt;a href=&quot;#how-it-works&quot; aria-label=&quot;how it works permalink&quot; class=&quot;heading-anchor before&quot;&gt;&lt;span&gt;#&lt;/span&gt;&lt;/a&gt;How it works?&lt;/h4&gt;&lt;p&gt;It stores data in a data structure called an inverted index that allows faster text retrieval.&lt;/p&gt;&lt;h5 id=&quot;inverted-index&quot; style=&quot;position:relative&quot;&gt;&lt;a href=&quot;#inverted-index&quot; aria-label=&quot;inverted index permalink&quot; class=&quot;heading-anchor before&quot;&gt;&lt;span&gt;#&lt;/span&gt;&lt;/a&gt;Inverted Index&lt;/h5&gt;&lt;p&gt;Let’s say there are 3 messages with the following text:&lt;/p&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;&lt;strong&gt;DocumentId&lt;/strong&gt;&lt;/th&gt;&lt;th&gt;&lt;strong&gt;Text&lt;/strong&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;quick brown&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;kangaroo jumps&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;quick brown fox jumps&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;Here, Inverted Index breaks the text and uses it as the Index key.&lt;/p&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;&lt;strong&gt;Text&lt;/strong&gt;&lt;/th&gt;&lt;th&gt;&lt;strong&gt;DocumentIds&lt;/strong&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;quick&lt;/td&gt;&lt;td&gt;1, 3&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;brown&lt;/td&gt;&lt;td&gt;1, 3&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;fox&lt;/td&gt;&lt;td&gt;1, 3&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;kangaroo&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;jumps&lt;/td&gt;&lt;td&gt;2, 3&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;Now, if we need to find messages with the keyword “jumps”, an elastic search plays the role of getting the results in a constant time.&lt;/p&gt;&lt;h5 id=&quot;distributed&quot; style=&quot;position:relative&quot;&gt;&lt;a href=&quot;#distributed&quot; aria-label=&quot;distributed permalink&quot; class=&quot;heading-anchor before&quot;&gt;&lt;span&gt;#&lt;/span&gt;&lt;/a&gt;Distributed?&lt;/h5&gt;&lt;p&gt;The above inverted index example was a very simple one. Now, imagine the same with millions of email/text messages. It can create a virtually infinitely large inverted index. Saving this in a single storage device limits the ability to scale it in terms of computation and storage. So, Elastic Search breaks data into almost equal-sized shards and distributes it among multiple nodes, making horizontal scaling possible.&lt;/p&gt;&lt;p&gt;More or less, Elastic Search abstracts the complexity of saving and searching the inverted indices metadata.&lt;/p&gt;&lt;h4 id=&quot;reasons-to-choose-elasticsearch&quot; style=&quot;position:relative&quot;&gt;&lt;a href=&quot;#reasons-to-choose-elasticsearch&quot; aria-label=&quot;reasons to choose elasticsearch permalink&quot; class=&quot;heading-anchor before&quot;&gt;&lt;span&gt;#&lt;/span&gt;&lt;/a&gt;Reasons to choose ElasticSearch&lt;/h4&gt;&lt;ol&gt;&lt;li&gt;Simple Restful APIs&lt;/li&gt;&lt;li&gt;Uses JSON to represents documents.&lt;/li&gt;&lt;li&gt;Scalable&lt;/li&gt;&lt;li&gt;Good Industry support &lt;/li&gt;&lt;/ol&gt;</content:encoded><tags>search</tags><featuredImage>https://saaslabs.co/static/d7f82421ce510232bd39970c36da2c8b/demo_1.jpg</featuredImage></item></channel></rss>