Julien Sauvage, Author at ProdSens.live https://prodsens.live/author/julien-sauvage/ News for Project Managers - PMI Mon, 10 Jun 2024 14:20:29 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.5 https://prodsens.live/wp-content/uploads/2022/09/prod.png Julien Sauvage, Author at ProdSens.live https://prodsens.live/author/julien-sauvage/ 32 32 How to Build an AI Chatbot with Python and Gemini API: Comprehensive Guide https://prodsens.live/2024/06/10/how-to-build-an-ai-chatbot-with-python-and-gemini-api-comprehensive-guide/?utm_source=rss&utm_medium=rss&utm_campaign=how-to-build-an-ai-chatbot-with-python-and-gemini-api-comprehensive-guide https://prodsens.live/2024/06/10/how-to-build-an-ai-chatbot-with-python-and-gemini-api-comprehensive-guide/#respond Mon, 10 Jun 2024 14:20:29 +0000 https://prodsens.live/2024/06/10/how-to-build-an-ai-chatbot-with-python-and-gemini-api-comprehensive-guide/ how-to-build-an-ai-chatbot-with-python-and-gemini-api:-comprehensive-guide

In this article, we are going to do something really cool: we will build a chatbot using Python…

The post How to Build an AI Chatbot with Python and Gemini API: Comprehensive Guide appeared first on ProdSens.live.

]]>
how-to-build-an-ai-chatbot-with-python-and-gemini-api:-comprehensive-guide

In this article, we are going to do something really cool: we will build a chatbot using Python and the Gemini API. This will be a web-based assistant and could be the beginning of your own AI project. It’s beginner-friendly, and I will guide you through it step-by-step. By the end, you’ll have your own AI assistant!

What You’ll Need

  • IDE (I recommend Visual Studio Code)
  • Gemini API key
  • Python
  • Python libraries

Download IDE — VS code

You can use any IDE you like, but if you don’t have one, please download VS Code. It’s really powerful and easy to use. Here’s the link: https://code.visualstudio.com/download

Download IDE — VS code

Gemini API

Create a Google Cloud Project

Before we obtain an API key, we need to create a project in Google Cloud. To create a project, please follow this link: https://console.cloud.google.com/cloud-resource-manager

Create a Google Cloud Project

After the project is created, we are ready to request an API key.

How to Get Gemini API Key

To get the API key, visit https://aistudio.google.com/app/apikey and click on the “Create API key” button.

How to Get Gemini API Key

Then, select the project that you created in the previous step from the drop-down menu and click “Generate API key”.

How to Get Gemini API Key

Copy the key; we’ll need it in the next steps.

Install Python

Windows: Download the installer from https://www.python.org/downloads/windows/

Install Python

Linux (Ubuntu/Debian): Use this command in your terminal window:

sudo apt-get install python3

Install Python

Install Python Libraries

For the next steps, you need to use the terminal. If you are on Windows, you can use https://apps.microsoft.com/detail/9n0dx20hk701?rtc=1&hl=en-us

Install PIP

After we set up Python, we need to set up the pip package installer for Python.

sudo apt install python3-pip

Install PIP

Set Up a Virtual Environment

The next step is to set up virtual environments for our project to manage dependencies separately.

Use this command:

sudo apt install python3-venv

The command python3 -m venv myprojectenv is used to create a virtual environment for a Python project:

python3 -m venv myprojectenv

The command source myprojectenv/bin/activate is used to activate the virtual environment:

source myprojectenv/bin/activate

Install LangChain

LangChain is a framework designed to simplify the creation of applications using large language models.

Use this command:

pip install langchain-core

Install LangChain-Google-GenAI

Use this command:

pip install langchain-google-genai

This package contains the LangChain integrations for Gemini through their generative-ai SDK.

Once you’ve done that, we are ready to go to the next steps.

Install Flask

Once the virtual environment is activated, we can use pip to set up Flask.

Use this command:

pip install Flask

Create a ChatBot with the Python Flask Framework
First, let’s create a directory for our app.

Use these commands:

mkdir myflaskapp
cd myflaskapp

Inside the directory, create a file for our app and call it “app.py”.

Install Flask

Then add the following content:

from flask import Flask

app = Flask(name)

@app.route('/')

def home():

return "Hello, Flask!"

if name == 'main':

app.run(debug=True)

To make sure that our app is working fine, let’s run it.

Use this command:

python3 app.py

If everything is okay, you will be able to access your Flask app at http://127.0.0.1:5000.

Create an HTML Page for the Flask App

You can create your own HTML or use the example provided.

Flask app

You can download it from here: https://github.com/proflead/gemini-flask-app/blob/master/web/index.html

You will need 2 JavaScript files:

To communicate with the Gemini API: https://github.com/proflead/gemini-flask-app/blob/master/web/gemini-api.js

And https://github.com/proflead/gemini-flask-app/blob/master/web/main.js To format the output result on the page without reloading the page.

Change app.py

Let’s modify our app.py file with the following code:

Change app.py

You can copy the code from here: https://github.com/proflead/gemini-flask-app/blob/master/app.py

Once you are ready, run this command in the project folder:

python3 app.py

If you did everything correctly, you will be able to see your ChatBot.

ChatBot

Video Tutorial: AI Chatbot using Python and Gemini API


Chatbot in Python – Build AI Assistant with Gemini API – YouTube

Build Your First AI Chatbot in Python: Beginner’s Guide Using Gemini APIUnlock the power of AI with this beginner-friendly tutorial on building a chatbot in …

favicon
youtube.com

Conclusion

As you can see, building a chatbot with Python and the Gemini API is not that difficult. You can further improve it by adding styles, extra functions, or even vision recognition. If you run into any issues, feel free to leave a comment explaining your problem, and I’ll try to help you.

Cheers! 🙂

The post How to Build an AI Chatbot with Python and Gemini API: Comprehensive Guide appeared first on ProdSens.live.

]]>
https://prodsens.live/2024/06/10/how-to-build-an-ai-chatbot-with-python-and-gemini-api-comprehensive-guide/feed/ 0
Positioning: Art or science? https://prodsens.live/2024/03/22/positioning-art-or-science/?utm_source=rss&utm_medium=rss&utm_campaign=positioning-art-or-science https://prodsens.live/2024/03/22/positioning-art-or-science/#respond Fri, 22 Mar 2024 15:20:29 +0000 https://prodsens.live/2024/03/22/positioning-art-or-science/ positioning:-art-or-science?

Positioning: Art or science? This article is based on Julien Sauvage’s talk at the Product Marketing Summit in…

The post Positioning: Art or science? appeared first on ProdSens.live.

]]>
positioning:-art-or-science?

Positioning: Art or science?

Positioning: Art or science?

This article is based on Julien Sauvage’s talk at the Product Marketing Summit in San Francisco. As a PMA member, you can enjoy the complete recording here. For more exclusive content, head over to your membership dashboard.


There are thousands of definitions of positioning out there, but here’s how I see it:

Positioning is defining what makes you the best at something the buyer wants.

But is positioning an art or a science? It’s a question that’s always intrigued me. So, today we’re going to dive into a seven-part positioning framework and break it down step by step. Because there are seven of them, I like to match the steps to the days of the week:

Monday: Align the team

Tuesday: Know the market

Wednesday: Extract the value

Thursday: Build the narrative

Friday: Drive it internally

Saturday: Assess its impact

Sunday: Rest up

Positioning: Art or science?

Monday: Align the team

The first step is aligning the team. But is this an art or a science?

Personally, I lean toward the scientific side. Let me explain why by listing the crucial elements of aligning a team that fall under the banners of art and science.

It’s an art! 🎨

  • Agreeing on a definition: Getting all parties to agree on what positioning means is a more subjective, artistic challenge.
  • Leadership dynamics: If your CEO is a bit… temperamental, that human dynamic gets tangled up in the positioning work in an unpredictable way. 
  • Emotional attachment: As the old saying goes, you have to “get rid of the old to make way for the new” when it comes to positioning. But that process of letting go of legacy messaging and familiar positioning is an emotional one – it’s not easy for people to abandon what they’re used to.
  • Communication hurdles: Even with a brilliant positioning plan, if you fail to communicate it artfully and get buy-in, true cross-functional alignment will suffer. The people skills required for effective communication are more artistic.

However, I think the scientific aspects outweigh the artistic ones. Let’s take a look.

It’s a science! 🔬

  • Defining what positioning means: You can take a methodical approach to defining what positioning means for the company – regardless of whether everyone agrees right off the bat. As the product marketing authority, you get to lay out the vision.
  • Clear ownership: Assigning clear owners through a RACI (Responsible, Accountable, Consulted, Informed) matrix is crucial for alignment. It avoids messaging anarchy where anyone can throw in their two cents.
  • Determining the expected outcomes: Before kicking anything off, you scientifically determine and align on the precise outcomes you want the positioning work to achieve. Those goals need to be established upfront.
  • Shared success metrics: Breaking down silos and driving alignment by having teams share relevant success metrics across functions is crucial. 
  • Structured plan: The vision and process for your positioning are encapsulated in a strong, structured charter deck that you can socialize across the company in a roadshow format. This is a scientific knowledge-sharing approach.
  • Official kickoff: You should always host a formal kickoff meeting to officially rally all stakeholders from the outset and set the vision. 

As you can see, the list of scientific aspects is much longer than the list of artistic ones. That’s why, in my book, aligning the team as you start to create your new positioning is more of a science than an art.

Tuesday: Know the market

Okay, knowing your market – art or science?

I see it mostly as a science. Let’s dive into the crucial aspects of this stage of the positioning process and explore why. 

It’s a science! 🔬

  • Gathering customer feedback: Leveraging a variety of channels like surveys, interviews, and focus groups to directly gather customer insights and understand their perspectives is a key element of knowing your market.
  • Win/loss analysis: Conducting in-depth reviews of closed deals and lost opportunities to identify strengths, weaknesses, and areas for improvement based on real outcomes is another highly methodical process. Clozd is a great platform for this.
  • Getting sales teams’ input: One of the best sources of data is the unfiltered voice of your sales reps who have direct frontline experience with buyer needs, objections, and competitor landscapes.
  • Competitive analysis: You can use tools like Klue and Crayon to systematically track, analyze, and understand competitor positioning, messaging, and go-to-market motions.
  • Social listening: Another key aspect of getting to know your market is pulling and analyzing the language that people are using across social media, review sites, and other digital channels in your space. Sprout Social and Meltwater are great tools for this.

To give you an idea of what all this looks like in practice, here’s a taste of how we keep an eye on the market at Clari:

Feedback channel

Channel owner

Description/purpose

Tactics

Intended audience

Customer Advisory Board

Customer marketing

A small, select group of VP+ executives, sourced from existing customers, which meets regularly to network and discuss and validate corporate, marketing, and product strategy.

Focus groups 

Interviews

Product (primary) 

GTM

Copilot

Enablement

Conversation intelligence tool meant to monitor live conversations with customers.

Call recording

ALL

Clozd win/loss program

CI

Interviews with prospects/customers who evaluated Clari in addition to other vendors.

Interviews

ALL

Analyst relations program

Corp marketing & PMM

Relationship with Analyst Community (E.g. Gartner, Forrester, etc.) used to conduct briefings, inquiries, and obtain access to their market research portals

Inquiries 

Desk research

Product (primary) 

Marketing

Crayon

CI

Competitive tracking tool that tracks and aggregates market news, changes to competitor websites, customer reviews, etc. Stores competitive battlecards as well.

Desk research

ALL

Vendor review sites (G2)

Customer marketing

External review sites permitting market stakeholders to browse, evaluate, and review their experiences using different software solutions. Great source of qualitative feedback.

Desk research

GTM (primary) 

Product

There’s much more to it than that of course, but nobody wants to read a 15-row table! The point is that we’ve listed out all of the channels that give us an insight into the market, along with the channel owners, deliverables, and target audience. I’d encourage you to do the same.

The post Positioning: Art or science? appeared first on ProdSens.live.

]]>
https://prodsens.live/2024/03/22/positioning-art-or-science/feed/ 0