Skip to content
Luthfi Hadi
Luthfi Hadi
Back

Regional Economic News Digest

A pipeline that reads regional economic news and uses an LLM to pick and summarize what matters for planning a bank's office network, with a weekly email and a chatbot for the archive. Built during my AI Coach internship at BCA.

My role
AI Coach Intern, sole builder
When
Sep 2026 – now
Type
Internship
AI
Gemini Flash-Lite through an API in a fixed multi-step pipeline with JSON schemas, plus keyword-search RAG for the archive chatbot. No training or fine-tuning.
Built with
TypeScript, Next.js, Supabase, PostgreSQL, Gemini API, Vercel AI SDK, Zod, GitHub Actions, Vitest
A team at BCA plans where the bank's offices go, and part of that planning comes from regional economic news about new factories, industrial estates, infrastructure, housing and companies opening offices. Not everyone has time to read all of it. I joined as an AI Coach intern to build something that reads it for them.

How it works

Steps marked AI call a model. Everything else is code or a person.

Every day

  1. Crawl dozens of news sources

    every 2 to 3 hours

  2. Keyword filter

    drops stories that are clearly irrelevant, such as daily exchange rates and stock moves

  3. Score headlines and group the same event

    AIGemini Flash-Lite

    40 headlines per batch

  4. Read the full text and write the summary

    AIGemini Flash-Lite

    a title, a summary and why the story matters, with links, sources and dates taken from the crawler and never from the model

  5. Editor check

    AIGemini Flash-Lite

    compares each summary with its source and can only lower a score

  6. Morning digest and Monday brief

    a few hundred articles summarized each morning, and a weekly brief every Monday for planning staff across the branch network

Archive chatbot

  1. Turn the question into a search plan

    AIGemini Flash-Lite

    a question such as which projects are under way in one region

  2. Keyword search in Postgres

    no vector database

  3. Answer only from what the search found

    AIGemini Flash-Lite

    the articles come numbered, and each one used is cited

Where the AI is

  • Gemini Flash-Lite through an API for every LLM step, with a fallback chain to other providers when the free tier runs out. Every call is logged.
  • Answers come back as JSON and are checked against a schema, with one retry.
  • Matching a story to a region happens in code. Nothing is fine-tuned or trained, and there are no embeddings.

What was hard

  • The model was looser than the criteria and sometimes gave the top score at random. A manual review of a small sample showed how few of the top-priority stories really met the bar, so I wrote several versions of the criteria with two senior reviewers, then added a second scoring pass for top stories and the editor step.
  • Summaries written from a headline alone invented details. Stories without enough text are no longer summarized.
  • GitHub's scheduler skipped runs, so the crawl now starts from pg_cron in Supabase.
If I started this again, I'd build a bigger labeled set before tuning the criteria, and check how precise the top scores are on every change instead of now and then.

My part

More than 300 commits so far. I set the requirements, chose the models, agreed on the news criteria with the team, tested the output against real news and run it day to day.