<?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 Sharvesh Pareek on Medium]]></title>
        <description><![CDATA[Stories by Sharvesh Pareek on Medium]]></description>
        <link>https://medium.com/@sharveshpareek?source=rss-8ace347ba665------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*oy6e5AKB0mgDJSP_rwukCw.png</url>
            <title>Stories by Sharvesh Pareek on Medium</title>
            <link>https://medium.com/@sharveshpareek?source=rss-8ace347ba665------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 09:15:41 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sharveshpareek/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[What’s the buzz about TOON?]]></title>
            <link>https://medium.com/@sharveshpareek/whats-the-buzz-about-toon-d84cabc64749?source=rss-8ace347ba665------2</link>
            <guid isPermaLink="false">https://medium.com/p/d84cabc64749</guid>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[token]]></category>
            <category><![CDATA[cost-optimization]]></category>
            <category><![CDATA[optimization]]></category>
            <dc:creator><![CDATA[Sharvesh Pareek]]></dc:creator>
            <pubDate>Wed, 03 Dec 2025 11:32:50 GMT</pubDate>
            <atom:updated>2025-12-03T11:32:50.881Z</atom:updated>
            <content:encoded><![CDATA[<p>TOON: New Structured Input for LLM-Based Projects</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9aEunkLt37_vsyC_p3oeRQ.png" /></figure><p>In the world of AI, one of the key challenges that we continually face is how to process and structure data in a way that allows LLM models to understand and generate meaningful outputs. Large language models (LLMs) have advanced tremendously in recent years, but the methods we use to feed structured input into these models are often outdated or overly complex. Enter <strong>TOON </strong>-a novel format designed to simplify and enhance structured input for LLM-based projects.</p><p>As a Senior AIML Engineer, I’m excited to share why TOON is gaining traction in the AI community and how its use can vastly improve the efficiency, clarity, and flexibility of projects that rely on LLMs.</p><h3>The Challenge of Structured Input</h3><p>For years, the standard for structured data input has been JSON (JavaScript Object Notation), and it has served its purpose well. JSON is flexible, readable, and widely used across many fields. However, as LLMs evolve and become more sophisticated, JSON’s limitations have become more apparent. Despite its strengths, JSON has some inherent drawbacks when it comes to handling complex, hierarchical data structures-particularly when working with large, multi-dimensional datasets that need to be processed and interpreted by LLMs.</p><p>LLMs like Claude(s) and GPTs thrive when they can interpret natural language inputs that are structured in a way that makes sense contextually. JSON, while human-readable, often lacks the simplicity and clarity that LLMs need to process data efficiently. Furthermore, JSON can quickly become cumbersome, especially when handling nested objects or when the relationships between different elements become complex.</p><pre>[<br>  {&quot;id&quot;: 1, &quot;name&quot;: &quot;Alice&quot;, &quot;department&quot;: &quot;Engineering&quot;, &quot;salary&quot;: 120000},<br>  {&quot;id&quot;: 2, &quot;name&quot;: &quot;Bob&quot;, &quot;department&quot;: &quot;Marketing&quot;, &quot;salary&quot;: 95000},<br>  {&quot;id&quot;: 3, &quot;name&quot;: &quot;Charlie&quot;, &quot;department&quot;: &quot;Engineering&quot;, &quot;salary&quot;: 110000}<br>]</pre><p>This is where <strong>TOON</strong> steps in.</p><h3>What is TOON?</h3><p>TOON, which stands for <strong>Tightly Optimized Object Notation</strong>, is a new and innovative format that aims to address the shortcomings of JSON in LLM-based projects. TOON simplifies the encoding of structured input, focusing on making data both more readable and more accessible to LLMs.</p><p>Developed with the unique needs of AI and LLM projects in mind, TOON combines the advantages of JSON’s human-readable syntax with the precision needed for machine processing. It’s designed to handle hierarchical data structures with more efficiency and clarity, providing an intuitive way for developers and AI systems to manage input data.</p><pre>[3]{Id,Name,Department,Salary}:<br>  1,Alice,Engineering,120000<br>  2,Bob,Marketing,95000<br>  3,Charlie,Engineering,110000</pre><h3>Key Features of TOON</h3><ol><li><strong>Simpler Syntax</strong><br> TOON simplifies the syntax compared to JSON, making it more streamlined and less verbose. The format allows developers to focus on the essential data elements without getting bogged down in unnecessary brackets, commas, and nested structures. This can drastically reduce the complexity of working with large datasets or deeply nested information.</li><li><strong>Enhanced Readability</strong><br> One of TOON’s primary goals is to improve human readability. It provides a cleaner and more intuitive way to represent complex data structures, making it easier for both humans and LLMs to comprehend. In contrast to JSON, TOON’s syntax is visually easier to parse, even in complex use cases.</li><li><strong>Natural Hierarchical Data Representation</strong><br> TOON is built to handle hierarchical relationships more naturally. It’s optimized for representing tree-like structures, which is an essential feature when working with datasets that have nested or relational data. This is particularly useful in cases where data needs to flow naturally into the LLM’s training or inferencing pipelines.</li><li><strong>Compact Representation</strong><br> Unlike JSON, which can sometimes be overly verbose, TOON is designed to be more compact. This allows developers to represent the same information using fewer lines of code, reducing both storage requirements and potential performance bottlenecks.</li><li><strong>LLM Optimization</strong><br> Perhaps the most compelling feature of TOON for AIML practitioners is its optimization for LLM applications. The format is structured in a way that makes it easier for LLMs to interpret and process data, enabling faster and more accurate results. The streamlined nature of TOON ensures that LLMs can spend less time parsing data and more time generating useful outputs.</li></ol><h3>Why Should You Use TOON in Your LLM-Based Projects?</h3><p>There are several compelling reasons why you should consider adopting TOON for your LLM-based projects. Here are a few:</p><ol><li><strong>Improved Efficiency</strong><br> When using traditional formats like JSON, parsing and converting data into a usable format for LLMs can be time-consuming and error-prone. TOON removes much of the overhead involved in these processes. Its more efficient structure reduces the need for complex parsing logic and accelerates data ingestion.</li><li><strong>Easier Data Integration</strong><br> LLMs often require large, structured datasets that come from various sources. With TOON, data integration becomes smoother due to its simplified and more adaptable structure. Whether you’re dealing with data from APIs, databases, or raw inputs, TOON’s simplicity means that you can focus on the core logic of your project rather than wrestling with incompatible data formats.</li><li><strong>Enhanced Maintainability</strong><br> Complex data structures can become a nightmare to maintain, especially as they evolve over time. The clarity and simplicity of TOON’s format make it much easier to debug, update, and maintain the data structures over the lifespan of your project. This reduces technical debt and helps maintain code quality.</li><li><strong>Human-Like Context Representation</strong><br> LLMs excel at processing data that is formatted in a way that mimics natural language or conversational structures. TOON’s more intuitive design allows it to represent complex relationships and hierarchies in a way that feels more “human,” which can improve the model’s ability to generate accurate and meaningful responses.</li><li><strong>Reduced Error Rates</strong><br> Due to its simplified and optimized structure, TOON reduces the potential for errors in data parsing. With fewer opportunities for misinterpretation, TOON ensures that data is consistently and accurately represented to the LLM, resulting in higher-quality outputs.</li></ol><h3>Comparing TOON and JSON: A New Era of Structured Input</h3><p>The major difference between TOON and JSON is the <strong>level of abstraction</strong>. JSON focuses on general-purpose data serialization, while TOON is designed to meet the specific needs of AI and LLM projects. For developers working on projects that leverage LLMs for natural language processing, machine learning, or other complex tasks, TOON offers several advantages:</p><ul><li><strong>Less Overhead</strong>: TOON’s compact nature minimizes the size of data representations, reducing the amount of storage and bandwidth needed for large datasets.</li><li><strong>Easier Integration with LLM Pipelines</strong>: TOON’s hierarchical structure fits well with the way LLMs process data, reducing the need for extensive preprocessing.</li><li><strong>More Natural Data Representation</strong>: TOON is designed to more closely mirror the kind of relational structures that LLMs understand best, making it an ideal choice for projects where natural data interpretation is a priority.</li></ul><pre>Metric            |  JSON   |  TOON  | Difference   <br>Token Consumption | 100%    | 10–40% | 60–90% lower <br>Latency           | 100%    | 40–80% | 20–60% faster <br>Overhead          | 25–40%  | 5–10%  | ~70% reduction </pre><p>The shift from JSON to TOON may seem small, but it represents a significant step forward for developers working with LLMs. As the field of AIML continues to evolve, formats like TOON will play a pivotal role in driving efficiency, reducing errors, and improving overall system performance.</p><p>And the best part: it’s already available for multiple languages (including):</p><p><strong>.NET:</strong> <a href="https://github.com/0xZunia/ToonSharp">ToonSharp</a></p><p><strong>Python</strong>: <a href="https://github.com/xaviviro/python-toon">python-toon</a></p><p><strong>Go</strong>: <a href="https://github.com/alpkeskin/gotoon">gotoon</a></p><h3>When Not to Use TOON</h3><p>TOON excels with uniform arrays of objects, but there are cases where other formats are better:</p><ul><li><strong>Deeply nested or non-uniform structures</strong>: JSON-compact often uses fewer tokens. Example: complex configuration objects with many nested levels.</li><li><strong>Semi-uniform arrays:</strong> Prefer JSON if your pipelines already rely on it.</li><li><strong>Pure tabular data:</strong> CSV is typically more compact than TOON for simple, flat tables. TOON introduces only a small overhead — about 5–10% — to include structural elements such as array-length markers, field headers, and scoped delimiters. This slight increase in size delivers significantly better reliability when processed by LLMs.</li></ul><h3>Conclusion</h3><p>For developers working with LLM-based projects, TOON presents a fresh opportunity to improve data processing efficiency and model accuracy. As we continue to scale our projects and integrate increasingly complex data, adopting optimized input formats like TOON will make a noticeable difference in both development and operational efficiency.</p><p>By embracing TOON, we can ensure that our LLMs are working with data that’s structured in a way that enhances their capabilities, and we can pave the way for more seamless, efficient, and human-like interactions with AI systems.</p><p>To learn more about TOON and how you can implement it in your own projects, check out the <a href="https://github.com/toon-format/toon">GitHub repository</a> as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gcnNtUnxb0JGl_ftNM8fFw.png" /></figure><h3>Need Help or Have Questions? Let’s Connect!</h3><p>📬<strong>Email </strong>: sharveshpareek@gmail.com</p><p>🌐<strong>Profile </strong>: <a href="https://medium.com/@sharveshpareek">Sharvesh Pareek</a></p><p><strong>🔗 LinkedIn </strong>: <a href="https://www.linkedin.com/in/sharveshpareek/">Sharvesh Pareek</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d84cabc64749" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The AI Ghibli Craze: Cool Trend or Data Privacy Nightmare?]]></title>
            <link>https://medium.com/@sharveshpareek/the-ai-ghibli-craze-cool-trend-or-data-privacy-nightmare-164733f80a02?source=rss-8ace347ba665------2</link>
            <guid isPermaLink="false">https://medium.com/p/164733f80a02</guid>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[trending]]></category>
            <category><![CDATA[privacy]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[ghibli]]></category>
            <dc:creator><![CDATA[Sharvesh Pareek]]></dc:creator>
            <pubDate>Thu, 03 Apr 2025 08:03:45 GMT</pubDate>
            <atom:updated>2025-04-03T08:03:45.755Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Welcome to the AI-Powered Ghibli Universe!</strong></p><p>If you’ve been scrolling through social media lately, you’ve probably seen a flood of AI-generated Studio Ghibli-style images. People are transforming their selfies, pets, and even random objects into dreamy, hand-painted masterpieces straight out of a Hayao Miyazaki film. It’s like stepping into <em>Spirited Away</em> — but with a tech twist.</p><p>From <strong>free online tools</strong> to <strong>advanced AI models</strong>, everyone wants a piece of the Ghibli magic. But before you jump on the bandwagon, let’s talk about the <strong>hidden cost</strong> of all this AI wizardry: <strong>your data.</strong></p><h3>Who’s Powering This AI Ghibli Hype?</h3><p>Several AI companies are offering tools to create these stunning Ghibli-style images. Here’s a breakdown of the biggest players:</p><p>🖌 <strong>OpenAI (DALL·E in ChatGPT)</strong> — Allows users to create Ghibli-style images <strong>directly in ChatGPT</strong>. The catch? Your images and prompts might be stored and analyzed. (<a href="https://openai.com/index/introducing-4o-image-generation/">Source</a>)</p><p>🎨 <strong>Flux’s “Studio Ghibli AI Style”</strong> — A <strong>free online tool</strong> that quickly turns any image into Ghibli-esque art. (Source)</p><p>🚀 <strong>Grok &amp; Fotor</strong> — More platforms riding the trend, offering similar image transformation features.</p><p>🤖 <strong>Stable Diffusion (Run Locally)</strong> — If you’re worried about privacy, this AI can be installed on your PC, so your data stays safe.</p><p><strong>Bottom line?</strong> If you’re using an AI tool that runs in the cloud (like OpenAI or Flux), your images and data <strong>might</strong> be used to improve future AI models. That’s where things get tricky.</p><h3>The Not-So-Magical Side of AI Ghibli Images</h3><p>Sure, AI-powered Ghibli images are fun, but here’s what they don’t tell you:</p><p>🔴 <strong>Your Data Might Be Used for AI Training</strong> — Platforms like OpenAI and Meta collect user data to improve their AI models. Your uploaded images and prompts could be analyzed. (<a href="https://help.openai.com/en/articles/7730893-data-controls-faq">Source</a>)</p><p>🔴 <strong>Copyright &amp; Ethical Gray Areas</strong> — Ghibli’s art style is <strong>heavily copyrighted</strong>. While AI tools create “inspired” works, it raises questions about <strong>art theft and originality</strong>. (Source)</p><p>🔴 <strong>Security Risks</strong> — Data breaches happen. AI companies store millions of user-generated images — imagine if those got leaked. (Source)</p><p>🔴 <strong>You Might Lose Rights Over Your Own Images</strong> — Some AI platforms claim rights over the images you upload or generate. Always check the fine print!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_OGyF8gcRcT1s_V__tlqdA.png" /></figure><h3>How to Protect Yourself &amp; Still Enjoy the AI Ghibli Fun</h3><p>Want to create Ghibli-style images without sacrificing your privacy? Here’s how:</p><p>✅ <strong>Use Local AI Models</strong> — Stable Diffusion can run <strong>entirely on your device</strong>, so your images never leave your system.</p><p>✅ <strong>Opt-Out of Ghibli-Style AI Image Generators</strong> — Each platform has different policies, but here’s how to check and opt out:</p><ol><li><strong>OpenAI (DALL·E):</strong> follow these steps to opt out:<br>- Open ChatGPT and go to <em>Settings</em> (bottom left corner).<br>- Click on <em>Data Controls</em>.<br>- Disable the toggle that says <em>Improve the model for everyone</em>.<br>- Your chats and images will no longer be used for AI training.</li><li><strong>Flux AI Studio Ghibli Style</strong>: Visit their website’s privacy policy or support page and look for data collection preferences. Some tools allow you to request <strong>data deletion</strong> via email.</li><li><strong>Fotor &amp; Grok</strong>: These tools might store data for model improvement. Look for account settings or contact customer support to request an opt-out.</li><li><strong>General AI Image Tools</strong>: If a site doesn’t offer a clear opt-out, avoid signing in with personal accounts and use <strong>temporary email addresses</strong>.</li><li><strong>Run AI Locally</strong>: Consider using open-source tools like Stable Diffusion to generate AI images without sending data to external servers.</li></ol><p>✅ <strong>Be Careful Where You Upload</strong> — Avoid sharing sensitive or personal photos on public AI platforms.</p><p>✅ <strong>Check the Terms of Service</strong> — Some sites claim ownership over generated images — don’t get caught off guard.</p><p>✅ <strong>Use a VPN or Temporary Email</strong> — For extra privacy, use a disposable email and VPN when accessing online AI tools.</p><h3>Final Take: Is AI Ghibli Art Worth the Hype?</h3><p>If you love experimenting with AI and don’t mind the risks, go ahead and have fun! Just be aware that <strong>“free AI tools” often come at the cost of your data.</strong></p><p>For the privacy-conscious, <strong>running AI locally</strong> or carefully reading terms before uploading images is the best way to <strong>stay safe</strong> while still enjoying the AI Ghibli trend.</p><p>So, what do you think? Are you in for the AI magic, or does the data trade-off freak you out? 🚀🎨💭</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=164733f80a02" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to start your GenAI career in AWS (Part 3)]]></title>
            <link>https://medium.com/@sharveshpareek/how-to-start-your-genai-career-in-aws-part-3-d06ba2f0d1c4?source=rss-8ace347ba665------2</link>
            <guid isPermaLink="false">https://medium.com/p/d06ba2f0d1c4</guid>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[beginers]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Sharvesh Pareek]]></dc:creator>
            <pubDate>Mon, 24 Feb 2025 12:01:51 GMT</pubDate>
            <atom:updated>2025-02-24T12:01:51.124Z</atom:updated>
            <content:encoded><![CDATA[<p>Welcome to Part 3 of this GenAI series! By now, you’ve gained an understanding of GenAI services on AWS and learned how to invoke and use Large Language Models (LLMs) with Bedrock. In this section, we’ll dive into <strong>Build your first GenAI project in AWS ecosystem</strong>.</p><p>If you haven’t had a chance to check out the earlier parts yet, make sure to visit them for a solid foundation. Here are the links:<br>Part 1 — <a href="https://medium.com/@sharveshpareek/how-to-start-your-genai-career-in-aws-part-1-8551942cfe58">Link </a><br>Part 2 — <a href="https://medium.com/@sharveshpareek/how-to-start-your-genai-career-in-aws-part-2-023d06edcb87">Link</a></p><p>Here is the github link for the code — <a href="https://github.com/SharveshPareek/Medium-article-GenAI-starter">link</a></p><p>Let’s get started and explore how to take your GenAI projects to the next level!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*MnSsFiTES7rVN7v6" /></figure><h3>Problem Statement:</h3><p>We want to build an AI-powered application that generates product descriptions based on product name, category, and features. The app will allow users to input product information, and the system will generate a unique product description using AWS Bedrock’s pre-trained language models. The frontend will be a user-friendly web app built with Streamlit, which can be accessed in a browser.</p><h3>Approach:</h3><p><strong>Backend</strong>:</p><ul><li><strong>AWS Bedrock</strong>: A fully managed service from AWS to build and deploy generative AI applications. We’ll use this to generate text.</li><li><strong>Boto3</strong>: AWS SDK for Python, which will allow us to interact with AWS Bedrock and send requests to generate text.</li></ul><p><strong>Frontend</strong>:</p><ul><li><strong>Streamlit</strong>: A Python framework that makes it easy to create web applications. We’ll use it to create an interface where users can input the product details, and the AI will generate product descriptions.</li></ul><p><strong>Tools used:</strong></p><ul><li><strong>AWS Bedrock</strong> (for text generation)</li><li><strong>Boto3</strong> (to interact with AWS services)</li><li><strong>Streamlit</strong> (for the frontend)</li><li><strong>Python</strong> (for backend)</li></ul><h3>Prerequisites:</h3><ul><li>An AWS account with access to <strong>AWS Bedrock</strong> (make sure you have the right permissions).</li><li>Install the necessary Python packages using requirements.txt file, here is the requirements.txt file</li></ul><pre>boto3==1.24.2<br>streamlit==1.18.1</pre><p><strong>Config File — config.py</strong></p><p>Using config.py comes under best practices as it ensures that your credentials are not in code and also when you have to change or update the certain value you don’t have to go and change it everywhere instead you can just change in config.py and it will get updated in throughout the code.</p><pre># AWS Configurations<br>AWS_REGION = &#39;us-west-2&#39;  # Replace with your AWS region<br>BEDROCK_MODEL_ID = &#39;your-bedrock-model-id&#39;  # Replace with your specific Bedrock model ID<br><br># AWS Boto3 client setup (you can also specify other config parameters if needed)<br>import boto3<br><br>bedrock_client = boto3.client(&#39;bedrock&#39;, region_name=AWS_REGION)</pre><p><strong>Code Implementation</strong></p><ol><li><strong>AWS Setup</strong>: Before running the code, make sure you have AWS credentials set up either through IAM roles or using the AWS CLI</li><li><strong>Backend: Python Code using Boto3</strong>:</li></ol><pre>import streamlit as st<br>from config import bedrock_client, BEDROCK_MODEL_ID<br><br># Function to generate product description using AWS Bedrock<br>def generate_description(product_name, category, features):<br>    # Constructing the input for the Bedrock model<br>    prompt = f&quot;Generate a product description for a {category} named {product_name}. The key features are: {&#39;, &#39;.join(features)}.&quot;<br>    <br>    # Calling the AWS Bedrock endpoint<br>    response = bedrock_client.invoke_model(<br>        ModelId=BEDROCK_MODEL_ID,  # Using model ID from config.py<br>        Body=prompt,<br>        ContentType=&#39;text/plain&#39;<br>    )<br>    <br>    # Extracting the response text<br>    description = response[&#39;Body&#39;].read().decode(&#39;utf-8&#39;)<br>    <br>    return description<br><br># Streamlit UI for user input<br>def app():<br>    # Title and description<br>    st.title(&quot;AI Product Description Generator&quot;)<br>    st.write(&quot;Enter the details of your product and let AWS Bedrock generate a description.&quot;)<br><br>    # User input fields<br>    product_name = st.text_input(&quot;Product Name&quot;)<br>    category = st.text_input(&quot;Category&quot;)<br>    features_input = st.text_area(&quot;Product Features (comma separated)&quot;)<br>    <br>    # Convert features input into a list<br>    features = [feature.strip() for feature in features_input.split(&#39;,&#39;)]<br>    <br>    # Generate description when button is clicked<br>    if st.button(&quot;Generate Description&quot;):<br>        if product_name and category and features:<br>            description = generate_description(product_name, category, features)<br>            st.subheader(&quot;Generated Product Description:&quot;)<br>            st.write(description)<br>        else:<br>            st.warning(&quot;Please provide all the product details.&quot;)<br><br># Run the app<br>if __name__ == &quot;__main__&quot;:<br>    app()</pre><h3>Detailed Explanation:</h3><p><strong>Backend (Python with AWS Bedrock)</strong>:</p><ul><li>We use <strong>Boto3</strong> to call <strong>AWS Bedrock</strong> and send a prompt to generate product descriptions.</li><li>We send the prompt in a simple format that includes the product name, category, and features.</li><li>AWS Bedrock processes the prompt and returns a generated text, which we display in the Streamlit frontend.</li><li>Configuration File (config.py): The AWS region and model ID are now stored in config.py so that you can update them centrally.</li></ul><p><strong>Frontend (Streamlit UI)</strong>:</p><ul><li>The user can enter the product details: product name, category, and features.</li><li>The entered features are processed into a list (split by commas) and sent to the AWS model for text generation.</li><li>When the “Generate Description” button is clicked, it triggers the backend function and displays the generated description.</li></ul><h3>Running the Application:</h3><ol><li>Save the code in a Python file (e.g., app.py).</li><li>To run the app locally, use the following command in your terminal:</li></ol><pre>streamlit run app.py</pre><p>3. After running this command, a local server will start, and you can access the app at http://localhost:8501 in your browser.</p><h3>Example Output:</h3><p>After filling out the product details, the app will generate a product description like this:</p><p><strong>Input</strong>:</p><ul><li>Product Name: “Smartphone”</li><li>Category: “Electronics”</li><li>Features: “5G connectivity, 128GB storage, 6.5-inch display”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/0*Y7Mf2RmbCRiJqnsC" /></figure><p><strong>Output:</strong></p><p>Generated Description might look something like this</p><p><em>“Introducing the new Smartphone, a cutting-edge device in the Electronics category. It boasts 5G connectivity for lightning-fast browsing and downloads, 128GB of storage for all your apps and media, and a stunning 6.5-inch display that brings your content to life. Whether you’re working, gaming, or streaming, this smartphone is designed to keep up with your fast-paced lifestyle.”</em></p><p>Hooray!!</p><p>Congratulations on completing this 3-part series on starting your GenAI career with AWS! 🎉</p><p>We’ve covered the essentials, from exploring AWS GenAI services and invoking LLMs using Bedrock, to building your very first GenAI project in the AWS ecosystem. By now, you should feel confident in your ability to take on GenAI projects and leverage AWS tools to create innovative solutions.</p><p>Remember, the world of GenAI is vast and continuously evolving, so don’t hesitate to keep experimenting and exploring new possibilities. The skills you’ve learned in this series are just the beginning of your journey in the exciting GenAI space.</p><p>Thank you for reading, and best of luck with your GenAI endeavors! If you have any questions or would like to share your experiences, feel free to reach out or leave a comment below. Happy building! 🚀</p><p>In case of any doubts, reach out to me</p><p>Email: sharveshpareek@gmail.com</p><p>Profile Link: <a href="https://medium.com/@sharveshpareek">Sharvesh Pareek</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d06ba2f0d1c4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to start your GenAI career in AWS (Part 2)]]></title>
            <link>https://medium.com/@sharveshpareek/how-to-start-your-genai-career-in-aws-part-2-023d06edcb87?source=rss-8ace347ba665------2</link>
            <guid isPermaLink="false">https://medium.com/p/023d06edcb87</guid>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[beginner]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[genai]]></category>
            <dc:creator><![CDATA[Sharvesh Pareek]]></dc:creator>
            <pubDate>Mon, 24 Feb 2025 12:00:21 GMT</pubDate>
            <atom:updated>2025-02-24T12:00:21.324Z</atom:updated>
            <content:encoded><![CDATA[<p>I hope you are here after seeing the pervious part of this GenAI series, if you please take some time and visit the pervious part which I believe will give you basic understanding for your first GenAI project. Here is the link to pervious part — {LINK}</p><h3><strong>Reference links</strong></h3><p>Here are few links of AWS documentation below for quick reference which might come handy during you learning phase.</p><ul><li><a href="https://docs.aws.amazon.com/bedrock/">Amazon Bedrock Documentation</a></li><li><a href="https://docs.aws.amazon.com/bedrock/latest/userguide/getting-started-api.html">Getting started with the API — Amazon Bedrock</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*CR4UvAwNDeZfQQOr" /></figure><h3><strong>Understanding AWS Bedrock</strong></h3><p>Instead of needing deep expertise in machine learning or dealing with the complexities of training models from scratch, Bedrock allows you to leverage pre-trained “foundation models” (FMs) from top-tier providers like Amazon, Anthropic, and Stability AI. These models are already trained on vast datasets, so you can use them right away for tasks like text generation, image creation, and more. This makes it much easier to build and deploy AI applications without worrying about managing the underlying infrastructure.</p><p>With AWS Bedrock, you can:</p><ul><li><strong>Access powerful AI models</strong>: Choose from a variety of pre-trained models that suit your needs.</li><li><strong>Quickly integrate</strong>: Bedrock connects seamlessly with other AWS services, so you can scale your AI projects with ease.</li><li><strong>Focus on your app</strong>: Instead of getting bogged down with technical details, you can focus on developing your generative AI applications and experimenting with new ideas.</li></ul><h3>Invoking AWS Bedrock</h3><p><strong>Boto3: </strong>It is an AWS SDK for Python, allowing Python developers to easily interact with a wide range of AWS services. Whether you’re managing EC2 instances, working with S3 buckets, or utilizing other AWS services, Boto3 provides an intuitive, Pythonic way to perform these tasks directly from your code.</p><p><strong>Prerequisites for invoking llms</strong></p><ul><li>AWS Account with appropriate permissions</li><li>Permission to access Foundation Model (FMs)</li><li>Boto3 installed</li></ul><p><strong><em>Step 1: </em>Initialize the Boto3 Client</strong></p><p>First, you need to initialize the <strong>Boto3 client</strong> for <strong>AWS Bedrock</strong>. This client will allow you to interact with AWS services directly from your Python code.</p><pre>import boto3<br><br># Initialize the AWS Bedrock client<br>bedrock_client = boto3.client(&#39;bedrock&#39;, region_name=&#39;us-west-2&#39;)  # Use the correct region for your AWS Bedrock service</pre><p><strong><em>Step 2: </em>Define the Function to Invoke the Model</strong></p><p>Next, we create a function called invoke_llm that takes a <strong>prompt</strong> as input (the text you want the model to respond to) and sends this prompt to an LLM in AWS Bedrock.</p><pre>def invoke_llm(prompt):<br>    try:<br>        # Call AWS Bedrock to invoke the LLM<br>        response = bedrock_client.invoke_model(<br>            ModelId=&#39;your-model-id&#39;,  # Replace with your actual model ID from Bedrock<br>            Body={<br>                &#39;input&#39;: prompt  # This is where you pass your prompt (e.g., &quot;Tell me a fun fact about space!&quot;)<br>            },<br>            ContentType=&#39;application/json&#39;,<br>            Accept=&#39;application/json&#39;<br>        )<br>        <br>        # Get the model&#39;s response and return it<br>        generated_text = response[&#39;Body&#39;].read().decode(&#39;utf-8&#39;)<br>        return generated_text<br>    except Exception as e:<br>        print(f&quot;Error invoking LLM: {e}&quot;)<br>        return None</pre><p><strong><em>Step 3: </em>Run the Function</strong></p><p>Now that you have the function ready, you can use it to get a response from the model. Here’s how to do that with an example prompt:</p><pre># Define a prompt (what you want the model to generate)<br>prompt = &quot;Tell me a fun fact about the solar system!&quot;<br><br># Call the function to get a response from the LLM<br>output = invoke_llm(prompt)<br><br># If the model returns a response, print it<br>if output:<br>    print(f&quot;Model Response: {output}&quot;)</pre><p><strong>Output</strong></p><p>This is a sample output here for the above given prompt.</p><pre>Model Response: The largest volcano in the solar system is Olympus Mons on Mars, which is about three times the height of Mount Everest!</pre><h3><strong>Other things to consider</strong></h3><p>There are few other things to consider while you work LLMs like Prompting, Temperature, Guardrails, Top P, Top K and many more. One can learn these in the best way possible only by hand-on experience. For easy understanding these are explained below in detail.</p><p><strong>Prompt Performance Optimization:</strong></p><p>When working with Generative AI models, the input provided to the model (the prompt) plays a critical role in determining the quality and relevance of the generated response. Prompt engineering is the process of designing these inputs in a way that ensures the model’s output is effective, informative, and aligned with the user’s expectations. In addition to the prompt itself, several configuration parameters help control how the model responds to inputs.</p><p>Let’s break down some of the key concepts in prompt engineering that affect how a generative AI model like GPT works:</p><p><strong><em>System Prompt — </em></strong>System prompts are instructions given to the AI model that guide its behavior during the entire interaction. These prompts set the context or role for the model and can greatly influence how the AI behaves throughout the conversation. In essence, system prompting helps the model understand its role or the tone it should maintain, ensuring the output aligns with user expectations.</p><p><strong><em>Temperature— </em></strong>The temperature setting controls the creativity or randomness of the model’s responses. A lower temperature (e.g., 0.2) results in more predictable, focused, and deterministic responses, where the model sticks closely to the input prompt. On the other hand, a higher temperature (e.g., 0.8 or 1.0) introduces more variability and creativity into the response, making it less predictable and more diverse.</p><ul><li><strong>Low temperature (0.2)</strong>: The model’s response will be more focused and likely to give the most probable answer.</li><li><strong>High temperature (0.8–1.0)</strong>: The model can generate more varied responses, introducing new ideas or unexpected turns.</li></ul><p><strong><em>Top P (Nucleus Sampling)- </em></strong>Top P, also known as nucleus sampling, is a parameter used to control the model’s output diversity by considering the cumulative probability of the top probable words. Instead of choosing from the top K most probable words (like in Top K), Top P allows the model to pick words from the smallest possible set of words whose cumulative probability exceeds P. The value of P determines the cutoff point for this cumulative probability, with P typically ranging from 0 to 1.</p><ul><li><strong>If Top P = 0.9 </strong>— The model picks from the smallest set of words whose combined probability is 90%, which often leads to more natural and coherent responses compared to Top K.</li></ul><p><strong><em>Top K- </em></strong>Top K is a parameter that limits the model’s response options to the top K most probable words at each step in the generation process. For instance, Top K = 50: The model will only choose from the top 50 most likely words at each step. The Top K setting can make the model’s responses more controlled, especially when K is small. However, this can also reduce the diversity of the output, as it’s limited to a specific number of choices.</p><ul><li><strong>Low Top K (e.g., 5–10)</strong>: Results in more predictable, less varied output.</li><li><strong>High Top K (e.g., 100)</strong>: Increases variability, as the model can consider more possible next words.</li></ul><p><strong><em>Response Length-</em></strong> Response length refers to the maximum number of tokens (words or characters) the model can generate in response to a prompt. Tokens are the smallest units that the model processes, and one token can represent a word, part of a word, or even punctuation. The response length parameter helps control how much text the model should generate.</p><p>For example:</p><ul><li><strong>Short response length</strong>: Useful for concise answers, summaries, or fact-based questions.</li><li><strong>Long response length</strong>: Suitable for tasks that require detailed explanations, stories, or comprehensive solutions.</li></ul><p><strong><em>Stop Sequence-</em></strong> A stop sequence is a specific pattern or token that, when encountered in the model’s generated text, will cause the model to stop producing further text. This is useful for controlling the output by marking the end of a response, especially in scenarios where you want to avoid overly long or irrelevant content.</p><p>For example:</p><ul><li>If you’re generating a conversation, you can set a stop sequence like &quot;\n&quot; to stop after each sentence.</li><li>If you’re generating a multi-step process, you can use a stop sequence to end the response at a certain point, ensuring the AI doesn’t go on too long.</li></ul><h3>What’s next?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/0*01B82nYVQa7stIj2" /></figure><p>That wraps up Part 2 of this GenAI series! By now, you should have a solid understanding of how to invoke and use Large Language Models (LLMs) with AWS Bedrock. This knowledge is a crucial step in building robust GenAI solutions.</p><p>In the next part, we’ll take things a step further and show you how to build your very first GenAI project in the AWS ecosystem, bringing everything you’ve learned together.</p><p>If you haven’t read Part 1 yet, I recommend checking it out for a comprehensive understanding of the foundational services on AWS. You can find it here: <a href="https://medium.com/@sharveshpareek/how-to-start-your-genai-career-in-aws-part-1-8551942cfe58">Link</a>.</p><p>Thank you for following along, and I look forward to diving deeper with you in the next part!”</p><p>In case of any doubts, reach out to me</p><p>Email: sharveshpareek@gmail.com</p><p>Profile Link: <a href="https://medium.com/@sharveshpareek">Sharvesh Pareek</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=023d06edcb87" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to start your GenAI career in AWS (Part 1)]]></title>
            <link>https://medium.com/@sharveshpareek/how-to-start-your-genai-career-in-aws-part-1-8551942cfe58?source=rss-8ace347ba665------2</link>
            <guid isPermaLink="false">https://medium.com/p/8551942cfe58</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[bedrock]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[beginner]]></category>
            <dc:creator><![CDATA[Sharvesh Pareek]]></dc:creator>
            <pubDate>Mon, 24 Feb 2025 11:56:14 GMT</pubDate>
            <atom:updated>2025-02-24T11:56:14.149Z</atom:updated>
            <content:encoded><![CDATA[<p>In this fast-moving world everyone is keen on using GenAI in their day-to-day tasks, but majority of the people don’t understand how GenAI works. For all the young developers out there, who are searching get started with GenAI, here is the one stop solution. The idea behind writing this article is to help the young minds and guide them in right direction early in their career where they can learn and shine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*9dw_30UgioLqvVno" /></figure><h3>Why this topic?</h3><p>When I first started exploring GenAI, I encountered challenges in finding reliable resources and clear guidance. As a result, I made several rookie mistakes that could have been easily avoided with a clearer understanding of the appropriate AWS services and proper direction.</p><blockquote><strong>“We are drowning in information but starved for knowledge.”</strong></blockquote><blockquote>-John Naisbitt</blockquote><h3><strong>Prerequisites</strong></h3><p>This article is crafted for someone who has basic idea about</p><ol><li>What is GenAI?</li><li>What is Prompting?</li><li>What is AWS?</li><li>What is input/output tokens, LLMs? and so on</li></ol><p>Since these are very basic, I would want you guys to research on your own, since that will be very interesting, and it will help get an in-depth grasp of these concepts. Before we get into the actual content let me give you a quick tour about how the article is planned out, so it sets a context for you guys. I am planning to split the article to three different parts, each progressively more complex than the last. With all that said let get into the actual content.</p><ul><li>Part 1: Basics of GenAI related services on AWS</li><li>Part 2: How to invoke/use LLMs using bedrock</li><li>Part 3: Build your first GenAI project in AWS ecosystem</li></ul><h3><strong><em>Basics of GenAI related services on AWS</em></strong></h3><p>There are few tools that you need know as those tools will act as foundation to your GenAI project. I’ll walk you through the key AWS services you need to get started with Generative AI, breaking them down in a way that’s easy to understand, even if you’re just starting your AI journey.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VVGFNZTn--DStecT" /><figcaption>Photo by <a href="https://unsplash.com/@lucabravo?utm_source=medium&amp;utm_medium=referral">Luca Bravo</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3><strong>1. Amazon SageMaker:</strong></h3><p>If you’ve worked with machine learning (ML) before, you know that model building, training, and deployment can be time-consuming. Amazon SageMaker is the all-in-one solution for streamlining this process. Whether you’re building a text generation model or an image generation system, SageMaker has you covered. You’ll appreciate that SageMaker provides pre-built algorithms and frameworks like TensorFlow, PyTorch, and MXNet. These are essential for building custom Generative AI models like GANs (Generative Adversarial Networks) or text generation models similar to GPT.</p><p><strong>Key Features</strong>:</p><ul><li>Managed infrastructure to <strong>train and deploy models</strong> at scale.</li><li><strong>Automatic hyperparameter tuning</strong> to optimize your model’s performance.</li><li><strong>Pre-built algorithms</strong> for deep learning tasks, saving you time.</li></ul><h3>2. Amazon SageMaker Studio:</h3><p>As someone who spends a lot of time analyzing data and building models, you’ll find Amazon SageMaker Studio to be an invaluable tool. Think of it as an IDE (Integrated Development Environment) specifically for machine learning. SageMaker Studio combines the best of Jupyter Notebooks with a set of advanced tools that help you track experiments, visualize data, and monitor models. It allows you to seamlessly build, train, and deploy Generative AI models, whether you’re working with text, images, or other types of data.</p><p><strong>Key Features</strong>:</p><ul><li>Unified interface for <strong>code writing, training, and debugging</strong>.</li><li><strong>Real-time model monitoring</strong> for easier experimentation.</li><li>Built-in integration with SageMaker to <strong>deploy models directly</strong>.</li></ul><h3>3. AWS Bedrock: Simplifying AI Model Integration</h3><p>AWS Bedrock is a relatively new service that makes it easier to work with foundation models (FMs) from Amazon and third-party providers like Anthropic or Stability AI. This service lets you quickly build and scale Generative AI applications by accessing pre-trained models without the hassle of managing the underlying infrastructure. For a data analyst, Bedrock simplifies the process of integrating powerful models into your applications. Whether you’re building large language models (LLMs) for text generation or image generation models, Bedrock provides the flexibility you need to innovate quickly.</p><p><strong>Key Features</strong>:</p><ul><li><strong>Access to multiple top-tier AI models</strong>.</li><li>Easy integration with AWS’s powerful infrastructure for scaling.</li><li>Minimal machine learning expertise required to get started.</li></ul><h3>4. Amazon Polly: Text-to-Speech for Natural Conversations</h3><p>Text-to-Speech (TTS) is an essential feature in many Generative AI applications, particularly for chatbots or virtual assistants. Amazon Polly converts text into lifelike speech, making it ideal for AI systems that need to interact vocally with users. Polly supports a range of voices in multiple languages, which means you can easily integrate AI-powered conversations into your GenAI applications. Whether it’s generating voiceovers for automated content or enabling real-time speech synthesis in your chatbot, Polly is a powerful tool in your GenAI toolkit.</p><p><strong>Key Features</strong>:</p><ul><li>High-quality, <strong>natural-sounding voices</strong> in several languages.</li><li>Ability to <strong>adjust speech rate, tone, and pitch</strong> for realistic speech synthesis.</li><li>Can be used in <strong>real-time</strong> to scale voice-based applications.</li></ul><h3>5. Amazon Rekognition: Dive Into Image Generation</h3><p>Amazon Rekognition is a deep learning-powered service that can analyze images and videos, identifying objects, faces, scenes, and activities. This is particularly useful for Generative AI tasks like image manipulation or generating new images based on certain inputs. As a data analyst, you’ll appreciate the object detection and facial recognition capabilities, which can be applied in applications like face-swapping or style transfer — both key tasks in the field of generative art and media creation.</p><p><strong>Key Features</strong>:</p><ul><li><strong>Image and video analysis</strong> for object, facial, and text recognition.</li><li>Powerful <strong>content moderation</strong> tools to automatically detect inappropriate content.</li><li><strong>Face analysis</strong> for detailed image generation tasks</li></ul><h3>6. AWS Lambda: Scale AI Workloads Without Managing Servers</h3><p>When it comes to scaling your generative AI models, AWS Lambda is a game-changer. Lambda lets you run serverless functions in response to events, which means you can trigger your GenAI models without worrying about provisioning or managing infrastructure. This is especially useful for applications where you need to process real-time data or generate content on demand. Whether you’re generating text, creating images, or executing other GenAI tasks, Lambda scales effortlessly based on usage.</p><p><strong>Key Features</strong>:</p><ul><li><strong>Scalable execution</strong> without the need for server management.</li><li><strong>Event-driven architecture</strong> for real-time content generation.</li></ul><h3>7. Amazon Transcribe: Voice to Text for GenAI</h3><p>Amazon Transcribe is a service that converts speech into text, making it essential for creating voice-enabled AI systems. For GenAI applications like voice-driven content generation or speech recognition systems, this tool is a must-have. With real-time transcription and support for multiple languages, Transcribe is useful in creating voice assistants or applications where voice input needs to be converted into text for further processing.</p><p><strong>Key Features</strong>:</p><ul><li><strong>Real-time transcription</strong> to convert spoken words into text.</li><li>Supports <strong>multiple languages</strong> and identifies different <strong>speakers</strong>.</li><li>Customizable <strong>vocabulary</strong> for specialized domains (e.g., medical terms).</li></ul><h3>8. Amazon Translate: Break Language Barriers</h3><p>When working with Generative AI applications that need to interact with a global audience, Amazon Translate can be a game-changer. Translate uses neural machine translation to convert text between different languages, which is essential for multilingual chatbots, content generation, and cross-language interactions. As a data analyst, you’ll appreciate the ease with which you can integrate real-time translation into your GenAI workflows, allowing you to reach audiences across the globe.</p><p><strong>Key Features</strong>:</p><ul><li><strong>Real-time translation</strong> between multiple languages.</li><li>Custom models to <strong>translate domain-specific terminology</strong>.</li><li><strong>Document translation</strong> capabilities for large-scale content generation.</li></ul><h3>9. AWS Deep Learning AMIs: Preconfigured Environments for AI Models</h3><p>If you’re familiar with deep learning frameworks, you know how much time it can take to configure environments for training models. AWS Deep Learning AMIs come pre-configured with all the necessary frameworks, including TensorFlow, PyTorch, and MXNet. For building GenAI models, these AMIs allow you to quickly get started without worrying about the technical setup. Whether you’re training GANs for image generation or fine-tuning large language models, Deep Learning AMIs provide an optimized environment for all your needs.</p><p><strong>Key Features</strong>:</p><ul><li><strong>Pre-installed libraries</strong> for deep learning frameworks.</li><li>Fully customizable to suit your specific <strong>hardware requirements</strong>.</li><li>Can be used in conjunction with <strong>EC2 instances</strong> for scalable training.</li></ul><h3>10. Amazon Comprehend: Understanding and Generating Text</h3><p>For applications that require understanding text, Amazon Comprehend is a must. It uses natural language processing (NLP) to analyze text for insights like sentiment, entities, and relationships. This is crucial for Generative AI applications that need to analyze input data (like text or documents) before generating content. Whether you’re building a content summarization tool or a text-generation model, Comprehend helps you extract useful information from raw text.</p><p><strong>Key Features</strong>:</p><ul><li><strong>Entity recognition</strong>, <strong>sentiment analysis</strong>, and <strong>language detection</strong>.</li><li><strong>Custom text classification models</strong> for domain-specific NLP tasks.</li><li><strong>Topic modeling</strong> to help understand underlying patterns in large datasets.</li></ul><h3><strong>What’s next?</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/0*01B82nYVQa7stIj2" /></figure><p>I hope you had a wonderful experience reading this part 1 of 3-part series. Moving on to next part we will look into <strong>How to call the LLMs?</strong>, <strong>How to configure your LLMs?</strong>, <strong>What all parameters can be used to play around your LLM?</strong> and <strong>What are the limitation of these LLMs?</strong></p><p>Found this interesting? Want to dive deeper into GenAI? Head over to my page for the other two parts. Until then, keep learning and stay inspired!</p><p><strong><em>See you there!</em></strong></p><p>In case of any doubts, reach out to me</p><p>Email: sharveshpareek@gmail.com</p><p>Profile Link: <a href="https://medium.com/@sharveshpareek">Sharvesh Pareek</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8551942cfe58" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>