In today's world, keeping updated with the latest news is more important than ever. News is important for people's security and job opportunities. The problem with news is that some of it is either unverifiable or inaccurate, and the convenience of accessing it can vary.
Gone are the days when newspapers were delivered from door to door. I remembered how my grandfather always waited for the vendor to bring them to him at an affordable price. But now, things are not the same as they used to be. Accessibility comes with a cost; you either subscribe or visit a reporter's website to get the news.
Then I thought āWhy not build a chatbot that delivers real-time news updates directly to my Telegram app, tailored to my interests like politics, entertainment, or sports, and in my dialect language?ā So I built a āNigerian News Reporter Chatbotā, that can share the latest news in my preferred language(Yoruba).
In this article, I will walk you through how I built this Telegram AI chatbot using Coze and its features, such as Plugin, Knowledge, Variables , etc.,to deliver the best and most efficient news reporter.
Setting Up the Bot
Setting up a bot called Agent was as easy as a walk in the park. All I have to do are:
-
Click on theĀ WorkspaceĀ on the Side nav bar.
-
On this Workspace page, click onĀ DevelopĀ and then click onĀ Create Agent
-
Filled in my Agent's Unique name āNigerian News Reporterā,Ā function description and use the Image generator to generate an Icon for my bot.
Here is my Agent function description:
Hey there! Iām your Nigerian News Reporter, your go-to for all things happening in Naija. Whether it's breaking news, hot gossip, or sports highlights, Iām here to deliver it in the language of your choiceāEnglish, Yoruba, Igbo, or Hausa. Sit back, relax, and let me keep you in the loop with the latest updates, straight from the heart of Nigeria!
Persona and Prompt
The goal and functionality of this Reporter are:
-
Brings the latest Nigerian news to users
-
Verified news with date and time from the right sources
-
Take note of the usersā preferences e.g
I love to read the latest news in politics in Igbo language
Having identified my goals for this chatbot, the next step I took was to enter these details into theĀ Persona & Prompt.
This feature instructs the agent on what to do, and it will follow the instructions precisely. So, I entered my goals into theĀ Persona & PromptĀ to achieve my desired result.
This was my initial prompt:
You are a Nigerian news reporter and your goals are to:
Help brings latest Nigerian news to users from various sources and various Nigerian languages
With the help of Coze Prompt Optimization, It suggested a more appropriate and specific prompt for me as seen below
I then later refactored it to suit my needs like increasing the Summaries words from 150 to 200.
Testing
After setting up the Persona & prompt, I proceeded to test the chatbot if work the way I wanted it.
-
I asked, āWhat is the latest news in politics?āĀ and this was its response
-
I wanted to be sure if this is true because the goal is to fetch reliable and verified news.
I added this to the prompt:
- Include the source of the news for reference with the Link.
Then I asked againĀ āWhat is the latest News in Education?ā
I got the news but It wasnāt the latest news because this incident happened in 2022 and not 2024 and the source link added was just a Punch Homepage link.
-
I also tested the language reporting, by asking it to bring the latest news for me in Yoruba language and also asking for the latest news in Yoruba language. It responded accurately.
The only problem I had with it was that, the News werenāt the latest at all. You may be wondering how I knew. I know this because one of the news thatās theĀ ASUU Call of Eightās month StrikeĀ happened when I was an undergraduate in 2022.
This problem moved me to another Coze feature calledĀ PluginĀ andĀ Knowledge.
News Source Integration
As I earlier mentioned, the chatbot wasnāt fetching the latest news. All I have to do is add some Plugins and knowledge (Nigerian News sources such as Punch, Vanguard, Channels TV, Arise news, TVC Urls).
Plugins
These are the Plugins I used:
I used these plugins because they help the bot find reliable news from Nigerian sources. TheĀ Google Web searchĀ plugin, in particular, was used because when I searched for "The latest news in Nigeria" on Google, it connected me to trustworthy sources that are highly popular in the country.
Knowledge
āYou could say I have trust issuesā, and yes, I do š . I want information that is accurate and reliable. So, I added some news source URLs to the Knowledge feature. This feature ensures that the responses provided to users are fetched from these sources, guaranteeing reliability.
At this point, I encountered some issues while trying to add the URLs. Some sources couldn't be accessed. Sources like Channels TV and Vanguard News were inaccessible, which was really disappointing because they are among the most reliable news sources.
What I did instead was to get the sourcesā URLs for each category and add them one by one. It was very stressful, but it was worth it in the end. I made sure the URLs were updated every day. e.g, I get the TVC news URLs for Politics, Business, etc
In the end, Iām having some like this :
After adding and processing these data, I had a long list of sources to feed my chatbot ranging from Punch ng, TVC news, ChannelsTV, Sahara Reporter etc.
Testing
I tested the chatbot to see if it was fetching the latest news updates, and to my great surprise, it performed exactly as it was supposed to. I also visited the sources' pages to verify the information, and everything was accurate.
See the proof below:
Chat Experience
- Chatbot Design
What is a Nigerian News Reporter without a touch of Naija vibe?Ā This is where my creative skills come into play. I used a Coze Image generator chatbot to create a background image (Nigerian Flag) and added a welcoming message for users.
This welcoming message is written in Pidgin(Nigerian English)
- Triggers
I also thought, what is a news reporter without sending regular updates instead of waiting for me to ask first? So, I turned on theĀ TriggerĀ feature. By doing this, I can instruct the chatbot toĀ send me news at 7 AM, 12 PM, and 8 PM every day. As shown below:
-
Preference
Remember, I wanted it to get news based on my preferences, like in the Yoruba language or only Educational news. All I need to do is createĀ variablesĀ so the chatbot remembers my choices without me having to request them every time.
As shown below: