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
How it works
Steps marked AI call a model. Everything else is code or a person.
Every day
Crawl dozens of news sources
every 2 to 3 hours
Keyword filter
drops stories that are clearly irrelevant, such as daily exchange rates and stock moves
Score headlines and group the same event
AIGemini Flash-Lite40 headlines per batch
Read the full text and write the summary
AIGemini Flash-Litea title, a summary and why the story matters, with links, sources and dates taken from the crawler and never from the model
Editor check
AIGemini Flash-Litecompares each summary with its source and can only lower a score
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
Turn the question into a search plan
AIGemini Flash-Litea question such as which projects are under way in one region
Keyword search in Postgres
no vector database
Answer only from what the search found
AIGemini Flash-Litethe 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.
