<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Gamaliel Dashua</title>
    <description>The latest articles on DEV Community by Gamaliel Dashua (@gamaliel_dashua_e45a9b614).</description>
    <link>https://dev.to/gamaliel_dashua_e45a9b614</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3948214%2F27529bea-7b8a-4488-96d9-b8dd9c5ed912.jpg</url>
      <title>DEV Community: Gamaliel Dashua</title>
      <link>https://dev.to/gamaliel_dashua_e45a9b614</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gamaliel_dashua_e45a9b614"/>
    <language>en</language>
    <item>
      <title>The Forest Symphony: Turn a Bird's Song Into a Melody You Can Keep</title>
      <dc:creator>Gamaliel Dashua</dc:creator>
      <pubDate>Tue, 20 Oct 2026 15:12:51 +0000</pubDate>
      <link>https://dev.to/gamaliel_dashua_e45a9b614/the-forest-symphony-turn-a-birds-song-into-a-melody-you-can-keep-14hc</link>
      <guid>https://dev.to/gamaliel_dashua_e45a9b614/the-forest-symphony-turn-a-birds-song-into-a-melody-you-can-keep-14hc</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week1-2026-10-05"&gt;Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;You're on a forest trail. A bird starts singing, and a few seconds later the moment has passed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Forest Symphony&lt;/strong&gt; lets you keep that moment. You record the bird on your device, and in about ten seconds you get:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The bird's name&lt;/strong&gt;, with how sure the app is (for example, &lt;em&gt;American Robin, 79% match&lt;/em&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A few facts&lt;/strong&gt; about where it lives and how it sings&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A short melody&lt;/strong&gt; built from the notes the bird actually sang, which you can play right away&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A Download button&lt;/strong&gt; that saves the melody as an audio file (WAV)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;It works without internet.&lt;/strong&gt; Everything runs on your own device, so it still works deep in the woods with no signal. Your recordings and where you made them stay on your device.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Who it's for:&lt;/strong&gt; hikers, birdwatchers, musicians, parents out on a walk with curious kids, and anyone who has stopped to listen to a bird and wished they could take the song home.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How it gets people outside:&lt;/strong&gt; the app is useless indoors on purpose. The only way to get a new melody is to go outside, find a bird, and listen closely enough to record it. Every melody you collect comes from a real bird you heard on a real day. It works like a sound journal that you build by spending time outdoors.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://drive.google.com/file/d/1PUcd4IlFDC5NfZWIdGX1syxjSyWxyfmw/view?usp=sharing" rel="noopener noreferrer"&gt;https://drive.google.com/file/d/1PUcd4IlFDC5NfZWIdGX1syxjSyWxyfmw/view?usp=sharing&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What the demo shows:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Morning Robin Chirp.&lt;/strong&gt; A real robin recording becomes &lt;em&gt;"American Robin's Morning Song"&lt;/em&gt;, which you can play and download.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deep Woods Owl.&lt;/strong&gt; A Tawny Owl is recognised with a 93% match and turned into a slow, low melody.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Windy Ridge.&lt;/strong&gt; A recording of plain wind. The app politely replies: &lt;em&gt;"We couldn't hear a bird in this recording. Try again closer to the bird…"&lt;/em&gt;. It doesn't invent a bird that isn't there.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The app ships with these three recordings built in, so a live demo never depends on a bird turning up.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/Gamey001/forest-symphony" rel="noopener noreferrer"&gt;https://github.com/Gamey001/forest-symphony&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To run it yourself:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3.12 &lt;span class="nt"&gt;-m&lt;/span&gt; venv .venv
.venv/bin/pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; requirements-dev.txt
ollama pull llama3.1                 &lt;span class="c"&gt;# one-time download of the AI composer&lt;/span&gt;
ollama serve                         &lt;span class="c"&gt;# in its own terminal&lt;/span&gt;
.venv/bin/uvicorn app.main:app &lt;span class="nt"&gt;--port&lt;/span&gt; 8000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then open &lt;code&gt;http://localhost:8000&lt;/code&gt;. The first run downloads the bird-recognition model once; after that, everything works offline.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;The app works like a small assembly line. A recording goes in one end and a melody comes out the other. Each station does one job:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;🎙️ Recording
   ↓
1. Clean up     – remove wind rumble, background hiss and silent gaps
   ↓
2. Identify     – BirdNET names the bird (or says "that's not a bird")
   ↓
3. Listen       – follow the bird's pitch, 100 times per second
   ↓
4. Draft        – turn the pitch into notes, in a key, at a human tempo
   ↓
5. Compose      – a local AI (Llama 3.1) arranges the draft and calls a "make the melody" tool
   ↓
6. Synthesize   – plain maths turns the notes into sound waves → WAV file
   ↓
🎵 Result card: bird name, facts, play button, download button
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The open-source AI pieces
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;🐦 BirdNET: the bird expert.&lt;/strong&gt; BirdNET is a free, openly available model from the Cornell Lab of Ornithology and Chemnitz University of Technology. It has been trained to recognise over 6,000 bird species by sound. It runs on my laptop through &lt;code&gt;birdnet&lt;/code&gt;, the official Python package. I chose it over a general-purpose AI because it is built for exactly this one job, and it does it well. It also recognises things that &lt;em&gt;aren't&lt;/em&gt; birds, such as human voices, engines and wind noise. The app uses that to say "we couldn't hear a bird" instead of guessing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🎼 Llama 3.1 (8B) via Ollama: the composer.&lt;/strong&gt; Llama 3.1 is a language model whose files you can download and run yourself (an "open-weight" model). Ollama is a free tool that runs models like this on your own computer. In this app, the model plays the role of a composer. It receives a short text description of what the bird sang (species, key, draft notes) and responds by calling a tool named &lt;code&gt;generate_melody&lt;/code&gt; with its final arrangement.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🔧 Plain Python for everything else:&lt;/strong&gt; FastAPI for the small web server, NumPy and SciPy for the audio maths, and a plain HTML page for the interface.&lt;/p&gt;

&lt;h3&gt;
  
  
  Choices that made it work
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Let each AI do what it is good at.&lt;/strong&gt;&lt;br&gt;
My first plan had the language model "listen" to the bird. That doesn't work: language models read and write text and cannot hear. If you ask one for the notes in a recording, it will make some up. So the work is split:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Hearing&lt;/em&gt; the bird is done with signal maths: find the loudest frequency in each tiny slice of sound. It gives the same answer every time.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Naming&lt;/em&gt; the bird is done by BirdNET, the specialist.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Arranging&lt;/em&gt; the music is done by the language model, which works with text and makes creative choices.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Never trust the AI blindly, and always have a backup.&lt;/strong&gt;&lt;br&gt;
Every tool call from the AI is checked before anything plays. Are the notes real notes? Is the melody within two octaves? Are the rhythms valid? If the answer is wrong, the AI is told exactly what was wrong and gets one more try. If it still fails, or if the AI isn't running at all, the app uses its own draft melody. &lt;strong&gt;You always get a song.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Facts come from a fact file, never from the AI.&lt;/strong&gt;&lt;br&gt;
Language models sometimes state made-up facts with total confidence. That's harmless in a chat, but bad on a card that teaches kids about birds. The species facts come from a small, hand-checked file and are looked up by the name BirdNET gives.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Be honest about what the AI did.&lt;/strong&gt;&lt;br&gt;
In testing, the model would say "I smoothed out the melody" when it hadn't changed a single note. So the app doesn't show what the AI &lt;em&gt;says&lt;/em&gt; it did. It compares the melodies before and after and reports what &lt;em&gt;actually&lt;/em&gt; changed, for example &lt;em&gt;"The AI composer reshaped 5 of the bird's 24 notes."&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Problems I ran into (and what I learned)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;🦉 The owl kept disappearing.&lt;/strong&gt; The noise cleaner learned what "background noise" sounded like from the whole recording. Owl hoots are long and steady, so the cleaner decided the owl &lt;em&gt;was&lt;/em&gt; the background and erased it. The fix was to treat a sound as background only if it's there almost all the time. Hoots come and go, so they now survive.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🦉 The owl sounded twice as high as it should.&lt;/strong&gt; Owl calls have overtones (fainter copies of the note at higher pitches) that are louder than the note itself, so the app followed the wrong one. It now checks for a real note underneath the loudest one, and picks that note when it's there.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🎙️ Browsers were deleting birdsong.&lt;/strong&gt; Browsers clean up microphone audio for video calls, and that cleanup treats birdsong as noise to remove. The app turns those filters off when it records.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🐦 Real birds are too high for music.&lt;/strong&gt; A robin sings at around 2,500 Hz, which is higher than the top of a piano. The app moves the melody down by whole octaves, so it keeps its shape but lands in a range that's pleasant to listen to.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;📻 Static was "a woodpecker".&lt;/strong&gt; Fed pure static, BirdNET reported a woodpecker with 45% confidence. The app now needs at least 50% confidence before it believes something is a bird.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;It works where the internet doesn't.&lt;/strong&gt; The place you hear the best birdsong, deep in the woods, is usually the place with no signal. An app that depends on a paid online AI service stops working at the trailhead. Because BirdNET and Llama 3.1 run on the device itself, the Forest Symphony works on a mountain or in a forest, or anywhere else.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Your walks stay private.&lt;/strong&gt; Recordings, times and places say a lot about where you go and when. With open models running locally, none of that leaves your device. There's no account to sign up for and nothing to upload.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The best tool for the job was already open.&lt;/strong&gt; No general-purpose online AI matches BirdNET at recognising birds. It exists because researchers spent years collecting and labelling bird recordings and then shared the result. The demo recordings in this app also come from volunteers who share their recordings on xeno-canto. The whole project is built on things people chose to share.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I could look inside and fix things.&lt;/strong&gt; When the owl went missing and the AI's descriptions didn't match its output, I could test each piece on its own, see what was going on, and change it. With a closed service, I would only have seen the final wrong answer, with nothing I could inspect.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It costs nothing to use.&lt;/strong&gt; There are no per-request fees or rate limits, and no API key that can expire before demo day.&lt;/p&gt;

&lt;h3&gt;
  
  
  Credits
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Bird identification:&lt;/strong&gt; &lt;a href="https://birdnet.cornell.edu/" rel="noopener noreferrer"&gt;BirdNET&lt;/a&gt; by the Cornell Lab of Ornithology and Chemnitz University of Technology (model licence: CC BY-NC-SA 4.0)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI composer:&lt;/strong&gt; &lt;a href="https://ollama.com/library/llama3.1" rel="noopener noreferrer"&gt;Llama 3.1&lt;/a&gt; by Meta, running on &lt;a href="https://ollama.com" rel="noopener noreferrer"&gt;Ollama&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Robin recording:&lt;/strong&gt; Jonathon Jongsma, &lt;a href="https://commons.wikimedia.org/wiki/File:Turdus_migratorius_-_American_Robin_XC130246.ogg" rel="noopener noreferrer"&gt;xeno-canto XC130246&lt;/a&gt;, CC BY-SA 3.0&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Owl recording:&lt;/strong&gt; Benoît Van Hecke, &lt;a href="https://commons.wikimedia.org/wiki/File:Strix_aluco_-_Tawny_Owl_XC603209.mp3" rel="noopener noreferrer"&gt;xeno-canto XC603209&lt;/a&gt;, CC BY-SA 4.0&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
    </item>
    <item>
      <title>Expense Auditor: How I Built a Private AI Expense Assistant That Uses Tools for Flawless Math</title>
      <dc:creator>Gamaliel Dashua</dc:creator>
      <pubDate>Sun, 18 Oct 2026 22:36:52 +0000</pubDate>
      <link>https://dev.to/gamaliel_dashua_e45a9b614/expense-auditor-how-i-built-a-private-ai-expense-assistant-that-uses-tools-for-flawless-math-ml3</link>
      <guid>https://dev.to/gamaliel_dashua_e45a9b614/expense-auditor-how-i-built-a-private-ai-expense-assistant-that-uses-tools-for-flawless-math-ml3</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week2-2026-10-12"&gt;Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Expense Auditor&lt;/strong&gt; is a private AI bookkeeper that runs entirely on your own laptop. You chat with it like a person ("How much did I spend on software last month?") and it answers with numbers that are &lt;strong&gt;always exactly right&lt;/strong&gt;, because the AI is never allowed to do the maths.&lt;/p&gt;

&lt;h3&gt;
  
  
  The problem
&lt;/h3&gt;

&lt;p&gt;Anyone who earns money on the side (freelancers, small shop owners, online sellers, consultants) has to track expenses. It's tedious, and getting it wrong costs real money at tax time.&lt;/p&gt;

&lt;p&gt;AI chat assistants look like the perfect helper, but they have two serious flaws:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;AI is bad at arithmetic.&lt;/strong&gt; A language model predicts the next word; it doesn't calculate. Ask it to total 40 receipts and you'll often get a confident, wrong number.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Your finances end up on someone else's servers.&lt;/strong&gt; Every receipt, vendor and amount you upload to a cloud AI leaves your control.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  The solution
&lt;/h3&gt;

&lt;p&gt;Expense Auditor splits the work between two very different "workers":&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🤖 &lt;strong&gt;The AI&lt;/strong&gt; understands your question and writes the friendly answer. That's all it does.&lt;/li&gt;
&lt;li&gt;🧮 &lt;strong&gt;Ordinary code&lt;/strong&gt; looks up your records, adds up the numbers, converts currencies and works out dates, with exact precision.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So when you ask &lt;em&gt;"How much did I spend in May?"&lt;/em&gt;, the AI doesn't guess. It asks the calculator tool, gets back exactly &lt;strong&gt;$78.57&lt;/strong&gt;, and tells you. Under every answer there's a &lt;strong&gt;"Verified by tool calls"&lt;/strong&gt; panel showing the exact records and date range used, so you can check the AI's work yourself.&lt;/p&gt;

&lt;h3&gt;
  
  
  What it can do
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;💬 &lt;strong&gt;Chat about your spending:&lt;/strong&gt; totals, averages, biggest expenses, breakdowns by category.&lt;/li&gt;
&lt;li&gt;🧾 &lt;strong&gt;Read any receipt:&lt;/strong&gt; drop in a PDF invoice, a phone photo of a paper receipt or a screenshot, and it fills in the vendor, date, category and total by itself.&lt;/li&gt;
&lt;li&gt;💱 &lt;strong&gt;Handle US dollars and Nigerian naira:&lt;/strong&gt; everything is stored in dollars. A naira receipt is converted automatically (at 1 USD = ₦1,400), and you can ask for any answer in naira.&lt;/li&gt;
&lt;li&gt;📅 &lt;strong&gt;Understand everyday date language:&lt;/strong&gt; "May", "August 1 to 15", "last quarter", "since March".&lt;/li&gt;
&lt;li&gt;🔒 &lt;strong&gt;Stay 100% private:&lt;/strong&gt; the AI and the database both live on your computer. Nothing is uploaded anywhere.&lt;/li&gt;
&lt;li&gt;📊 &lt;strong&gt;Show a dashboard:&lt;/strong&gt; total spend, a chart by category and a table of every record.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Who would pay for it?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Freelancers and side-hustlers&lt;/strong&gt; who want quick, trustworthy answers without learning accounting software.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Small businesses in Nigeria and other countries with two currencies&lt;/strong&gt;, where expenses arrive in naira but reports are needed in dollars.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bookkeepers and accountants&lt;/strong&gt; who handle many clients' receipts and can't legally or ethically upload them to a cloud AI.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Privacy-conscious professionals&lt;/strong&gt; (lawyers, therapists, consultants) whose expense records reveal who their clients are.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The pitch is simple: &lt;em&gt;an assistant that's as easy as ChatGPT, as accurate as a calculator, and as private as a notebook in your drawer.&lt;/em&gt; Because it runs on hardware the customer already owns, there's no cloud bill per question. That makes a low one-off licence or a small monthly fee viable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;🎥 &lt;strong&gt;Screen recording:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://drive.google.com/file/d/1npxs7l64g2gMtJamKkeA4OE4Fv1UHEZE/view?usp=sharing" rel="noopener noreferrer"&gt;https://drive.google.com/file/d/1npxs7l64g2gMtJamKkeA4OE4Fv1UHEZE/view?usp=sharing&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/Gamey001/expense-auditor-with-calculator.git" rel="noopener noreferrer"&gt;https://github.com/Gamey001/expense-auditor-with-calculator.git&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The repository includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a step-by-step setup guide written for non-experts&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;124 automated tests&lt;/strong&gt; that run in about 2 seconds without needing the AI&lt;/li&gt;
&lt;li&gt;a sample-data script so you can try it straight away&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The code is organised like this:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;File&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;backend/agent.py&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Talks to the local AI and decides when to use tools&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;backend/tools.py&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The "accountant": database queries and exact maths&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;backend/periods.py&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The calendar tool: turns "May" into May 1 to May 31&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;backend/currency.py&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Dollar and naira conversion&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;backend/receipts.py&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Reads PDFs and photos&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;frontend/app.py&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The chat window and dashboard&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The open-source AI stack
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Piece&lt;/th&gt;
&lt;th&gt;What I used&lt;/th&gt;
&lt;th&gt;Its job&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Local AI runtime&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Ollama&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Runs AI models on my own laptop&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Chat model&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Meta Llama 3.1 (8B)&lt;/strong&gt;, open-weight&lt;/td&gt;
&lt;td&gt;Understands questions and picks the right tool&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Vision model&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Alibaba Qwen2.5-VL (3B)&lt;/strong&gt;, open-weight&lt;/td&gt;
&lt;td&gt;Reads photos and scanned receipts&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Backend&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;FastAPI&lt;/strong&gt; (Python)&lt;/td&gt;
&lt;td&gt;Runs the tools and connects everything&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Interface&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Streamlit&lt;/strong&gt; (Python)&lt;/td&gt;
&lt;td&gt;The chat window and dashboard&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;SQLite&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;One small file on your computer&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  The key idea: "the AI talks, the code counts"
&lt;/h3&gt;

&lt;p&gt;Modern open models support &lt;strong&gt;tool calling&lt;/strong&gt;. Instead of answering straight away, the model can say &lt;em&gt;"please run this tool with these settings."&lt;/em&gt; I gave the model six tools:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Query and calculate:&lt;/strong&gt; finds expenses and computes a sum, average, count, minimum or maximum.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Breakdown by category:&lt;/strong&gt; a total per category.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Calendar lookup:&lt;/strong&gt; turns phrases like "last quarter" into exact dates.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Convert currency:&lt;/strong&gt; dollars ↔ naira.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;List categories:&lt;/strong&gt; so the AI uses the category names that actually exist.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add expense:&lt;/strong&gt; so you can say "log a ₦14,000 taxi ride today".&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The AI's only job is to pick the right tool and describe the result. Every number comes from code, using exact decimal maths, so &lt;code&gt;0.10 + 0.20&lt;/code&gt; is always &lt;code&gt;0.30&lt;/code&gt; and never &lt;code&gt;0.30000000000000004&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  What testing taught me (the honest part)
&lt;/h3&gt;

&lt;p&gt;The most valuable part of this project was watching the AI fail and building guardrails so it couldn't fail the same way again.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🐛 Bug 1: "May" became October.&lt;/strong&gt; I asked &lt;em&gt;"What transactions did I make in May?"&lt;/em&gt;. The AI said I had 26, then listed made-up transactions with the wrong amounts and dates. The real answer was &lt;strong&gt;one&lt;/strong&gt;. Here's what had happened:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The AI sent &lt;em&gt;two contradictory instructions&lt;/em&gt; to the tool: "May 1 to May 31" &lt;strong&gt;and&lt;/strong&gt; "this month".&lt;/li&gt;
&lt;li&gt;My code obeyed "this month", so it returned October's records.&lt;/li&gt;
&lt;li&gt;The AI then wrote "May" on top of October's data and filled in details it invented.&lt;/li&gt;
&lt;li&gt;In another test, it guessed the year &lt;strong&gt;2023&lt;/strong&gt; for "August".&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The fix: a calendar tool.&lt;/strong&gt; I took date maths away from the AI completely, just as I'd already done with arithmetic:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The AI now passes the user's own words ("May") to the calendar tool, and code turns them into exact dates.&lt;/li&gt;
&lt;li&gt;Any instruction the AI invents outside the tool's definition is ignored and flagged.&lt;/li&gt;
&lt;li&gt;Every answer must state the date range that was actually used, and the screen shows it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After the fix, the same question returned the one correct transaction. I added an automated test that replays the AI's exact wrong instructions, so this bug can't come back.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🐛 Bug 2: photos of receipts crashed.&lt;/strong&gt; The first vision model I tried (&lt;code&gt;llama3.2-vision&lt;/code&gt;) wouldn't load on my version of Ollama. I switched to &lt;strong&gt;Qwen2.5-VL&lt;/strong&gt;, which is smaller (3.2 GB instead of 7.8 GB) and better at reading documents. It read my test receipts in about 6 seconds and correctly picked the final total rather than the subtotal. It also read the Nigerian date format (15/10/2026) correctly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🐛 Bug 3: naira was treated as dollars.&lt;/strong&gt; A ₦32,235 grocery receipt would have been saved as $32,235. Now the AI only spots the currency, and code does the conversion: ₦32,235 is saved as &lt;strong&gt;$23.03&lt;/strong&gt;, with the original naira amount kept for the records.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The lesson:&lt;/strong&gt; &lt;em&gt;don't trust the model with anything that has a single right answer.&lt;/em&gt; Let it handle language, and let code handle facts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;For this product, open-source AI isn't a nice extra. &lt;strong&gt;The product couldn't exist without it.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;🔒 Privacy is guaranteed, not promised.&lt;/strong&gt; With a closed cloud AI, every receipt (who you paid, how much, when) goes to a company's servers, and you have to trust their privacy policy. With open models running locally, the data physically never leaves the laptop. For accountants handling client records, that's the difference between "allowed" and "not allowed".&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;💸 No per-question bill.&lt;/strong&gt; A cloud AI charges for every question and every receipt scanned. Here, the model runs on hardware the customer already owns, so the thousandth question costs the same as the first: nothing. That's what makes a cheap side-hustle product possible.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;✈️ It works offline.&lt;/strong&gt; No internet, no outage, no rate limits, no API key to leak.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🔧 I could swap models when one failed.&lt;/strong&gt; When the first vision model wouldn't load, I switched to another open model in minutes by changing one setting. With a closed API you get the provider's model, and you can't move to another one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🧭 Every layer can be inspected.&lt;/strong&gt; The models, the runtime and the code are all open. A cautious customer, or their auditor, can check exactly what happens to their data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🌍 It fits local needs.&lt;/strong&gt; Open tools let me build in Nigerian naira, local date formats and local receipt styles without waiting for a large company to prioritise my market.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Closed AI would have given me a smarter chatbot. Open AI let me build a &lt;strong&gt;trustworthy, private, affordable&lt;/strong&gt; one, and those are the qualities people actually pay for in a financial tool.&lt;/p&gt;

&lt;h2&gt;
  
  
  My First User
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://drive.google.com/file/d/1PUcd4IlFDC5NfZWIdGX1syxjSyWxyfmw/view?usp=sharing" rel="noopener noreferrer"&gt;https://drive.google.com/file/d/1PUcd4IlFDC5NfZWIdGX1syxjSyWxyfmw/view?usp=sharing&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
    </item>
  </channel>
</rss>
