How I Built the Nigerian News Reporter to Deliver Real-Time, Verified News in Local Languages

Written by ileolami | Published 2024/11/07
Tech Story Tags: ai-chatbot | coze | coze-ai-agent | nocode-ai-chatbot | the-nigerian-news-reporter | google-news-plugin | news-aggregator-chatbot | inclusive-chatbot-design

TLDRNigerian News Reporter Chatbot delivers real-time news updates directly to your Telegram app. The chatbot delivers news in English, Yoruba, Igbo, or Hausa. The goal and functionality of this Reporter are: Brings the latest Nigerian news to users.via the TL;DR App

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:

  1. Click on theĀ WorkspaceĀ on the Side nav bar.

  2. On this Workspace page, click onĀ DevelopĀ and then click onĀ Create Agent

  3. 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.

  1. I asked, ā€œWhat is the latest news in politics?ā€Ā and this was its response

  2. 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.

  3. 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

  1. 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)

  1. 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:

  1. 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:


Written by ileolami | I am a front-end developer, a Guidance Counsellor,and technical writer
Published by HackerNoon on 2024/11/07