Tag: 100daysofai

  • #68 Why the new AI button on your keyboard is inevitable? (Above Average Newsletter)

    This episode is the audio version of Nataraj’s newsletter Above Average.

    Welcome to 49th edition of the Above Average Newsletter. Your bi-weekly source of Above Average takes on the business of big technology written by Nataraj.

    1. Why the new AI Button on Your Keyboard is inevitable?

    Microsoft is adding a new AI button to your PC keyboard. This is the first time Microsoft changed the PC keyboard in last 30 years. If you are a regular user of ChatGPT or its competitors you will notice your own behavior, that you use it repeatedly and it might get lost in the 10s of chrome tabs you have opened.

    You also realize that its a constant companion on your daily work. Microsoft already realized this and jumped head on into creating Copilots for all its products.

    The next step in this strategy is to have a dedicated button that will launch bing copilot which uses gpt-4 and is currently free.

    The move highlights couple of things:

    Copilots are going to an enduring form factor

    We will use copilots so often that it requires its own button

    Its a great use of Microsoft’s distribution power to create a new user behavior

    If this new behavior works its acts as counter to Google search. Your first step for any answer would be to tap that button and start asking the question. A better interface potentially to transition from a search dominant world to answer dominant world.

    2. Who is the biggest AI VC in town?

    As some one who closely works with a venture fund and interacted with lots of investors and invested in 20+ startups its important to note that the unseriousness of ZIRP era was prevalent in VC industry as much as it was in any other industry.

    This meant higher valuations that defy the gravity of the business became common. Chasing each others and asking the question “who else is investing” became the most important criteria. Deals closed faster than ever. Crypto as a sector suck more oxygen in the room that it should. Mostly because too much capital was chasing too few deals and in the process new & some old investors lost track of what is important. Its important for a VC to invest in important things in tech.

    Now with AI era on us, the biggest investors in AI are not the VC firms but its the fearsome foursome – Microsoft, Google, Amazon & Nvidia.

    The amount of investment commitments from these 4 companies has already exceeded $20B with a conservative estimate.

    Big tech companies never really invested in crypto like they are investing in AI.

    So what’s the take away here – if you think AI hype cycle is similar to crypto hype cycle, you are wrong. AI is an enduring cycle worthy of hype, unlike crypto which was propped up by VCs with out enough depth.

    3. My Experiments with AI:

    One of the reason this newsletter is less frequent than usual (from now on it will be twice a month) is because I am working on writing more on AI as part of a series I am calling 100 days of AI. If you are interested in gen AI experiments, ideas & trends follow along here. Here are some posts I have written about AI.

    – Design Thinking using Semantic Kernel – Get Insights from YouTube Podcast Video using Open AI’s GPT 4 – Build Your Own Chat with Data App

    Till next time, stay above average.
    Nataraj

    Send in a voice message: https://podcasters.spotify.com/pod/show/startupproject/message
    https://podcasters.spotify.com/pod/show/startupproject/episodes/68-Why-the-new-AI-button-on-your-keyboard-is-inevitable–Above-Average-Newsletter-e2f9nl1

  • Rapid Prototyping for AI: How to Demo and Validate Early

    Rapid Prototyping for AI: How to Demo and Validate Early

    One of the most powerful aspects of working in AI today is the ability to go from idea to prototype in hours—not weeks. But ideas and prototypes don’t gain traction in isolation. They need to be tested, shared, and improved based on real feedback. If you’ve been following the 100 Days of AI series, you’ll notice a recurring theme: most posts include a hands-on experiment or a simple proof-of-concept demo. These experiments help validate what’s technically possible. But the natural next step is this: how do you turn these into demos you can share, without spinning up a full product stack?

    In this post, we’ll walk through how to wrap a simple AI experiment into a shareable demo using Gradio, a Python library that takes care of the UI layer so you can focus on what matters—your model.

    Why You Need Fast Demos

    Imagine you’ve built an AI app that takes in long-form text and returns a summary. You want to test it with real users, get feedback, and iterate. Traditionally, this would require:

    • Coding a user interface from scratch
    • Choosing and integrating a web stack (frontend, backend, hosting)
    • Managing deployment and scalability

    Even with starter templates and no-code tools, it’s overkill for early testing. This is where Gradio comes in. It lets you generate a web-based interface around your AI logic with just a few lines of code—no frontend knowledge needed.

    What is Gradio?

    Gradio is a Python library that allows you to build and share demos of machine learning models via simple web interfaces. It abstracts away the complexity of web development so that AI developers can focus on model behavior rather than frontend mechanics.

    You can define input/output components, wire them up to your model logic, and launch a demo—all in a single script. Best of all, Gradio provides a public shareable URL so others can try your app without any setup.

    Let’s walk through an example. We’ll build a demo that takes long-form text as input and returns a summary using Hugging Face’s distilbart-cnn-12-6 summarization model.

    Step 1: Setup

    Along with Gradio, we will use hugging face app so to follow along make sure you keep your hugging face api key handy. To get started lets load up the API key from .env file and add required python modules.

    import os
    import io
    from IPython.display import Image, display, HTML
    #from PIL import Image
    import base64 
    import openai
    
    env_path = '../.env'
    from dotenv import load_dotenv, find_dotenv
    _ = load_dotenv(find_dotenv(env_path)) # read local .env file
    
    hf_api_key = os.environ['HF_API_KEY']

    Step 2: Define Summarization Function

    The core logic of what we want to achieve is to send a long text to a model and get a summary of the text. We will define a function that takes in the long text as an input and calls a model on hugging face called distilbart. Here is the function to do this.

    def get_completion(inputs, parameters=None, ENDPOINT_URL=os.environ['HF_API_SUMMARY_BASE']): 
        headers = {
          "Authorization": f"Bearer {hf_api_key}",
          "Content-Type": "application/json"
        }
        data = { "inputs": inputs }
        if parameters is not None:
            data.update({"parameters": parameters})
        response = requests.request("POST",
                                    ENDPOINT_URL, headers=headers,
                                    data=json.dumps(data)
                                   )
        return json.loads(response.content.decode("utf-8"))

    Step 3: Use Gradio to Demo Summarization App

    The main way to interact with Gradio is through interface function. We need to pass a function and its corresponding inputs and outputs. Note that we defined a new function called summarize for this purpose. This function takes an input, which will be the long text which is to be summarized and the function will call the get_completion function from step 2 to get the summary of the input text and return that as the output. In the final line we are asking gradio to launch the demo of this app. By providing share=True we are telling gradio to create a public link that can be shared to others and also giving the server_port on which the local webhost should run on. In the below code we also customize the title, description and labels of input and output fields which you will notice in the out put.

    import gradio as gr
    def summarize(input):
        output = get_completion(input)
        return output[0]['summary_text']
        
    gr.close_all()
    demo = gr.Interface(fn=summarize, 
                        inputs=[gr.Textbox(label="Text to summarize", lines=6)],
                        outputs=[gr.Textbox(label="Result", lines=3)],
                        title="Text summarization with distilbart-cnn",
                        description="Summarize any text using the `shleifer/distilbart-cnn-12-6` model under the hood!"
                       )
    demo.launch(share=True, server_port=int(os.environ['PORT1']))

    Once you run this, here is what the output now looks like in your browser at http://127.0.0.1:<your port number>.

    It is that easy to demo a project with Gradio. The beauty here is you as a developer didn’t have to come up with UI stack and go through with the complexity of learning that stack and taking it to production. Gradio does it for you.

    Gradio offers different input and output types using which you can create more complex and interesting demos that can be easily shared. We will explore more demos with Gradio and other tools in the coming posts.

    Why This Matters

    With Gradio, you sidestep the need to build and deploy a full web application just to test an idea. That lowers the barrier to iteration, lets you test with real users faster, and keeps your focus on the model’s behavior—not the deployment mechanics.

    Gradio supports a variety of input and output components (e.g., images, sliders, dropdowns) that allow you to prototype more sophisticated use cases. This makes it a powerful tool not just for personal experimentation but also for team demos, stakeholder reviews, and user testing.


    Nataraj is a Senior Product Manager at Microsoft Azure and the Author at Startup Project, featuring insights about building the next generation of enterprise technology products & businesses.


    Listen to the latest insights from leaders building the next generation products on Spotify, Apple, Substack and YouTube.

  • 100 Days of AI Day 10: How to use AI to do Design thinking using GPT4 & Semantic Kernel

    100 Days of AI Day 10: How to use AI to do Design thinking using GPT4 & Semantic Kernel

    About 100 Days of AI:

    I am Nataraj, I decided to spend 100 days in starting Jan 1st 2024 to learn about AI. With 100 days of AI is my goal to learn more about AI specifically LLMs and share ideas, experiments, opinions, trends & learnings through my blog posts. You can follow along the journey here.

    In this post we will look at how to use AI to do design thinking for a given business problem. For the sake of this example we define design thinking as a series of steps show below. You can also extend this idea to add more steps and write logic for them.

    Design Thinking

    To set context, lets take an example of a Coffee Shop which has received some customer feedback recently and use it to apply AI design thinking and come up with ways to improve the business.

    We will use Open AI’s gpt-4 model and use Microsoft’s Semantic Kernel to do design thinking. Along the way we will also explore how we can use the concept of Plugins in the Kernel which makes it easy to reuse Semantic Functions.

    So let’s get into it.

    Step 1 – Setup the Kernel:

    The first step is to load the secret key of Open AI from local .env file, and then create new Kernel instance. Then add OpenAIChatCompletion service to the Kernel.

    Setup Semantic Kernel

    Step 2 – Add the use feedback & SWOT analysis of the Coffee Shop business:

    # SWOT questions
    strength_questions = ["What unique recipes or ingredients does the coffee shop use?","What are the skills and experience of the staff?","Does the coffee shop have a strong reputation in the local area?","Are there any unique features of the shop or its location that attract customers?", "Does the coffee shop have a strong reputation in the local area?", "Are there any unique features of the shop or its location that attract customers?"]
    weakness_questions = ["What are the operational challenges of the coffee shop? (e.g., slow service, high staff turnover, not having wifi)","Are there financial constraints that limit growth or improvements?","Are there any gaps in the product offering?","Are there customer complaints or negative reviews that need to be addressed?"]
    opportunities_questions = ["Is there potential for new products or services (e.g., delivery, food along with coffee)?","Are there under-served customer segments or market areas?","Can new technologies or systems enhance the business operations?","Are there partnerships or local events that can be leveraged for marketing?"]
    threats_questions = ["Who are the major competitors and what are they offering?","Are there potential negative impacts due to changes in the local area (e.g., construction, closure of nearby businesses)?","Are there economic or industry trends that could impact the business negatively (e.g., increased ingredient costs)?","Is there any risk due to changes in regulations or legislation (e.g., health and safety, employment)?"]
    
    # SWOT answers
    strengths = [ "Unique coffee recipe that wins top awards","Owner trained in Sicily","Strong local reputation","Prime location on university campus" ]
    weaknesses = [ "High staff turnover","Floods in the area damaged the seating areas that are in need of repair","Absence of popular mocha latte from menu","Negative reviews from younger demographic for lack of hip ingredients" ]
    opportunities = [ "Untapped work from anywhere potential as they dont have wifi","Growing local tech startup community","Unexplored online presence and order capabilities","Upcoming annual food fair" ]
    threats = [ "Competition from big coffee chains nearby","There's nearby street construction that will impact foot traffic","Rising cost of coffee beans will increase the cost of coffee","No immediate local regulatory changes but it's election season" ]
    
    # Customer comments some positive some negative
    customer_comments = """
    Customer 1: The seats look really raggedy.
    Customer 2: The americano is the best on this earth.
    Customer 3: I've noticed that there's a new server every time I visit, and they're clueless.
    Customer 4: Why aren't there any snacks?
    Customer 5: I love the coffe blend they use and can't get it anywhere else.
    Customer 6: The dark roast they have is exceptional.
    Customer 7: why is there no wifi?
    Customer 8: Why is the regular coffee so expensive?
    Customer 9: There's no way to do online ordering.
    Customer 10: Why is the seating so uncomfortable and dirty?
    """

    Step 3 – Creating Plugins for Design Thinking:

    What is a Plugin? Semantic Kernel has this feature called Plugins where you can define Semantic Functions their inputs and can re-use them repeatedly. A plug in is made up of two files a .json (contains config info for LLM & input params) & .txt (contains a custom prompt). For design thinking use case we are going to create 4 plugins. You can find the code for all 4 plugins here.

    • Empathize: Takes customer feedback and isolates sentiment and gives a concise summary for each sentiment expressed by the customer.
    • Define: Takes output from empathize step, categorizes the analysis in a markdown table. Defines the problems & its possible source.
    • Ideate: Takes the output from the above step and generates ideas in the form of a markdown table with two columns called Low hanging fruit & Higher-hanging fruit.
    Result from Ideate Plugin
    • PrototypeWithPaper: This plugin takes in the ideas generated in previous step and gives a low-resolution prototype, so the solution can be tested.

    Step 4 – Bring it all together:

    Note that in the previous steps even though I have given the code for four plugins, explained what they do in the context of Design Thinking. I have also displayed the output they will generate. But we have not actually called those plugins from our code. Lets do that now as shown below.

    ## access design thiking plugin
    pluginsDirectory = "./plugins-sk"
    pluginDT = kernel.import_semantic_skill_from_directory(pluginsDirectory, "DesignThinking");
    async def run_designthinking_async():
        my_result = await kernel.run_async(pluginDT["Empathize"], pluginDT["Define"], pluginDT["Ideate"], pluginDT["PrototypeWithPaper"], input_str=customer_comments)
        display(my_result)
    
    asyncio.run(run_designthinking_async())
    

    You have already seen the output that all the 4 steps generate in the previous step. Note how simple Kernel makes calling one plug in after the other all in a single call.

    To conclude, here is what we did. We wrote custom prompts and made them plugins and put them in a folder called plugins-sk. And then used Kernel to call them using the SWOT analysis & Customer feedback for the Coffee Shop. Now by changing the SWOT analysis and taking a customer feedback for a different business problem you can do design thinking and come up with an MVP solution to fix your problem.

    Even though at the core of it its 4 custom prompts, this method highlights how Kernel makes developing complex goals with AI easy & manageable with plugins.

    That’s it for Day 10 of 100 Days of AI.

    I write a newsletter called Above Average where I talk about the second order insights behind everything that is happening in big tech. If you are in tech and don’t want to be average, subscribe to it.

    Follow me on TwitterLinkedIn for latest updates on 100 days of AI. If you are in tech you might be interested in joining my community of tech professionals here.

  • 100 Days of AI Day 9: How to create SWOT analysis for your business idea using AI?

    100 Days of AI Day 9: How to create SWOT analysis for your business idea using AI?

    About 100 Days of AI:

    I am Nataraj, I decided to spend 100 days in starting Jan 1st 2024 to learn about AI. With 100 days of AI is my goal to learn more about AI specifically LLMs and share ideas, experiments, opinions, trends & learnings through my blog posts. You can follow along the journey here.

    In this post we will look at how to create a swot analysis for any business. If you are not familiar with SWOT analysis here is a quick intro.

    Introduction to SWOT:

    SWOT stands for Strengths, Weaknesses, Opportunities & Threats. Its a simple way of evaluating any business and get ideas about how to improve it. Once you have done a SWOT analysis of a business, you can choose to compound on the strengths and create more differentiation from your competitor. You can find the weaknesses and create an action plan to fix them. You can find new areas to expand into using the opportunities as a starting point. It is essentially one of the many mental models used by business owners.

    Here is an example of SWOT analysis for a pizza business.

    StrengthsWeaknesses
    Unique garlic pizza recipe that wins top awardsHigh staff turnover
    Owner trained in Sicily at some of the best pizzeriasFloods in the area damaged the seating areas that are in need of repair
    Strong local reputationAbsence of popular calzones from menu
    Prime location on university campusNegative reviews from younger demographic for lack of hip ingredients
    OpportunitiesThreats
    Untapped catering potentialRising competition from cheaper pizza businesses nearby
    Growing local tech startup communityThere’s nearby street construction that will impact foot traffic
    Unexplored online presence and order capabilitiesRising cost of cheese
    Upcoming annual food fairNo immediate local regulatory changes but it’s election season

    How to Generate a SWOT?

    To generate above SWOT, we are essentially answering questions in the following template.

    1. Strengths
      • What unique recipes or ingredients does the pizza shop use?
      • What are the skills and experience of the staff?
      • Does the pizza shop have a strong reputation in the local area?
      • Are there any unique features of the shop or its location that attract customers?
    2. Weaknesses
      • What are the operational challenges of the pizza shop? (e.g., slow service, high staff turnover)
      • Are there financial constraints that limit growth or improvements?
      • Are there any gaps in the product offering?
      • Are there customer complaints or negative reviews that need to be addressed?
    3. Opportunities
      • Is there potential for new products or services (e.g., catering, delivery)?
      • Are there under-served customer segments or market areas?
      • Can new technologies or systems enhance the business operations?
      • Are there partnerships or local events that can be leveraged for marketing?
    4. Threats
      • Who are the major competitors and what are they offering?
      • Are there potential negative impacts due to changes in the local area (e.g., construction, closure of nearby businesses)?
      • Are there economic or industry trends that could impact the business negatively (e.g., increased ingredient costs)?
      • Is there any risk due to changes in regulations or legislation (e.g., health and safety, employment)?”””

    Our goal is to use Open AI & Semantic Kernel and be able to generate SWOT analysis for any given business. Why use Semantic Kernel? Part of the goal of this post is also to explore more functionality of Semantic Kernel. We could also achieve the same end goal using Langchain. If you like Langchain over Semantic Kernel feel free to use that.

    Step 1 – Initialize Semantic Kernel With Open AI Chat Completion:

    For this step you will need Open AI secret key. Note that Semantic Kernel can work with other LLMs and their corresponding chat completion APIs. See the documentation to find out what they support.

    Get ready Semantic Kernel

    Step 2 – Create a Semantic Function that does SWOT analysis

    Semantic functions are a way to leverage custom prompts in the Kernel world. More about it here. We will create a semantic function that takes a custom prompt for SWOT analysis of a Pizza business, give an instruction in the prompt to convert the analysis to the a given domain that is given as an input to the prompt. Here’s how it looks.

    Semantic Function for SWOT Analysis

    Step 3 – Call the Semantic Function to Generate a SWOT analysis:

    To call the semantic function that is registered with the Kernel, we need to create a context and pass it. The context also includes the new domain we want the SWOT analysis to be applied to, in this case I am using Newsletter. Since every one is starting a newsletter lets try to get a SWOT analysis template for starting a newsletter. Here’s the code for step 3.

    Calling the semantic function

    Here’s the out put:

    Output

    Not bad, the out put generated gives a great SWOT template for whether or not you should start a newsletter.

    You can expand this experiment further and generate a 2*2 matrix like the pizza example I shared above as well.

    AI PRODUCT IDEA ALERT: A website where user can enter their idea and get an output for all the business mental models that exist including SWOT.

    That’s it for Day 9 of 100 Days of AI.

    I write a newsletter called Above Average where I talk about the second order insights behind everything that is happening in big tech. If you are in tech and don’t want to be average, subscribe to it.

    Follow me on TwitterLinkedIn for latest updates on 100 days of AI. If you are in tech you might be interested in joining my community of tech professionals here.

  • Day 8: How to Build on Gpt-4 Using MSFT’s Semantic Kernel

    Day 8: How to Build on Gpt-4 Using MSFT’s Semantic Kernel

    About 100 Days of AI:

    AI, with the rise of chat-GPT, captured attention of everyone. Unlike other tech bubbles, AI wave will be enduring. Whether you’re a developer, product manager, marketer, or in any knowledge role, investing time in learning AI will be worth your time for your career. 100 days of AI is my goal to learn more about AI specifically LLMs and share ideas, experiments, opinions, trends & learnings through my blog posts. You can follow along the journey here.

    Introduction to Semantic Kernel:

    Semantic Kernel is an open source SDK from Microsoft that helps developers create AI applications including chatbots, RAGs, Copilots & agents. It is similar to what langchain does. We can probably call it as Microsoft’s answer to langchain.

    It is designed to make existing software extensible and easy to expose to AI features. It is also designed anticipating that applications would like to update their AI models to the latest and greatest versions over time.

    Semantic Kernel

    Although the space is evolving very rapidly here are some definitions to keep in mind as we explore Semantic Kernel.

    • Chat Bot: Simple chat with the user.
    • RAGs: Simple chat bot but grounded in real time & private data.
    • Copilots: Meant to be assisting us side-by-side to accomplish tasks by recommending & suggesting.
    • Agents: Respond to stimuli with limited human intervention. Agents executes tasks like sending emails, booking tickets on behalf of the user.

    How Does Semantic Kernel Work?

    To explain how Semantic Kernel works, lets take an example of taking a piece of text and converting it into 140 character tweet. But we will do this using Semantic Kernel. We have done a similar summarization in previous posts here.

    I will be using the python library of the Semantic Kernel, but since Semantic Kernal is created by Microsoft you can also do this in C# as well. Check public documentation from Microsoft on how to do this.

    Step 1: Initiate Semantic Kernel

    Below we are initiating the semantic kernel and setting up its text completion service by telling it to use OpenAI’s gpt-4 model as the LLM to use for text completion.

    import semantic_kernel as sk
    from semantic_kernel.connectors.ai.open_ai import AzureChatCompletion, OpenAIChatCompletion
    import os
    from IPython.display import display, Markdown
    import asyncio
    
    from dotenv import load_dotenv, find_dotenv
    _ = load_dotenv(find_dotenv()) # read local .env file
    api_key = os.environ['OPENAI_API_KEY']
    
    kernel = sk.Kernel()
    kernel.add_text_completion_service("openai", OpenAIChatCompletion("gpt-4",api_key))
    print("Kernel Initiated")

    Step 2: Understanding a Semantic Function:

    In the Semantic Kernel world, we have a concept of Semantic function which is different from a native function. A native function is the regular functions that we write in any programming language. Semantic functions are encapsulations of repeatable LLM Prompts that can be orchestrated by the Kernel. You will get a better idea of what semantic function is in the next step where we will write one.

    Native & Semantic Functions

    Step 3: Create a Semantic Function

    Here we create a prompt sk_prompt that summarizes the connect in less than 140 characters (that’s our goal with this exercise). We then pass the prompt as an input to create a semantic function with the kernel and store which gives us in return the object summary_function which represents the semantic function we created and that can be repeatedly accessed via the kernel. Note that when we created a semantic function we are using a customer prompt and also giving LLM config information like max_tokens, temperature etc., Now go back to the previous image of native vs semantic functions and it will make more sense.

    sk_prompt = """
    {{$input}}
    
    Summarize the content above in less than 140 characters.
    """
    summary_function = kernel.create_semantic_function(prompt_template = sk_prompt,
                                                        description="Summarizes the input to length of an old tweet.",
                                                        max_tokens=200,
                                                        temperature=0.1,
                                                        top_p=0.5)       
    print("A semantic function for summarization has been registered.")

    Step 4: Using the Semantic Function to Summarize text into a tweet of 140 characters.

    Now we create the text that we want to summarize using the variable sk_input and call the sematic function via kernal and then display the result.

    sk_input = """
    Let me illustrate an example. Many weekends, I drive a few minutes from my house to a local pizza store to buy 
    a slice of Hawaiian pizza from the gentleman that owns this pizza store. And his pizza is great, but he always 
    has a lot of cold pizzas sitting around, and every weekend some different flavor of pizza is out of stock. 
    But when I watch him operate his store, I get excited, because by selling pizza, he is generating data. 
    And this is data that he can take advantage of if he had access to AI.
    
    AI systems are good at spotting patterns when given access to the right data, and perhaps an AI system could spot 
    if Mediterranean pizzas sell really well on a Friday night, maybe it could suggest to him to make more of it on a 
    Friday afternoon. Now you might say to me, "Hey, Andrew, this is a small pizza store. What's the big deal?" And I 
    say, to the gentleman that owns this pizza store, something that could help him improve his revenues by a few 
    thousand dollars a year, that will be a huge deal to him.
    """
    
    # using async to run the semantic function
    async def run_summary_async():
         summary_result = await kernel.run_async(summary_function, input_str=sk_input)
         display(summary_result)
    
    asyncio.run(run_summary_async())

    Here’s the output I got:

    AI can analyze sales data to help a small pizza store owner optimize his stock, potentially increasing his annual revenue.

    Semantic Kernel has more capabilities like using Semantic Functions & Native functions together and is designed to create AI applications that are powerful. I will write more about them in future posts.

    That’s it for Day 8 of 100 Days of AI.

    I write a newsletter called Above Average where I talk about the second order insights behind everything that is happening in big tech. If you are in tech and don’t want to be average, subscribe to it.

    Follow me on TwitterLinkedIn for latest updates on 100 days of AI. If you are in tech you might be interested in joining my community of tech professionals here.