<?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: Timilehin Shobande</title>
    <description>The latest articles on DEV Community by Timilehin Shobande (@timilehin_shobande).</description>
    <link>https://dev.to/timilehin_shobande</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%2F4015680%2Fd451e0cb-5f8a-463e-9a35-748098ced65f.jpg</url>
      <title>DEV Community: Timilehin Shobande</title>
      <link>https://dev.to/timilehin_shobande</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/timilehin_shobande"/>
    <language>en</language>
    <item>
      <title>Building a Trustworthy AI Tutor: Engineering for Reliability Instead of Confidence</title>
      <dc:creator>Timilehin Shobande</dc:creator>
      <pubDate>Mon, 13 Jul 2026 23:39:56 +0000</pubDate>
      <link>https://dev.to/timilehin_shobande/building-a-trustworthy-ai-tutor-engineering-for-reliability-instead-of-confidence-4l01</link>
      <guid>https://dev.to/timilehin_shobande/building-a-trustworthy-ai-tutor-engineering-for-reliability-instead-of-confidence-4l01</guid>
      <description>&lt;p&gt;Over the past few months, I've spent a lot of time building AI-powered applications.&lt;/p&gt;

&lt;p&gt;Like many developers, I started with a simple question:&lt;/p&gt;

&lt;p&gt;How can I make the model smarter?&lt;/p&gt;

&lt;p&gt;But somewhere along the way, I realized I was asking the wrong question.&lt;/p&gt;

&lt;p&gt;The question that really mattered was:&lt;/p&gt;

&lt;p&gt;How do I build an AI that people can trust?&lt;/p&gt;

&lt;p&gt;That shift completely changed how I think about AI systems.&lt;/p&gt;

&lt;p&gt;Instead of obsessing over prompts and model performance, I started thinking about retrieval, evaluation, confidence, and something surprisingly difficult for AI:&lt;/p&gt;

&lt;p&gt;Knowing when to say, "I don't know."&lt;/p&gt;

&lt;p&gt;That led me to rethink the architecture behind an AI tutor I was building for the BossFx AI Platform.&lt;/p&gt;

&lt;p&gt;This article walks through that journey—the design decisions, trade-offs, failures, and lessons that reshaped how I think about building AI systems.&lt;/p&gt;

&lt;p&gt;I'd genuinely love to hear how other engineers approach reliability and trust when building with LLMs&lt;/p&gt;

&lt;p&gt;![ ](&lt;a href="https://dev-to-uploads.s3.us-east-2.amazonaws.com/uploads/articles/rum69mxfy9u2m5jz3u7f.png" rel="noopener noreferrer"&gt;https://dev-to-uploads.s3.us-east-2.amazonaws.com/uploads/articles/rum69mxfy9u2m5jz3u7f.png&lt;/a&gt;]&lt;/p&gt;

&lt;p&gt;Figure 1. High-level architecture of the BossFx AI Learning Assistant.&lt;/p&gt;

&lt;p&gt;The Problem&lt;/p&gt;

&lt;p&gt;Retail forex education attracts exactly the people who can least afford a confidently wrong answer.&lt;/p&gt;

&lt;p&gt;A beginner who receives incorrect guidance about leverage, stop-losses, or risk management can lose real money.&lt;/p&gt;

&lt;p&gt;When I started building an AI learning assistant for BossFx students, I realized the hardest requirement wasn't:&lt;/p&gt;

&lt;p&gt;"Answer questions."&lt;/p&gt;

&lt;p&gt;It was:&lt;/p&gt;

&lt;p&gt;"Never answer beyond what the curriculum actually teaches—and admit it when it doesn't know."&lt;/p&gt;

&lt;p&gt;That completely reframed the engineering problem.&lt;/p&gt;

&lt;p&gt;A chatbot optimizes for a good answer.&lt;/p&gt;

&lt;p&gt;A trustworthy tutor optimizes for the right answer—or an honest:&lt;/p&gt;

&lt;p&gt;"I don't have material on that yet. Please ask your mentor."&lt;/p&gt;

&lt;p&gt;In this domain, hallucinations aren't just annoying.&lt;/p&gt;

&lt;p&gt;They're liabilities.&lt;/p&gt;

&lt;p&gt;Constraints That Shaped Every Decision&lt;/p&gt;

&lt;p&gt;Every architecture reflects its constraints.&lt;/p&gt;

&lt;p&gt;Mine were straightforward.&lt;/p&gt;

&lt;p&gt;Solo Founder&lt;/p&gt;

&lt;p&gt;I'm the only engineer maintaining the platform.&lt;/p&gt;

&lt;p&gt;That meant choosing technologies that reduce operational overhead rather than maximize technical novelty.&lt;/p&gt;

&lt;p&gt;Boring infrastructure wins.&lt;/p&gt;

&lt;p&gt;Real-Money Domain&lt;/p&gt;

&lt;p&gt;Nothing the assistant says should ever be interpreted as personalized financial advice.&lt;/p&gt;

&lt;p&gt;The "I don't know" path became one of the most important parts of the system.&lt;/p&gt;

&lt;p&gt;Honesty as a Feature&lt;/p&gt;

&lt;p&gt;Rather than pretending the AI knows everything, the platform measures—and openly admits—what it cannot yet do.&lt;/p&gt;

&lt;p&gt;Architecture&lt;/p&gt;

&lt;p&gt;The platform is built around a TypeScript monorepo with a deliberately capability-agnostic core.&lt;/p&gt;

&lt;p&gt;Its main components include:&lt;/p&gt;

&lt;p&gt;Provider adapter supporting Anthropic and OpenAI&lt;br&gt;
PostgreSQL + pgvector retrieval layer&lt;br&gt;
Retrieval-Augmented Generation (RAG) pipeline&lt;br&gt;
Evaluation harness&lt;br&gt;
Editorial governance before knowledge becomes searchable&lt;/p&gt;

&lt;p&gt;The Learning Assistant is simply the first capability running on this architecture.&lt;/p&gt;

&lt;p&gt;Every future AI capability inherits the same retrieval, evaluation, and governance automatically.&lt;/p&gt;

&lt;p&gt;One rule exists throughout the platform:&lt;/p&gt;

&lt;p&gt;Knowledge is never retrievable until a human approves it.&lt;/p&gt;

&lt;p&gt;![ ](&lt;a href="https://dev-to-uploads.s3.us-east-2.amazonaws.com/uploads/articles/no19xayje1r1mwcc3hb2.png" rel="noopener noreferrer"&gt;https://dev-to-uploads.s3.us-east-2.amazonaws.com/uploads/articles/no19xayje1r1mwcc3hb2.png&lt;/a&gt;]&lt;/p&gt;

&lt;p&gt;Figure 2. Trust is enforced through retrieval, evaluation, and human governance rather than prompts alone.&lt;/p&gt;

&lt;p&gt;Five Engineering Decisions Worth Defending&lt;/p&gt;

&lt;p&gt;Every major architectural decision became an immutable Architecture Decision Record (ADR).&lt;/p&gt;

&lt;p&gt;ADR-001 — pgvector Instead of a Dedicated Vector Database&lt;/p&gt;

&lt;p&gt;For hundreds or even a few thousand curriculum chunks, PostgreSQL with pgvector provided everything I needed.&lt;/p&gt;

&lt;p&gt;Adding another infrastructure component simply wasn't worth the operational cost.&lt;/p&gt;

&lt;p&gt;ADR-002 — Provider Abstraction&lt;/p&gt;

&lt;p&gt;No application code talks directly to OpenAI or Anthropic.&lt;/p&gt;

&lt;p&gt;Everything passes through a provider adapter.&lt;/p&gt;

&lt;p&gt;That abstraction proved invaluable during later model migrations.&lt;/p&gt;

&lt;p&gt;ADR-011 — Editorial Review Enforced Twice&lt;/p&gt;

&lt;p&gt;Every knowledge document carries a reviewed_at timestamp.&lt;/p&gt;

&lt;p&gt;Both SQL and the TypeScript retrieval layer independently enforce that requirement.&lt;/p&gt;

&lt;p&gt;If content changes, approval is automatically revoked until a human reviews it again.&lt;/p&gt;

&lt;p&gt;Defense in depth.&lt;/p&gt;

&lt;p&gt;ADR-004 — Evaluation Before Deployment&lt;/p&gt;

&lt;p&gt;Evaluation wasn't added after the assistant worked.&lt;/p&gt;

&lt;p&gt;It was designed into the platform from the beginning.&lt;/p&gt;

&lt;p&gt;Changes to prompts, retrieval logic, or model configuration are expected to pass evaluation before deployment.&lt;/p&gt;

&lt;p&gt;ADR-007 — Version-Controlled Prompts&lt;/p&gt;

&lt;p&gt;Prompts are production assets.&lt;/p&gt;

&lt;p&gt;They're versioned, reviewed, tested, and rolled back exactly like application code.&lt;/p&gt;

&lt;p&gt;Why the First Quality Score Was Only 35.7%&lt;/p&gt;

&lt;p&gt;The platform's first official evaluation scored 35.7%.&lt;/p&gt;

&lt;p&gt;I could have delayed publishing that number.&lt;/p&gt;

&lt;p&gt;I didn't.&lt;/p&gt;

&lt;p&gt;That score became one of the most valuable engineering artifacts in the project.&lt;/p&gt;

&lt;p&gt;Here's why.&lt;/p&gt;

&lt;p&gt;Every topic fully covered by the curriculum passed.&lt;/p&gt;

&lt;p&gt;Most failures weren't engineering failures.&lt;/p&gt;

&lt;p&gt;They were curriculum gaps.&lt;/p&gt;

&lt;p&gt;The assistant correctly refused to answer questions it had never been taught.&lt;/p&gt;

&lt;p&gt;That's exactly the behavior I wanted.&lt;/p&gt;

&lt;p&gt;One remaining failure exposed a genuine retrieval tuning issue.&lt;/p&gt;

&lt;p&gt;Instead of hiding weaknesses behind a higher percentage, the evaluation produced a roadmap.&lt;/p&gt;

&lt;p&gt;The platform now knows exactly which content should be added next.&lt;/p&gt;

&lt;p&gt;Supporting metrics included:&lt;/p&gt;

&lt;p&gt;Grounding failure rate: 7.7%&lt;br&gt;
Retrieval precision: 22.6%&lt;br&gt;
Retrieval recall: 42.9%&lt;br&gt;
p50 latency: 4.5s&lt;br&gt;
p95 latency: 5.5s&lt;br&gt;
Average query cost: $0.00225&lt;/p&gt;

&lt;p&gt;The score wasn't the finish line.&lt;/p&gt;

&lt;p&gt;It became the baseline.&lt;/p&gt;

&lt;p&gt;A Bug That 86 Passing Tests Missed&lt;/p&gt;

&lt;p&gt;One lesson surprised me.&lt;/p&gt;

&lt;p&gt;The evaluation judge used Claude to score generated answers.&lt;/p&gt;

&lt;p&gt;Everything passed locally.&lt;/p&gt;

&lt;p&gt;Eighty-six automated tests stayed green.&lt;/p&gt;

&lt;p&gt;Then the first real API call failed.&lt;/p&gt;

&lt;p&gt;Claude's newer models rejected a temperature parameter that older integrations accepted.&lt;/p&gt;

&lt;p&gt;Mocks never caught it.&lt;/p&gt;

&lt;p&gt;A real API immediately did.&lt;/p&gt;

&lt;p&gt;Fortunately, two design decisions paid off.&lt;/p&gt;

&lt;p&gt;The evaluation failed closed instead of silently succeeding.&lt;br&gt;
The provider adapter meant the fix required changing one file.&lt;/p&gt;

&lt;p&gt;Since then, every new model family gets a real production smoke test before it's trusted.&lt;/p&gt;

&lt;p&gt;Measure Before You Optimize&lt;/p&gt;

&lt;p&gt;The retrieval layer originally used a similarity threshold of 0.25.&lt;/p&gt;

&lt;p&gt;Evaluation showed exactly why that wasn't good enough.&lt;/p&gt;

&lt;p&gt;Relevant content clustered around 0.56–0.65.&lt;/p&gt;

&lt;p&gt;Irrelevant glossary content sometimes reached 0.47.&lt;/p&gt;

&lt;p&gt;Instead of guessing a new threshold, I now have evidence to guide the decision.&lt;/p&gt;

&lt;p&gt;The recommendation is to increase the threshold gradually as the curriculum expands—not before.&lt;/p&gt;

&lt;p&gt;The lesson was simple:&lt;/p&gt;

&lt;p&gt;Measure first. Optimize second.&lt;/p&gt;

&lt;p&gt;Automation Prepares. Humans Approve.&lt;/p&gt;

&lt;p&gt;Over time, one principle began shaping every part of the platform.&lt;/p&gt;

&lt;p&gt;Automation prepares&lt;br&gt;
Ingests&lt;br&gt;
Chunks&lt;br&gt;
Embeds&lt;br&gt;
Retrieves&lt;br&gt;
Evaluates&lt;br&gt;
Reports&lt;br&gt;
Humans approve&lt;br&gt;
Curriculum&lt;br&gt;
Editorial reviews&lt;br&gt;
Evaluation baselines&lt;br&gt;
Prompt releases&lt;br&gt;
Milestones&lt;/p&gt;

&lt;p&gt;That principle started as an ingestion rule.&lt;/p&gt;

&lt;p&gt;It eventually became the governance model for the entire platform.&lt;/p&gt;

&lt;p&gt;Outcomes&lt;/p&gt;

&lt;p&gt;The project now includes:&lt;/p&gt;

&lt;p&gt;✅ A production RAG platform tested against real providers—not mocks&lt;br&gt;
✅ An 11-document curriculum containing 106 reviewed knowledge chunks&lt;br&gt;
✅ Human approval before any document becomes retrievable&lt;br&gt;
✅ Immutable Architecture Decision Records&lt;br&gt;
✅ Five frozen engineering milestones&lt;br&gt;
✅ 86 automated tests&lt;br&gt;
✅ An archived quality baseline future versions must beat&lt;br&gt;
What's Next&lt;/p&gt;

&lt;p&gt;The encouraging part isn't the current score.&lt;/p&gt;

&lt;p&gt;It's that every weakness is measurable, reproducible, and tied to a concrete engineering decision.&lt;/p&gt;

&lt;p&gt;That makes the roadmap evidence-driven instead of intuition-driven.&lt;/p&gt;

&lt;p&gt;Next milestones include:&lt;/p&gt;

&lt;p&gt;Expanding curriculum coverage&lt;br&gt;
Calibrating retrieval thresholds using collected evaluation data&lt;br&gt;
Integrating evaluation into CI&lt;br&gt;
Re-running the benchmark&lt;/p&gt;

&lt;p&gt;The score only earns the right to improve after the engineering work has been done.&lt;/p&gt;

&lt;p&gt;Final Thoughts&lt;/p&gt;

&lt;p&gt;One thing this project taught me is that trust isn't something you add to an AI system later.&lt;/p&gt;

&lt;p&gt;It's something you design for from the beginning.&lt;/p&gt;

&lt;p&gt;Writing this article reminded me how valuable documentation is. Explaining the architecture, the failures, and the trade-offs forced me to understand the system more deeply than writing code alone ever could.&lt;/p&gt;

&lt;p&gt;I'll continue documenting what I build, the engineering decisions behind it, and the lessons I learn along the way.&lt;/p&gt;

&lt;p&gt;If you've built something similar, or you think there's a trade-off you would have made differently, I'd genuinely love to hear your perspective.&lt;/p&gt;

&lt;p&gt;Thanks for reading.&lt;/p&gt;

&lt;p&gt;About Me&lt;/p&gt;

&lt;p&gt;I'm Timilehin, an AI Software Engineer from Nigeria who enjoys building AI systems that are useful, reliable, and grounded in real engineering.&lt;/p&gt;

&lt;p&gt;Most of my work sits at the intersection of AI, software engineering, and automation. I enjoy documenting not just what I build, but the architectural decisions and trade-offs behind it.&lt;/p&gt;

&lt;p&gt;🌐 Portfolio: &lt;a href="https://timilehin-shobande.vercel.app" rel="noopener noreferrer"&gt;https://timilehin-shobande.vercel.app&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🐙 GitHub: &lt;a href="https://github.com/Gabby-tech" rel="noopener noreferrer"&gt;https://github.com/Gabby-tech&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
