<?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/"
      xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Fredrick Onyango — Technical Blog</title>
    <link>https://fredrickonyango.vercel.app/</link>
    <atom:link href="https://fredrickonyango.vercel.app/feed.xml" rel="self" type="application/rss+xml" />
    <description>Writing on AI engineering, RAG pipelines, PostgreSQL and pgvector, system architecture and shipping products from Kenya.</description>
    <language>en-KE</language>
    <lastBuildDate>Mon, 12 Oct 2026 00:00:00 GMT</lastBuildDate>
    <managingEditor>onyangofred1005@gmail.com (Fredrick Onyango)</managingEditor>
    <webMaster>onyangofred1005@gmail.com (Fredrick Onyango)</webMaster>
    <item>
      <title>Building Kilele Archade: an AI Learning Platform for Kenya's CBC Curriculum</title>
      <link>https://fredrickonyango.vercel.app/blog/building-kilele-archade-ai-learning-platform-kenya</link>
      <guid isPermaLink="true">https://fredrickonyango.vercel.app/blog/building-kilele-archade-ai-learning-platform-kenya</guid>
      <pubDate>Mon, 12 Oct 2026 00:00:00 GMT</pubDate>
      <dc:creator>Fredrick Onyango</dc:creator>
      <description>The story behind kilelearchade.co.ke: why I built a CBC-focused AI tutor in Nairobi, how it took shape, and what shipping to real classrooms taught me.</description>
      <category>Product Engineering</category>
      <category>EdTech</category>
      <category>CBC curriculum</category>
      <category>AI tutor</category>
      <category>Supabase</category>
      <category>product launch</category>
      <category>Nairobi</category>
      <content:encoded><![CDATA[<p>Posted by Fredrick Onyango on <a href="https://fredrickonyango.vercel.app/blog">https://fredrickonyango.vercel.app</a>.</p><p><em>The story behind kilelearchade.co.ke: why I built a CBC-focused AI tutor in Nairobi, how it took shape, and what shipping to real classrooms taught me.</em></p><h2>Why build an EdTech product in Kenya</h2><p>The CBC competence-based curriculum asks students to explore, and teachers to guide across large classes with limited resources. Generic chatbots do not know the CBC syllabus, a Kenyan school's notes or a student's actual competence level. I wanted an AI tutor grounded in the material students are actually examined on — built here in Nairobi, shipping to real classrooms.</p><p>Kilele Archade (kilelearchade.co.ke) is that product: document-based learning, an AI tutor that cites the source, quizzes with explanations, and separate dashboards for learners, teachers and parents.</p><h2>The architecture in one paragraph</h2><p>React and TypeScript on the front. Supabase and PostgreSQL behind it — with pgvector holding embeddings next to the relational rows for subjects, levels and competences, so retrieval is a query, not a separate service. Curriculum documents flow through an ingestion pipeline into chunks and vectors; the tutor answers only from retrieved context, with a fallback provider layer so a single AI vendor outage never reaches a student.</p><h2>What the classrooms changed</h2><p>Building alone gets you to 'it works'. Real users get you to 'it works for them'. Early teacher feedback moved the product more than any technical decision: answers had to show which document page they came from before teachers would trust the tutor at all; the tutor may explain and hint, but assessment sessions run with that context locked away.</p><h2>Solo, but not unmanaged</h2><p>One engineer holding product, frontend, backend, AI pipeline and deployments forces boring choices: one database, one hosting story, scripts for anything done twice, and a retrieval bench (see the Lab) so configuration changes are measured instead of argued with myself.</p><h2>Where it goes from here</h2><p>Kilele Archade is live at kilelearchade.co.ke and still evolving through classroom feedback. The next fronts are broader subject coverage, offline-friendly access for areas with patchy connectivity, and better analytics so a teacher sees a struggling student before report day does.</p><p>Read the full article at <a href="https://fredrickonyango.vercel.app/blog/building-kilele-archade-ai-learning-platform-kenya">https://fredrickonyango.vercel.app/blog/building-kilele-archade-ai-learning-platform-kenya</a>.</p>]]></content:encoded>
    </item>
    <item>
      <title>Role-Based Dashboards for Teachers, Students and Parents</title>
      <link>https://fredrickonyango.vercel.app/blog/role-based-dashboards-teachers-students-parents</link>
      <guid isPermaLink="true">https://fredrickonyango.vercel.app/blog/role-based-dashboards-teachers-students-parents</guid>
      <pubDate>Thu, 20 Aug 2026 00:00:00 GMT</pubDate>
      <dc:creator>Fredrick Onyango</dc:creator>
      <description>One platform, three very different users: how the teacher, student and parent model behind Kilele Archade handles roles, row-level security and privacy.</description>
      <category>System Architecture</category>
      <category>row-level security</category>
      <category>access control</category>
      <category>role-based dashboards</category>
      <category>privacy</category>
      <category>Supabase</category>
      <category>multi-tenant</category>
      <content:encoded><![CDATA[<p>Posted by Fredrick Onyango on <a href="https://fredrickonyango.vercel.app/blog">https://fredrickonyango.vercel.app</a>.</p><p><em>One platform, three very different users: how the teacher, student and parent model behind Kilele Archade handles roles, row-level security and privacy.</em></p><h2>Three users, three different questions</h2><p>A student opens the app asking 'what do I learn next?'. A teacher asks 'who is stuck?'. A parent asks 'is my child actually working?'. A single dashboard answering all three answers none of them well, so Kilele Archade ships one application with three distinct surfaces over the same data.</p><h2>The role model</h2><p>Roles attach at the relationship level, not just the account level: a teacher belongs to a class, a parent is linked to specific students, a student is enrolled in subjects. Every request resolves what the caller can see through those links before any content query runs.</p><h2>Enforcing it with row-level security</h2><p>Rather than trusting application code alone, visibility lives in Supabase policies: rows carry their class and linkage, and the database refuses reads that do not match the caller's role claims. A bug in one endpoint cannot turn into a data leak across the platform.</p><h2>The privacy boundary nobody mentions</h2><p>A parent should see that a child is engaging and progressing — not every answer they got wrong in a private study session. The dashboards were deliberately asymmetric: learners get granular self-view, guardians get aggregated signals, teachers get class-level detail. Same events, three zoom levels.</p><h2>What I would reuse</h2><p>Relationship-scoped roles, database-enforced visibility and zoom-level dashboards are not EdTech-specific. Any multi-sided product — clinics, gyms, tutoring, PropTech rentals like Apex — needs exactly this skeleton, and designing it early is much cheaper than retrofitting it after the first privacy conversation.</p><p>Read the full article at <a href="https://fredrickonyango.vercel.app/blog/role-based-dashboards-teachers-students-parents">https://fredrickonyango.vercel.app/blog/role-based-dashboards-teachers-students-parents</a>.</p>]]></content:encoded>
    </item>
    <item>
      <title>Building a RAG System for an Educational Platform</title>
      <link>https://fredrickonyango.vercel.app/blog/building-a-rag-system-for-an-educational-platform</link>
      <guid isPermaLink="true">https://fredrickonyango.vercel.app/blog/building-a-rag-system-for-an-educational-platform</guid>
      <pubDate>Thu, 18 Jun 2026 00:00:00 GMT</pubDate>
      <dc:creator>Fredrick Onyango</dc:creator>
      <description>How Kilele Archade grounds its AI tutor in real curriculum documents: ingestion, chunking, pgvector retrieval and provider fallback, not model memory.</description>
      <category>AI Engineering</category>
      <category>RAG</category>
      <category>retrieval-augmented generation</category>
      <category>embeddings</category>
      <category>pgvector</category>
      <category>LLM fallback</category>
      <category>chunking</category>
      <content:encoded><![CDATA[<p>Posted by Fredrick Onyango on <a href="https://fredrickonyango.vercel.app/blog">https://fredrickonyango.vercel.app</a>.</p><p><em>How Kilele Archade grounds its AI tutor in real curriculum documents: ingestion, chunking, pgvector retrieval and provider fallback, not model memory.</em></p><h2>The problem with 'chat, but for school'</h2><p>A general chatbot answering a CBC question is guessing. It was not trained on your syllabus, it does not know your school's notes, and it cannot tell you which page an answer came from. For Kilele Archade the requirement was the opposite: every AI answer had to be traceable to real curriculum material.</p><p>That is the case for Retrieval-Augmented Generation. The model does not answer from memory alone — it answers from retrieved context, and says where it got it.</p><h2>Ingestion: documents become searchable knowledge</h2><p>Curriculum PDFs and notes go through a pipeline: text extraction, cleaning, then chunking sized for retrieval rather than for reading. Each chunk is embedded into a vector and stored in PostgreSQL with pgvector, next to the relational rows that describe the subject, level and competence it belongs to.</p><p>Storing embeddings in the same database as the documents meant one security model (Supabase row-level security) and one backup story, instead of bolting on a separate vector service.</p><h2>Retrieval: nearest neighbours are only the start</h2><p>A raw top-k similarity search returned chunks that were related but not always useful. Two changes mattered most: filtering candidates by curriculum metadata before vector similarity, and re-ranking the retrieved passages before they went into the prompt.</p><p>The retrieval step became: filter to the right subject and level, pull nearest chunks with a pgvector index, re-rank, then assemble only the passages that fit the context budget.</p><h2>Generation: grounded answers with fallback</h2><p>The prompt template instructs the model to answer only from the supplied context and cite sources. If no provider responds — outage, rate limit — the request falls through to a secondary provider rather than failing in front of a student.</p><p>The fallback layer is deliberately boring: the same prompt, a different backend, and a log line so outages are visible instead of mysterious.</p><h2>What it bought us</h2><p>Answers students can verify, a tutor that works across at least two AI providers without either being a single point of failure, and a pipeline where improving retrieval is an engineering task (better chunking, better ranking) rather than hoping a bigger model fixes it.</p><p>Read the full article at <a href="https://fredrickonyango.vercel.app/blog/building-a-rag-system-for-an-educational-platform">https://fredrickonyango.vercel.app/blog/building-a-rag-system-for-an-educational-platform</a>.</p>]]></content:encoded>
    </item>
    <item>
      <title>Designing AI-Powered Learning Systems</title>
      <link>https://fredrickonyango.vercel.app/blog/designing-ai-powered-learning-systems</link>
      <guid isPermaLink="true">https://fredrickonyango.vercel.app/blog/designing-ai-powered-learning-systems</guid>
      <pubDate>Thu, 30 Apr 2026 00:00:00 GMT</pubDate>
      <dc:creator>Fredrick Onyango</dc:creator>
      <description>What building Kilele Archade taught me about where AI genuinely helps learners — and where plain software engineering does the job better.</description>
      <category>AI Engineering</category>
      <category>AI product design</category>
      <category>LLM integration</category>
      <category>assessment integrity</category>
      <category>education technology</category>
      <category>machine learning</category>
      <content:encoded><![CDATA[<p>Posted by Fredrick Onyango on <a href="https://fredrickonyango.vercel.app/blog">https://fredrickonyango.vercel.app</a>.</p><p><em>What building Kilele Archade taught me about where AI genuinely helps learners — and where plain software engineering does the job better.</em></p><h2>Start from the learner, not the model</h2><p>The first version of every question was: does this help a student understand a competence faster? Features like 'AI magic' that failed that question got cut. Dashboards, quizzes and document access did most of the heavy lifting before any model call was made.</p><h2>Where AI genuinely helped</h2><p>Three places earned their keep: answering questions grounded in the student's own materials, generating revision variants from existing content, and explaining a wrong quiz answer in context. In each case the AI was amplifying content the platform already had, not replacing it.</p><h2>Where ordinary engineering helped more</h2><p>Progress tracking, role management for teachers and parents, content versioning — none of that needs a model. Keeping those layers deterministic made the AI layer easier to trust, because the data going in and the audit coming out were exact.</p><h2>Assessment integrity</h2><p>An AI tutor next to an assessment system is a design tension. The split that worked: the tutor can explain, hint and revise, but assessment sessions run against a locked context with no tutor access. Learners get help while they learn, not while they are being measured.</p><h2>The loop that matters</h2><p>Watch where students actually struggle → change the smallest piece of the system that fixes it → measure again. Sometimes the fix is a better retrieval filter, sometimes it is one more sentence in a prompt, sometimes it is a plain UI change. Treating all three as the same engineering loop is the real lesson.</p><p>Read the full article at <a href="https://fredrickonyango.vercel.app/blog/designing-ai-powered-learning-systems">https://fredrickonyango.vercel.app/blog/designing-ai-powered-learning-systems</a>.</p>]]></content:encoded>
    </item>
    <item>
      <title>PostgreSQL and pgvector for AI Applications</title>
      <link>https://fredrickonyango.vercel.app/blog/postgresql-and-pgvector-for-ai-applications</link>
      <guid isPermaLink="true">https://fredrickonyango.vercel.app/blog/postgresql-and-pgvector-for-ai-applications</guid>
      <pubDate>Sat, 14 Feb 2026 00:00:00 GMT</pubDate>
      <dc:creator>Fredrick Onyango</dc:creator>
      <description>Why I chose to keep vectors and relational data in one PostgreSQL database — and what that trade actually costs and saves.</description>
      <category>Databases</category>
      <category>PostgreSQL</category>
      <category>pgvector</category>
      <category>vector search</category>
      <category>embeddings</category>
      <category>data modelling</category>
      <category>database architecture</category>
      <content:encoded><![CDATA[<p>Posted by Fredrick Onyango on <a href="https://fredrickonyango.vercel.app/blog">https://fredrickonyango.vercel.app</a>.</p><p><em>Why I chose to keep vectors and relational data in one PostgreSQL database — and what that trade actually costs and saves.</em></p><h2>The default move is a separate vector database. I didn't take it.</h2><p>Every AI stack article assumes a dedicated vector store. But Kilele Archade's vectors describe rows that already live in PostgreSQL — documents, subjects, competences. Splitting them across two systems meant two security models, two backups and a sync problem I did not need.</p><h2>What one database buys you</h2><p>Joins between embeddings and metadata are just SQL. Row-level security covers vectors and documents identically. Transactions mean a document and its embeddings appear or fail together. pgvector's index keeps similarity search fast enough for an app at this scale, and operational overhead stays close to zero.</p><h2>What it costs</h2><p>At very large scale, dedicated vector engines offer features pgvector does not: advanced quantisation, GPU search, complex filtering strategies. The honest engineering answer is that the platform is nowhere near the point where that matters, and the simpler system is the correct one until evidence says otherwise.</p><h2>Practical notes</h2><p>Pick an embedding dimension once and store it in a column, because changing models means re-embedding everything. Index after the corpus is big enough to matter, not before. Measure retrieval quality with a fixed question set before tuning anything.</p><p>Read the full article at <a href="https://fredrickonyango.vercel.app/blog/postgresql-and-pgvector-for-ai-applications">https://fredrickonyango.vercel.app/blog/postgresql-and-pgvector-for-ai-applications</a>.</p>]]></content:encoded>
    </item>
  </channel>
</rss>
