- AI for Business Newsletter
- Posts
- Making GenAI Work for B2B Lead Generation - Part 2
Making GenAI Work for B2B Lead Generation - Part 2
Expert tips on solving the CEO’s biggest challenge

In the previous post, I wrote about the value of GenAI in the B2B lead generation workflow and 5 useful rules to achieve a balance between authenticity and automation.
GenAI is a fantastic productivity enhancer for content generation. And yet…
I have no time!
I hear this from many business leaders, which can be surprising, since often they are articulate enough to write and tech savvy enough to use GenAI.
They mean that their mindspace is too fragmented, they are constantly dealing with urgent decisions and meetings, and they can’t find the time to come up with original things to say.
Instead, they delegate content to a human intern, which defeats the purpose of having GenAI ready to assist. They also stick to reactive posts on social media (Congratulations! Fantastic job! Honored to have attended this meeting!). Or they stick to official press releases.
What if there was a way to generate original, relevant and timely content ideas every day to enhance the personal brand presence of the company’s leaders?
The idea generation agent
The idea generation agent is a program that runs in the background. It listens to global news, your industry’s key opinion leaders, and anyone who is talking about your business. It sends alerts to your company’s management and prompts them in real time to either talk about what’s trending or insert themselves into relevant online conversations.
It may not exist as a mature commercial product for your specific industry and company yet, but good news, you can get it up and running on your own in a couple of days. Here’s how to do it.
Input and outputs
The idea generation agent runs in the background, as mentioned. It collects data from a variety of news and social sources, stores it into a single database, generates recommendations every hour, and sends these recommendations to its users via a notification system (for example, an idea board or text messages).

Let’s look at the components needed for a simple implementation of this approach.
Step 1 (“Aggregate”)
As part of Step 1, the Agent queries various data sources and stores news reports into a database, such as an Airtable base.
This step is a simple sequence of API calls.
It makes little use of GenAI/LLM capabilities, except potentially to parse the inputs from some of the data sources and convert them into a plain text format for storage.
You can utilize the following data sources:
Global news
Many news publications have free RSS feeds with article titles and subtitles (e.g., Wall Street Journal).
Twitter/X account posts
This requires access to the Twitter/X API which, unfortunately, is not cheap. Basic access costs around 200 USD/month. It has low rate limits (5 requests per 15 mins), so to be cautious, the agent must wait 4 minutes between each API call.
Competitor blogs
You can use a web scraping service to read competitor websites. This can be a SAAS platform like Gumloop, high-level library like Scrapy, or you can build your own scraper using BeautifulSoup.
Audio recordings
If you have stored meeting or conference recordings, you can transcribe them inexpensively using Assembly AI.
Reference content
This is a bullet-pointed list of ~20 content ideas generated manually in the past, used to teach the LLM what type of ideas we are looking for.
Step 2 (“Summarize”)
In Step 2, we ask the Agent to read the inputs collected from Step 1, summarize their content in a standardized format, and store the summary of each record in the same Airtable base as the one used in Step 1.
Step 3 (“Recommend”)
As part of Step 3, the Agent reads the latest summaries, generates content ideas aligned with the provided prompt, and sends these ideas to the business leaders and marketing team either via text message (Telegram or WhatsApp) or by storing them in an idea board (in Notion or Airtable).
LLM prompts
Step 2 (“Summarize”)
The Step 2 prompt is straightforward. It aims to convert each input into a list of the most interesting news items to comment on. Items are interesting if they involve large numbers or are unexpected, surprising, or controversial.
Here is a summarization prompt that you can use with your favorite LLM API.
prompt = f"""The following text, enclosed in <text> tags, is a list of news articles with their titles and subtitles.
Your goal is to generate a summary of the main news items, in the form of a list of bullet points in Markdown format.
This list will be used by a social media manager to identify the financial market news that they should post about in order to generate engagement.
The types of news that generate engagement are those that are unexpected, surprising, or controversial, especially those that include large monetary amounts or variation percentages.
When generating the summary, merge or discard the news items that are redundant.
Sumarize the news items to focus on the facts and numbers.
Please do not include any other text than the list of bullet points.
<text>
{text}
</text>
"""
Visit this Colab notebook for the full code in Python, using one of Mitral AI’s cheap and fast models. The code is similar when using OpenAI, Anthropic, Cohere, or comparable vendors.
Step 3 (“Recommend”)
Step 3 is where the magic happens. We ask the LLM to generate a list of engaging blog post titles based on aggregated content. Then, we ask it to attach the list of relevant news items that can be used to populate the post.
For best results, this step should have access to reference content, i.e. content titles that have generated significant user engagement in the past.
Here is an example of reference content:
* The time for mainstream cryptocurrency adoption is now
* In times of high market volatility, don't try to time the market
* Five strategic imperatives for businesses in times of economic uncertainty
* AI technology is primed to transform business and societey
* Are we in a financial bubble?
* Have we reached the market bottom?
* Is Bitcoin the new gold?
Here is a recommendation prompt that you can use with your favorite LLM API.
prompt = f"""The following text, enclosed in <news> tags, is a list of news items.
As a social media manager, your goal is to generate a list of blog post titles, together with the relevant facts and figures that you can use to populate these blog posts.
The types of news that generate engagement are those that are unexpected, surprising, or controversial, especially those that include large monetary amounts or variation percentages.
You will provide your response in Markdown format, where the main bullet points are the blog post titles, and the sub-bullet points are the relevant facts and figures that you can use to populate these blog posts.
For your reference, I am providing you with examples of blog post titles that have been effective in the past, enclosed in <examples> tags.
Note that the blog post titles must not be narrow news titles. As you can see in the examples, they must be broader and engage the reader by suggesting that broader trends are at play.
However, make sure that the sub bullet points are specific and include the relevant facts and figures gathered from the news items.
Bullet points must start with a star character.
Sub bullet points must be indented with 4 spaces followed by a * character.
Please do not include any other text in your response, other than the list of bullet points.
<news >
{text}
</news>
<examples>
{examples}
</examples>
"""
Visit this Colab notebook for the full code in Python.
Takeaway messages
Content generation is key to B2B lead generation. Entrepreneurs and business leaders must grow their personal brand in the marketplace. GenAI is a powerful tool to generate original, relevant, and timely content ideas that they can talk about on social media or in op-eds.
Using LLMs and the code examples above, anyone can build their own idea generation agent.
Don’t wait!