paint-brush
How I Built the Nigerian News Reporter to Deliver Real-Time, Verified News in Local Languagesby@ileolami
122 reads

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

by IleolamiNovember 7th, 2024
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Nigerian 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.
featured image - How I Built the Nigerian News Reporter to Deliver Real-Time, Verified News in Local Languages
Ileolami HackerNoon profile picture


The Nigerian News Reporter is an AI chatbot I developed with Coze to deliver the latest news from verified sources across Nigeria, with options for popular Nigerian languages like Yoruba, Igbo, Hausa, and Pidgin.

Features of the Nigerian News Reporter

  • Verified News Updates: Retrieves the latest news from reliable sources and delivers it directly to your Telegram.
  • Personalized Preferences: Tailors news based on your chosen language, category, and preferred reporting style.
  • Automated Daily Reports: Sends news updates at your set time daily, so you stay informed without needing to check in each time.

Targeted Audience

This chatbot is designed for all Nigerians, living in Nigeria or outside its borders, who struggle to stay updated with real-time events in the country. Non-citizens interested in Nigerian news can also benefit from the service.

Why the Nigerian News Reporter Matters

When I was growing up, I watched my grandfather sit for hours waiting for news vendors to sell him newspapers. Soon, we moved on to watching NTA News for free, thanks to a stable power supply in the early 2000s. Unfortunately, that didn't last long. Watching the news now requires a monthly subscription and reliable power, and soon my grandpa couldn't keep up with the news anymore.


Moreso, in this social media age, viral entertainment content is much easier to come across than valuable information. I remember a time when I could name all 36 state governors, the Senate President, the Speaker of the House of Representatives, and other key figures in the Nigerian government. Today, most citizens barely know who they are.


That’s why this chatbot matters. It’s helping me, my grandpa, and other citizens stay informed without costly subscriptions or waiting on power.


Apart from the story behind this project, I have always wanted to build an interactive AI chatbot, but I couldn't because I needed to learn a new programming language to do so. Honestly, with my busy schedule, I wouldn't have been able to manage that.


When I saw the AI-chatbot writing contest, I was skeptical about participating because I thought I would need to write code for it. As soon as I saw that Coze had minimized the stress of writing code for building a chatbot, I knew this was my chance to bring all my ideas to life.


Thank you, Coze 🤗

The Nigerian News Reporter (Demo)


How I Built the Nigerian News Reporter

This is how I built the Nigerian News Reporter Chatbot

Setting Up the Bot

Setting up a bot (Agent) was a walk in the park.


All I had to do was:

  1. Click on the Workspace on the Side nav bar. Screenshot of a platform for creating AI agents, with a navigation sidebar on the left and various sections like "New on Coze," "Following," and "Recommends" on the right. The banner promotes AI agent creation, featuring colorful floating characters.

  2. On this Workspace page, click on Develop and then click on Create Agent Screenshot of a user interface with options for "Personal," "Develop," "Resource Library," and "Create agent."

  3. I filled in my Agent's unique name, “Nigerian News Reporter,” added a function description, and used the Image Generator to create an icon for my bot. Here’s the function description for my Agent:


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!


Screenshot of a user interface for creating a digital agent called "Nigerian News Reporter."

Persona and Prompt

The Nigerian News Reporter:

  • 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 section.

Screenshot of a user interface for designing an AI agent's persona and workflows.


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 in various Nigerian languages.


With the help of Coze Prompt Optimization, It suggested a more appropriate and specific prompt for me as seen below

A prompt optimization interface for a Nigerian news reporter character, outlining skills like providing the latest news and multi-language reporting. A user interface displaying a "Prompt Optimization" dialog with instructions on delivering news alerts in Nigerian languages, emphasizing accuracy, reliability, cultural appropriateness, and neutrality. There are options to "Retry" or "Use" the prompt.

I later refactored it to suit my needs like increasing the summaries from 200 to 500 words and sticking to Nigerian News Only.

Testing

After setting up the Persona & prompt, I tested the chatbot to see if it worked how I wanted.


  1. I asked, “What is the latest news in politics?” and this was its response: Screenshot of a user interface designed for a Nigerian news reporter persona. The left panel outlines skills like providing the latest news from sources such as Vanguard and Punch, and multi-language reporting in Yoruba, Hausa, Igbo, and Pidgin English. The right panel displays news about Nigeria’s President signing the Electoral Act Amendment Bill to enhance election transparency and security, including electronic voting.


  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.Then I asked again “What is the latest News in Education?”


Screenshot showing a chat interface for news reporting with skills like providing the latest news and multi-language reporting. The news section mentions that the ASUU ended an eight-month strike after reaching an agreement with the Federal Government, including increased university funding and improved salaries.


Screenshot of a user interface displaying a prompt design for a news-reporting AI. It outlines various skills, such as providing the latest news and multi-language reporting in Nigerian languages. On the right, there is a preview of a chat about universities resuming academic activities in Nigeria, with a question input field below.


  1. 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 led to a prominent newspaper’s home page.


  2. I also tested the language reporting by asking it to bring me the latest news in Yoruba and also asking for the latest news in Yoruba. It responded accurately.


A screenshot showing an arrangement interface with skills and tasks on the left, and a chat in Yoruba on the right discussing Nigerian news about President Tinubu announcing a development project in Ondo State, sourced from Channels TV.


The only issue I had with the chatbot was that the news wasn’t up-to-date. You might wonder how I knew this—I could tell because one of the stories was about ASUU calling off an eight-month strike, which happened back when I was an undergrad in 2022. The solution to this problem lies in another Coze feature called Plugin.

News Source Integration

As I earlier mentioned, the chatbot wasn’t fetching the latest news. All I had to do was add the Google News plugin.

Plugin

Here’s the one I used:

Google News plugin on Coze


Google News is a news aggregator service developed by Google. It presents a continuous flow of links to articles organized from thousands of publishers and magazines.



I used this because It reports news from reliable and verified news sources and it also takes users’ location into consideration when reporting them. I use it a lot and can testify to it.


To limit the plugin to Nigerian news only, I added the Nigeria country code (NG) to the plugin parameter, as shown below:

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:

The Nigerian News reporter in action Punch News Paper proving up-to-date reporting from the Nigerian news reporter

Designing the Nigerian News Reporter

  1. Chatbot Design

What is a Nigerian News Reporter without a touch of the Naija vibe? This is where my creative skills came 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. Activating Triggers

    I also thought, what’s the point of a news reporter that doesn’t send regular updates and waits for me to ask? So, I activated the Trigger feature. Now, the chatbot sends me news automatically at 8 AM, 12 PM, and 9 PM every day. Here’s how it looks:

    With the trigger feature, I don’t have to manually request news updates.


  2. Preference

    Remember, I wanted the chatbot to source news based on my preferences, like in the Yoruba language or only Educational news. To add this functionality, all I did was variables so the chatbot would remember my choices without me having to state them every time. A screenshot of a user interface showing the "Edit Variable" modal.

  3. Shortcuts

    What if I didn’t have to type a long message but could just click a button to get specific news like this 👇?

I made that happen using the Shortcut feature:

Next, I entered the button details as shown below:


I also added the button name(Health), the shortcut name used for Discord and Telegram commands(health_news), the description, and Query content.

So if I click on the Health button, the query content will be sent to the chatbot, like this:

This makes it easier for me to get specific news or get the latest news with just a click.


  1. Voice Call

    I wanted this chatbot to be inclusive and accessible to all kinds of people including people with visual impairments. I added the voice feature and selected English language and harmony. I felt disappointed when I couldn’t find any African languages or voices. Nonetheless, with this, users can easily communicate with the chatbot in their voice via the agent and telegram bot.


Telegram Integration

Convenience is key, and getting news at my fingertips is one of my ultimate goals. I published this chatbot on both the Coze Agent Store and Telegram so that others can use it too.


Firstly, I created a telegram bot using BotFather, Check the process below:


Secondly, I integrated the chatbot by setting up and authorizing Telegram using the NigerianNewsReporterBot token.


Lastly, I added Telegram to the publishing platform and click on Publish. This means everybody uses this chatbot.

Final Notes

The building process took me two weeks, and it wasn’t easy. My biggest challenge was creating the chatbot using the free version with limited credits, not having enough funds for the premium package, and struggling with the inability to integrate WhatsApp.

I also ran into issues getting it to work properly. I remember the chatbot was still pulling up old news even after updating its knowledge. The issue stemmed from:


  1. Plugins I used initially.

A screenshot showing three plugins: Google Web Search, Browser, and News. Each has a brief description of its functionality.


I'm not saying they are bad; they just didn't meet my needs. Another thing I learned about plugins is to always check their information and parameters before adding them to your setup.


  1. Not specifying the country code in the plugin parameters Ensure you enter the right parameters into the plugin. You can do this by checking the Edit parameters

Coze offers many great features for building a robust chatbot, but you don't need to use them all. Use only what you need, and you'll still get great results. This is from my personal experience.


Despite these limitations, I'm very proud that I didn't give up. The best part of this project is that users don't have to ask the chatbot for the latest news because it fetches the news for them at set times. It also understands Nigerian indigenous languages and considers user preferences, unlike other chatbots like ChatGPT and Gemini, where you have to specify your needs every time. This means anyone can use the chatbot, whether they speak Yoruba, Igbo, or Hausa.


I see the Nigerian News Reporter Chatbot evolving in several ways, such as:


  1. Understanding more Nigerian dialects like Ondo, Edo, Ijaw, Ikale, etc.
  2. Adding interactive features like quizzes to test Nigerians' knowledge of national affairs.


A feature I would love to implement, and I hope Coze considers, is adding Nigerian languages and voices to the Voice feature.

A pop-up window titled "Select voice" allows users to choose different languages and voices. The current selection shows English and Harmony. Additional languages in the dropdown list include Spanish, Chinese, and more. There are "Cancel" and "Confirm" buttons at the bottom.


This will help people with visual impairments communicate directly with the chatbot in their local languages or dialects.


Try out the Nigerian News Reporter and let me know what you think in the comments.