<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Francis Adediran on Medium]]></title>
        <description><![CDATA[Stories by Francis Adediran on Medium]]></description>
        <link>https://medium.com/@fran6_ca?source=rss-49351f97aa99------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*2YeSVeuHImF1e1zPOzhoMA.jpeg</url>
            <title>Stories by Francis Adediran on Medium</title>
            <link>https://medium.com/@fran6_ca?source=rss-49351f97aa99------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 21:41:43 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@fran6_ca/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Attitude that makes you a senior]]></title>
            <link>https://medium.com/@fran6_ca/the-attitude-that-makes-you-a-senior-800843c7f2e5?source=rss-49351f97aa99------2</link>
            <guid isPermaLink="false">https://medium.com/p/800843c7f2e5</guid>
            <dc:creator><![CDATA[Francis Adediran]]></dc:creator>
            <pubDate>Tue, 04 Aug 2026 22:00:08 GMT</pubDate>
            <atom:updated>2026-08-04T22:00:08.247Z</atom:updated>
            <content:encoded><![CDATA[<p>Let’s take a break from AI and talk about soft skill. One of the major attitude shifts I made in my career was to stop criticising or complaining about a process, code, or tool.<br>I’d call out the clunky stuff, missing/broken practices, the slow pipelines, the half-documented APIs. Sometimes, recommend solutions or start doing a practice. And then nothing really moved. The room got quieter, people got defensive, and the same problems sat there the next week.</p><p>So I flipped it. Not overnight, and not cleanly. Now when something frustrates me, i try to understand the problem and bring a possible solution.<br>A rough prototype. A small refactor I already started. A note in confluence(backed by data) that shows the workaround instead of just the complaint.<br>Leading by doing the fix, even if it’s imperfect.</p><p>It’s about raising awareness positively. It’s slower sometimes. You sit with the annoyance longer before speaking. But the conversations change. People lean in instead of shutting down. Ownership starts to feel shared instead of assigned.</p><p>Problems still show up, of course. Software development is full of them. The difference is I don’t stay stuck in the pointing. I move toward the mending.</p><p>That single change: “complain less, fix more, show the path instead of just the pothole” has quietly altered how I show up and how the work feels.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=800843c7f2e5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My Top 5 LLM Cost Saving Techniques that Every AI Engineer Should Know]]></title>
            <link>https://medium.com/@fran6_ca/my-top-5-llm-cost-saving-techniques-that-every-ai-engineer-should-know-eac8048566a8?source=rss-49351f97aa99------2</link>
            <guid isPermaLink="false">https://medium.com/p/eac8048566a8</guid>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[Francis Adediran]]></dc:creator>
            <pubDate>Tue, 07 Jul 2026 14:50:42 GMT</pubDate>
            <atom:updated>2026-07-07T14:50:42.433Z</atom:updated>
            <content:encoded><![CDATA[<p>My Top 5 AI LLM Cost Saving Techniques that Every AI Engineer Should Know</p><p>One of the most shocking surprise that comes after deploying an AI application to production is the <strong>bill</strong>. I have built over 10 AI applications( chatbots, copilots, AI agents) and in 100% of those applications, our bill have grown 99x faster than our user base.</p><p>7 out of the 10 AI applications have been put behind a rate limiter or closed to selected number of users.</p><p>This is quite disheartening for an AI engineer because i like to see my applications being used by a record number of users. So i spent the last couple of months researching and trialling techniques to save cost. These are what i found:</p><h3>1. Implement Semantic caching</h3><p>A question can be expressed in multiple ways. For example, these three questions mean the same thing.</p><p>“How do I deploy my application to production?”</p><p>“What’s the best way to push my changes to the production environment?”</p><p>“I’m ready to release my code to prod — how should I do it safely?”</p><p>Most AI applications will send the all three questions to an LLM.</p><p>A better architecture will be below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/290/0*Nv-4P56hGMXHi9vB.png" /></figure><p>With this architecture, you save:</p><p>- processing time<br>- token usage from fewer LLM calls.</p><p>Example code is on my <a href="https://gist.github.com/francis04j/0555cc450092fa5183c315ff7ee8ef90">github</a></p><h3>2. Compress Conversation History</h3><p>Similar to caching, you can summarise older messages.</p><p>const summary = await summariseConversation(history);</p><p>messages = [</p><p>{ role: &quot;system&quot;, content: summary },</p><p>...latestMessages</p><p>];</p><p>summariseConversation(history):</p><p>//use smaller or cheaper model</p><p>This is mostly efficient when the conversation is long enough. I’ll recommend over two pages.</p><p>This saves token usage.</p><h3>3. Use Smaller Models Whenever Possible</h3><p>I’ll recommend using smaller models for tasks that you can predetermine.</p><p>For routine, common, operation (Foundational) tasks, i’ll use small, cheap models</p><ul><li>Sentiment analysis</li><li>Classification</li><li>FAQ responses</li><li>Data extraction</li><li>Content moderation</li><li>Summarization</li><li>Categorization</li></ul><p>For complex, high impact, strategic (High value) tasks, i’ll recommend using cheap and premium models. However, use the premium models to review the output of the cheap models.</p><ul><li>Coding assistance: cheap models write code, premium models review</li><li>Research workflows</li><li>Agent orchestration: Use premium models to organise and delegate work to cheap models</li></ul><p>Sometimes you cant tell if a user’s request is a simple or complex task, this is where you use a small model to classify the task and then route the request to the appropiate model</p><pre><br>type Complexity = &quot;low&quot; | &quot;medium&quot; | &quot;high&quot;;<br>type ModelName = &quot;kimi&quot; | &quot;claude-sonnet&quot; | &quot;gpt-6&quot;;<br><br><br>async function routeRequest(query: string): Promise&lt;string&gt; {<br>  const complexity: Complexity = await classifyComplexity(query);<br><br>  if (complexity === &quot;low&quot;) {<br>    return callModel(&quot;kimi&quot;, query);<br>  }<br>  if (complexity === &quot;medium&quot;) {<br>    return callModel(&quot;claude-sonnet&quot;, query);<br>  }<br>    <br>  return callModel(&quot;gpt-6&quot;, query);<br>}</pre><h3>4. Distill Premium models</h3><p>Model distillation is a technique where premium models teaches a smaller, cheaper model. The goal is to get the smaller model to behave similarly to the prenium one on specific tasks.</p><p>Note, this is difference from training the small model from scratch on massive raw data.</p><p>A common pattern is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VwhTJtrG27AMU88TuuU6Dg.png" /></figure><p><em>I’m currently in the process of using this technique. I will blog about my findings.</em></p><p>A lot of large companies and enterprise production AI systems use distillation because running the biggest models (like GPT-4 class or Claude) for every single user request is extremely expensive in terms of compute, GPUs, electricity, and latency.</p><p>Deepseek, OpenAI and Nvidia famously use this technique.</p><h3>5. Measure cost</h3><p>There is a famous quote that says “What gets measured gets managed.” From experience, these are useful metrics to take note of</p><ul><li>Cost per request</li><li>Token usage</li><li>Cache hit rate</li><li>Prompt size</li><li>Cost per user</li><li>Average latency</li></ul><h3>Bonus</h3><p>A friend told me this technique recently. Using an image or screenshot of an large, thousands of words input text is cheaper than copying and pasting the input text into the prompt. I’ll verify this soon but it sounds reasonable because most major providers (like OpenAI or Anthropic) charge a flat rate based on image resolution (e.g.1024 x1024 image might cost a fixed 850 tokens). If you are pasting a massive, thousands-of-words document, converting it to an image <em>can</em> occasionally be cheaper.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eac8048566a8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Don’t Let AI Rob You of Your Fundamentals]]></title>
            <link>https://medium.com/@fran6_ca/dont-let-ai-rob-you-of-your-fundamentals-4f92d06bf502?source=rss-49351f97aa99------2</link>
            <guid isPermaLink="false">https://medium.com/p/4f92d06bf502</guid>
            <dc:creator><![CDATA[Francis Adediran]]></dc:creator>
            <pubDate>Thu, 18 Jun 2026 22:57:58 GMT</pubDate>
            <atom:updated>2026-06-18T22:57:58.249Z</atom:updated>
            <content:encoded><![CDATA[<p>Just wanted to share some honest thoughts about AI and software engineering.</p><p>Everyone is talking about AI these days. I’ve been asked my opinion many times, so here it is.</p><p>To me, software engineering is not just a job. It’s an art. It’s about building systems that fit together perfectly. The real joy comes from the journey. Crafting the initial pseudo-code, rough sketching the system design, debugging tough problems, hitting walls, and figuring things out.</p><p>Knowing the fundamentals of software engineering is more important than ever.</p><p>Why?</p><p>They let you understand why something is happening, not just copy a solution.</p><p>Fundamentals like how:</p><p>-Understanding how language frameworks and library work</p><p>-Writing efficient database queries</p><p>-System design and architecture</p><p>-Building effective logs.</p><p>-Working with logs</p><p>-Knowing how connections work</p><p>-Knowing how different cloud resources actually behave</p><p>These core skills and knowledge help you go beyond what AI gives you. They let you understand why something is happening, not just copy a solution.</p><p>I would never let AI build something from scratch. That would take away the fun and the learning. It’s like pressing a button for AI to finish Elden Ring game for you.</p><p>AI is great for removing small obstacles, but the deep satisfaction comes from struggling through the hard parts yourself. That’s how real growth happens and how you create work you can truly be proud of.</p><p>If you have that spark for building and problem-solving, please don’t let it go out. Keep the fundamentals strong and keep that inner fire burning.</p><p>What about you? How do you balance using AI while staying strong on the fundamentals?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4f92d06bf502" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Agentic Programming: A Roadmap - part 2]]></title>
            <link>https://medium.com/@fran6_ca/agentic-programming-a-roadmap-part-2-b1801807b051?source=rss-49351f97aa99------2</link>
            <guid isPermaLink="false">https://medium.com/p/b1801807b051</guid>
            <dc:creator><![CDATA[Francis Adediran]]></dc:creator>
            <pubDate>Tue, 16 Jun 2026 00:09:11 GMT</pubDate>
            <atom:updated>2026-06-16T00:09:11.160Z</atom:updated>
            <content:encoded><![CDATA[<h3>How Agents Actually Work</h3><p><strong>The Agent Loop</strong><br>Every agent runs on a loop. It doesnt matter how complex the system around is, they all do this.</p><p>It receives a goal -&gt; reasons about what to do -&gt; takes an action — observes the result -&gt; reasons again -&gt; takes an action -&gt;<br>until the goal is achieved or it determines that it cannot proceed without input.</p><p>This is the ReAct pattern in its most fundamental form. Here is what that loop looks like on a real task:</p><pre>Goal: &quot;Research the pricing and key features of the top three<br>AI powered IDE and produce a comparison document.&quot;<br> <br>Loop Iteration 1<br>Thought: I need current pricing for the top tools. Start with<br>a broad search to confirm which three are most relevant.<br>Action: web_search(&quot;top AI powered IDE 2026 market share&quot;)<br>Observation: Claude Code, Windsurf, and Github Copilot appear as the top three<br>across multiple sources.<br> <br>Loop Iteration 2<br>Thought: I have the IDEs. Now research each one&#39;s pricing separately.<br>Action: web_search(&quot;Github Copilot pricing plans 2026&quot;)<br>Observation: Github Copilot: Free, Starter ($19.99/user/mo), Advanced ($34.99/user/mo)<br> <br>Loop Iterations 3 and 4<br>[Same pattern for Windsurf and Claude Code]<br> <br>Loop Iteration 5<br>Thought: I have all the data I need. Time to produce the document.<br>Action: write_file(&quot;comparison.md&quot;, [structured comparison content])<br>Observation: File written successfully.<br> <br>Final Output: comparison.md saved to working directory.</pre><p>This loop pattern is what separate an agent from chatbot or regular program. An agent never jumps from goal to output in one step.</p><p>You will notice an “Action” step in the Agent loop example detailed above. Every action that an agent takes in this world requires a tool call. Designing the tool that an agent uses is one of the most recurring thing you will do in Agentic programming.</p><h3>Tool Design</h3><p>Tools are the agent’s hands. Every action it takes is a tool call. Every search, every file operation, every API call etc is a tool call. The quality of your tool design directly determines the reliability of your agent.</p><p>According to Anthropic’s engineering team, bloated or ambiguous tool sets are one of the most common failure modes in production agents.</p><p>So when it comes to tools. Keep It Simple. You must be able to tell which tool does what easily. Otherwise, your agent will not be able to either.</p><p>A simple example showing Weak tool design vs Strong one.</p><pre># Weak -- too vague, no boundaries<br>tools = [<br>    {<br>        &quot;name&quot;: &quot;search&quot;,<br>        &quot;description&quot;: &quot;Search for information online&quot;<br>    }<br>]<br> <br># Strong -- one job, explicit use case, boundary condition included<br>tools = [<br>    {<br>        &quot;name&quot;: &quot;web_search&quot;,<br>        &quot;description&quot;: (<br>            &quot;Search the public web for current information on a topic. &quot;<br>            &quot;Use when you need facts, news, or data that may have changed &quot;<br>            &quot;recently or is not in your training knowledge. &quot;<br>            &quot;Do NOT use for documents already provided in the task context.&quot;<br>        ),<br>        &quot;input_schema&quot;: {<br>            &quot;type&quot;: &quot;object&quot;,<br>            &quot;properties&quot;: {<br>                &quot;query&quot;: {<br>                    &quot;type&quot;: &quot;string&quot;,<br>                    &quot;description&quot;: &quot;Specific search query, 3-8 words. Be targeted.&quot;<br>                },<br>                &quot;max_results&quot;: {<br>                    &quot;type&quot;: &quot;integer&quot;,<br>                    &quot;description&quot;: &quot;Number of results to return. Default 5, max 10.&quot;,<br>                    &quot;default&quot;: 5<br>                }<br>            },<br>            &quot;required&quot;: [&quot;query&quot;]<br>        }<br>    }<br>]</pre><p>Notice the boundary condition “<strong>Do NOT use for documents already in the task context</strong>”. That prevents the agent from searching for information it already has, wasting tokens and API calls.</p><p>That kind of explicit boundary is what separates tools that work reliably in production from tools that work reliably in demos.</p><p>Before we jump into coding our first AI agent, we need to decide which Framework to use.</p><h3>Agentic Frameworks</h3><p>An agentic framework is a software toolkit that is used to build, manage, and coordinate AI agents. In simple terms, they give you boilerplate code and abstract away the foundational structures that you need to build an AI agent.</p><p>They give you library code that you can use to control how an Agent thinks and routes code (Orchestration), how an agent uses tools (tools integration), how to manage an agent’s memory (Memory/Context Management) and how to organise multiple agents to work together (Multi-Agent Coordination).</p><p>My top two favourites Agentic Frameworks are <a href="https://info.langchain.com/agent-orchestration">LangGraph</a> and <a href="https://github.com/microsoft/semantic-kernel">Microsoft Semantic Kernel</a>. There are also CrewAI, LlamaIndex and PydanticAI.</p><p>Below is an example of our Agent using langgraph framework</p><pre>from langgraph.graph import StateGraph, END<br>from typing import TypedDict<br><br>class ResearchState(TypedDict):<br>    goal: str<br>    findings: list<br>    final_report: str<br><br>def plan_research(state: ResearchState):<br>    # TODO: implement<br>    return {&quot;findings&quot;: [&quot;query1&quot;, &quot;query2&quot;]}<br><br>def execute_searches(state: ResearchState):<br>    # TODO: implement<br>    return {&quot;findings&quot;: state[&quot;findings&quot;] + [&quot;result1&quot;, &quot;result2&quot;]}<br><br>def write_report(state: ResearchState):<br>    # TODO: implement<br>    return {&quot;final_report&quot;: &quot;Final report here...&quot;}<br><br>workflow = StateGraph(ResearchState)   # or StateGraph(state_schema=ResearchState)<br><br>workflow.add_node(&quot;plan&quot;, plan_research)<br>workflow.add_node(&quot;search&quot;, execute_searches)<br>workflow.add_node(&quot;write&quot;, write_report)<br><br>workflow.set_entry_point(&quot;plan&quot;)<br>workflow.add_edge(&quot;plan&quot;, &quot;search&quot;)<br>workflow.add_edge(&quot;search&quot;, &quot;write&quot;)<br>workflow.add_edge(&quot;write&quot;, END)<br><br>agent = workflow.compile()<br>result = agent.invoke({<br>    &quot;goal&quot;: &quot;Compare pricing for the top 3 CRM tools&quot;,<br>    &quot;findings&quot;: [],<br>    &quot;final_report&quot;: &quot;&quot;<br>})<br>print(result[&quot;final_report&quot;])</pre><p>Anthropic Claude API (Direct) is another popular option that i see. From personal experience, you need to be building specifically on Claude to use this API. However, it gives you everything that other frameworks will give. From tool use, streaming, and Model Context Protocol (MCP) and memory management. It is best if you want to run your Agents on your computer or do a lot of MCP integration.</p><h3>Memory Management</h3><p>An agent without memory cannot learn from the past tasks, reference what it knew before this session, or improve. Production agents use three types of memory simultaneously.</p><ol><li><strong>Short-term memory: </strong>This is the live context window. It has everything the agent knows about the current task: the goal, tool results accumulated so far, and reasoning steps taken. It is fast, readily available but finite. It is easily affected as the agent does more tasks and results stack up.</li><li><strong>Long-term memory</strong> lives outside the context window in a vector database, a store of knowledge the agent queries during a task. When a customer service agent needs a specific policy, a previous case, or a product detail, it queries its vector store and retrieves only the relevant chunk.</li><li><strong>Episodic memory</strong> is the record of past runs: what actions the agent took, what worked, what failed, and what it should do differently next time. Most beginners skip this layer. Most production teams add it eventually when they realize their agents are repeating the same mistakes across sessions.</li></ol><p>We’ve covered the fundamentals needed to build a basic production grade AI agent. In the next article, we will build our AI agent. Stay tuned</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b1801807b051" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Roadmap to Agentic Programming]]></title>
            <link>https://medium.com/@fran6_ca/roadmap-to-agentic-programming-664f0bf32a28?source=rss-49351f97aa99------2</link>
            <guid isPermaLink="false">https://medium.com/p/664f0bf32a28</guid>
            <dc:creator><![CDATA[Francis Adediran]]></dc:creator>
            <pubDate>Fri, 12 Jun 2026 16:40:58 GMT</pubDate>
            <atom:updated>2026-06-12T16:40:58.998Z</atom:updated>
            <content:encoded><![CDATA[<p>How i went from prompting LLMs to building production-grade AI agents.</p><p>In this article, you will learn the basic concepts behind agentic programming, how to solve problems using agents, what production-grade AI agents look like, and a month-to-month learning roadmap that ends with a working production agent.</p><p>What is Agentic Programming?</p><p>Agentic programming is a way of designing software where an AI model is the decision-making engine. In a non-agentic programming (normal one), the logic and control flow of the software is pre-determined.</p><p>We call a system that is built using Agentic programming an Agentic system.</p><p>An agentic system, regardless of framework or programming language, is made of these components:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M9JVXCIDrxjLtR4FK2adxw.png" /><figcaption>Components of an Agentic systems</figcaption></figure><h3>Basic fundamentals to know</h3><ol><li>A programming language: I’ll recommend python because it’s popular with building AI agent. That means you can easily find examples, libraries, forums and help in general. C# will be another suitable one. The Microsoft ecosystem for AI is strong.</li><li>How LLM works: I’ll say just have these four concepts at the back of your mind.<br>2a. <strong>Tokenisation</strong>: why long inputs cost more and behave differently. I wrote an article about it <a href="https://open.substack.com/pub/francisadediran/p/why-long-prompts-cost-more-and-behave?r=2i8xmt&amp;utm_campaign=post&amp;utm_medium=web&amp;showWelcomeOnShare=true">here</a><br>2b. <strong>Context windows:</strong> why agent performance degrades as tasks get longer<br>2c. <strong>Temperature and sampling:</strong> why outputs vary and how to control that.<br>2d. <strong>Tools and API usage patterns:</strong> When to use MCP or API, how to structure calls, handle rate limits, and parse responses.</li><li>Math: Not a lot of math or something deep. You just need to know: <strong>Vectors and embeddings. </strong>Some basic knowledge on vector similarity search is needed to know how to design the memory architecture for your agents. <br>Oh, you also need basic probability because you think about model uncertainty, confidence level, and why the same prompt produces different outputs.</li></ol><p>In the next article, we will go over how Agents work. What is the agent loop, different types of agent’s memory and tool design.</p><p>Subscribe to follow and hear more</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=664f0bf32a28" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Step-by-Step Guide: Coding with a Local LLM or AI Agent]]></title>
            <link>https://medium.com/@fran6_ca/step-by-step-guide-coding-with-a-local-llm-or-ai-agent-9cd9cdf2cb8a?source=rss-49351f97aa99------2</link>
            <guid isPermaLink="false">https://medium.com/p/9cd9cdf2cb8a</guid>
            <dc:creator><![CDATA[Francis Adediran]]></dc:creator>
            <pubDate>Mon, 06 Apr 2026 14:33:56 GMT</pubDate>
            <atom:updated>2026-04-06T14:33:56.439Z</atom:updated>
            <content:encoded><![CDATA[<p>These days, coding with LLM usually incur a cost. These long holiday, i’ve been looking at using local LLMs and AI agents for code and image generation.</p><p>In this article, I’ll walk you through how a developer can set up and use these tools locally on their machine. Running locally means everything happens on your hardware (e.g., CPU, GPU, or even a laptop), without sending data to cloud services like OpenAI’s API. This is good for privacy, lower latency, and no ongoing costs, but it requires decent hardware (at least 8GB RAM for small models; a GPU like NVIDIA with 8–24GB VRAM for better performance).</p><h4>Step 1: Prepare Your Hardware and Environment</h4><ul><li><strong>Hardware Check</strong>: Ensure your machine has Python 3.10+ installed.</li></ul><p>For better experience, use a GPU (NVIDIA CUDA-compatible for acceleration). Tools like Ollama or Hugging Face can fall back to CPU if needed, but GPU speeds things up 10x times.</p><ul><li><strong>Install Dependencies</strong>:</li></ul><p>&gt; Install Git from git-scm.com and Python from python.org.</p><p><strong>&gt; Choose a Runner/Framework</strong>: Use a user-friendly tool to host the LLM locally. Popular options:</p><ul><li><strong>Ollama</strong>: Easiest for beginners. Download from ollama.com and run ollama serve to start a local server.</li><li><strong>LM Studio</strong>: (Personal favourite) GUI-based (lmstudio.ai) for managing models without code.</li><li><strong>LangChain or LlamaIndex</strong>: For building agents on top of LLMs.</li></ul><h4>Step 2: Download and Load a Local LLM Model</h4><ul><li><strong>Select a Model</strong>: Choose quantized models (e.g., 4-bit or 8-bit) to fit in memory. Download from Hugging Face (huggingface.co/models) or via tools like Ollama.</li><li><strong>Download Process</strong>:</li><li>With Ollama: ollama pull llama3 (downloads and quantizes automatically).</li><li>With Hugging Face: In Python, from huggingface_hub import snapshot_download; snapshot_download(repo_id=”meta-llama/Llama-3–8B-Instruct”, local_dir=”models/llama3&quot;).</li><li>Load the Model: In Python (using Transformers):</li><li>Python</li><li>from transformers import pipeline generator = pipeline(&quot;text-generation&quot;, model=&quot;models/llama3&quot;, device=0) # device=0 for GPU</li><li>Test It: Generate a simple prompt like “Write a Python function to reverse a string.” The model outputs code.</li></ul><h4>Step 3: Integrate into Your Coding Workflow</h4><ul><li><strong>Basic Code Generation</strong>:</li><li>Use the LLM via command-line or IDE. For example, in a terminal with Ollama: ollama run llama3 “Generate a Python script for a web scraper.”</li><li>In VS Code: Install extensions like <strong>“Continue” (continue.dev) </strong>or <strong>“CodeGPT”</strong> that connect to local models. Set it up to query your local LLM for autocompletions or explanations.</li><li><strong>Interactive Coding</strong>:</li><li>Prompt Engineering: Be specific, e.g., “As a Python expert, refactor this code: [paste code]. Explain changes.”</li><li>Debugging: “Why does this code throw a KeyError? [paste code]. Suggest fixes.”</li><li>For Images: If your project involves visuals (e.g., generating diagrams), use a local image model (see examples below). Prompt: “Generate code to plot a sine wave using Matplotlib,” then run it.</li><li><strong>Building AI Agents</strong>:</li><li>Agents add autonomy (e.g., chaining tasks like “research, code, test”). Use LangChain: Install pip install langchain, then create an agent:</li></ul><p>Python</p><ul><li>from langchain import LLMChain, PromptTemplate from langchain.llms import HuggingFacePipeline # Wrap your local model llm = HuggingFacePipeline.from_model_id(model_id=&quot;models/llama3&quot;, task=&quot;text-generation&quot;) prompt = PromptTemplate(input_variables=[&quot;task&quot;], template=&quot;As a coding agent, {task} step by step.&quot;) chain = LLMChain(llm=llm, prompt=prompt) response = chain.run(&quot;Build a simple Flask API for user login.&quot;)</li><li>Run the agent locally to generate, execute, and iterate on code.</li></ul><h4>Step 4: Handle Image Generation Locally</h4><ul><li>If your coding involves visuals (e.g., UI mockups, data viz, or creative assets), integrate local Stable Diffusion.</li><li><strong>Setup</strong>:</li><li>Install Automatic1111’s Stable Diffusion WebUI (github.com/AUTOMATIC1111/stable-diffusion-webui). Clone the repo, run webui.sh, and access via browser.</li><li>Download models from Civitai or Hugging Face (e.g., “Stable Diffusion 3”).</li><li><strong>Usage in Coding</strong>:</li><li>Prompt the LLM to generate image prompts, then feed to SD: E.g., LLM prompt: “Create a prompt for an image of a futuristic city.” Output: “A cyberpunk cityscape at night…” Then use SD to generate.</li><li>Automate: Use Python’s diffusers library (pip install diffusers):</li><li>Python</li><li>from diffusers import StableDiffusionPipeline pipe = StableDiffusionPipeline.from_pretrained(&quot;CompVis/stable-diffusion-v1-4&quot;).to(&quot;cuda&quot;) image = pipe(&quot;A dragon in a castle&quot;).images[0] image.save(&quot;dragon.png&quot;)</li><li>Tie to Code: Use LLM to write scripts that generate images as part of a project (e.g., game assets).</li></ul><h4>Step 5: Optimize and Iterate</h4><ul><li><strong>Performance Tips</strong>: Start with smaller models (7B params) on modest hardware. Use quantization (e.g., GGUF format via Ollama) to reduce memory. Monitor with nvidia-smi.</li><li><strong>Security/Privacy</strong>: Since it’s local, no data leaves your machine — ideal for sensitive code.</li><li><strong>Testing</strong>: Always review LLM-generated code for errors. Run unit tests.</li><li><strong>Scaling</strong>: For complex projects, chain multiple models (e.g., one for code, one for images) in a local agent script. I found this</li><li><strong>Troubleshooting</strong>: If models are slow, try distilled versions or CPU-only. Communities like Reddit’s r/LocalLLaMA are great for help.</li></ul><h3>Examples of Local LLM Models and Agents</h3><p>Here are popular, open-source options as of 2026 (focus on coding-capable ones; all runnable via Ollama, LM Studio, or Transformers). I’ve prioritized models fine-tuned for code/instructions.</p><h4>LLM Models for Code Generation:</h4><ul><li><strong>Llama 3.1 (Meta)</strong>: 8B to 405B params. Excellent for coding tasks. Example: ollama pull llama3.1. Great for generating Python, JS, or SQL. Strengths: Logical reasoning, handles long contexts.</li><li><strong>CodeLlama (Meta)</strong>: Llama variant tuned for code (7B-70B). ollama pull codellama. Ideal for autocompleting functions or writing algorithms.</li><li><strong>Mistral-Nemo (Mistral AI)</strong>: 12B params, efficient on mid-range hardware. ollama pull mistral-nemo. Strong in multilingual code and quick inference.</li><li><strong>Phi-3 (Microsoft)</strong>: Small (3.8B-14B), runs on laptops. ollama pull phi3. Perfect for lightweight coding assistance, like debugging snippets.</li><li><strong>Gemma 2 (Google)</strong>: 9B-27B, code-focused. ollama pull gemma2. Good for creative coding, e.g., game logic.</li></ul><p>Start with Ollama + Llama 3 for simplicity — it’s free, quick to set up, and powerful for most developers. If you hit hardware limits, consider cloud-like local setups with multiple machines via tools like Ray. Experiment and iterate!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9cd9cdf2cb8a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Slashed API Latency 11× Without Touching a Line of Frontend Code]]></title>
            <link>https://towardsdev.com/how-we-slashed-api-latency-11-without-touching-a-line-of-frontend-code-9de14b849012?source=rss-49351f97aa99------2</link>
            <guid isPermaLink="false">https://medium.com/p/9de14b849012</guid>
            <category><![CDATA[performance]]></category>
            <category><![CDATA[data-intensive]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[postgres]]></category>
            <category><![CDATA[api]]></category>
            <dc:creator><![CDATA[Francis Adediran]]></dc:creator>
            <pubDate>Thu, 19 Mar 2026 03:16:18 GMT</pubDate>
            <atom:updated>2026-04-01T07:42:45.894Z</atom:updated>
            <content:encoded><![CDATA[<p>As a Software Engineer, I frequently encounter performance bottlenecks in data-intensive applications. Today, i’ll like to share an account of how we systematically addressed latency in an endpoint serving paginated transaction data from a PostgreSQL table containing over 1 million records.</p><h3>System Overview</h3><p>Our frontend application interacts with a Univorn-based Python API, which in turn queries a PostgreSQL database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a4-QZqdL2k2TFmC4BHBjLQ.png" /></figure><p>The underlying table is deliberately denormalized and flat, with no foreign keys. This design choice optimizes for the predominant access pattern: multi-column filtering combined with pagination, rather than relational joins or full-text search. Denormalization is a well-established technique for improving read performance in read-heavy workloads by eliminating expensive joins, as widely documented in database literature (e.g., Couchbase’s comparison of normalization vs. denormalization, and discussions on when to denormalize for query speed in PostgreSQL contexts).</p><p>TRANSACTIONS table</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xGMLiyd9SN23UMiHEiGDXw.png" /></figure><p><strong>Note:</strong> The table comprises 59 columns in total. While wide tables increase storage needs and can complicate writes, they significantly accelerate filter-and-paginate queries on large datasets by avoiding multi-table access. This trade-off favors read performance in analytics-style or dashboard workloads where reads vastly outnumber writes.</p><h3>Initial Performance Characteristic</h3><p>The /transactions/all endpoint (with default pagination: first page, no filters) required approximately <strong>3.5 seconds</strong> to return the initial 100 rows.</p><p>Analysis revealed the root cause: the API layer was performing a full table scan (SELECT * FROM transactions), materializing the entire result set (~500k+ rows) in Python memory, then applying offset/limit slicing and serialization.</p><p>This approach was extremely inefficient in terms of:</p><ul><li>Network transfer volume</li><li>Application server memory pressure</li><li>CPU time spent on unnecessary deserialization / slicing</li></ul><h3>Optimization 1 — Push Filtering &amp; Pagination to the Database (Server-Side Pagination)</h3><p>We refactored the query logic to apply WHERE, ORDER BY, LIMIT and OFFSET clauses <strong>directly in SQL</strong>. Only the requested 100 rows travel from PostgreSQL → API → frontend.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NGvpf5dGIr4mZXx2xMJmOQ.png" /></figure><p>Database-side pagination is considered a best practice for large datasets. Why? It minimizes the size of data transferred. It reduces client memory usage, i.e. the Python API uses less memory thus improves performance.</p><p><strong>Result:</strong> Average response time dropped to <strong>~1.8 seconds</strong> — roughly a 48% improvement from reduced data transfer and elimination of full-dataset materialization in Python.</p><p>Cache invalidation was done with three techniques:</p><ol><li>Time based cache expiration.</li><li>The ETL (or application) that ingest data into the database invalidates the cache.</li><li>Manual cache invalidation by deleting record in Redis</li></ol><h3>Optimization 2 — Introduce Distributed Caching (Redis)</h3><p>Recognizing that many requests share identical filter + pagination parameters (especially the common “first page, no filters” case), we added a Redis-based cache.</p><p>The cache key is a deterministic hash derived from the normalized request parameters (filters, page, limit, sort, etc.). Hashing request parameters into cache keys is a standard technique for creating canonical, collision-resistant identifiers for parameterized queries.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GCaJdzldytDwPAOgl8dVHA.png" /></figure><p><strong>Result:</strong> Average response time fell to <strong>~800 ms</strong> for cache hits — a further ~55% reduction.</p><h3>Optimization 3 — Add Process-local In-memory Cache (Multi-Level Caching)</h3><p>Observing that the “first page, no filters” request pattern dominates traffic (often triggered on page load or refresh), we introduced a small in-process LRU cache (e.g., using Python’s functools.lru_cache with bounded size or a dedicated dict with TTL eviction).</p><p>This creates a classic multi-level caching architecture: L1 (fast, local in-memory) → L2 (distributed Redis) → database. Multi-level caching is a proven pattern for high-traffic APIs, combining sub-millisecond local hits for hot data with shared consistency across instances via Redis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s0_nyZSB3eqT56gmygyxjw.png" /></figure><p><strong>Result:</strong> latency improved to <strong>~300 ms</strong> on average. <br>This is clearly a significant step forward. Eliminating Redis round-trip overhead for hot keys helped.</p><p>Cache invalidation was done with four techniques:</p><ol><li>Time based cache expiration.</li><li>The ETL (or application) that ingest data into the database invalidates the Redis cache by making an API call to redis</li><li>The ETL (or application) that ingest data into the database invalidates the In-memory cache by making an API call to Python API</li><li>Manual cache invalidation by deleting record in Redis and in-memory app itself</li></ol><h3>Future Considerations</h3><p>Additional latency reduction opportunities remain, notably client-side caching in the browser (e.g., using <strong>ETag / If-None-Match</strong> or <strong>service-worker strategies</strong>). Cache invalidation in this scenario presents interesting challenges. How do you ensure consistency when underlying transaction data changes.</p><p>We thought of <strong>table partitioning. </strong>I foresee<strong> </strong>the dataset growing significantly beyond current scale (e.g., toward 10M+ rows). <strong>Range partitioning</strong> on a transaction timestamp column could be effective for this type of data:</p><ul><li>PostgreSQL’s declarative range partitioning excels with time-series or transaction data, enabling <strong>partition pruning</strong> — the query planner automatically excludes irrelevant partitions when queries include time-range filters (common in paginated dashboard views showing recent data).</li><li>Smaller per-partition indexes improve cache efficiency, autovacuum performance, and index maintenance.</li><li>It simplifies lifecycle management: old partitions can be detached/dropped quickly instead of running expensive DELETE operations, which is ideal for retaining only recent transactions while archiving or purging historical ones.</li></ul><p>Range partitioning on timestamp aligns far better with typical transaction fetching patterns (e.g., “show latest 100”, “filter last 30 days”) than other keys, providing pruning benefits even for unfiltered recent-page queries when most traffic targets current data.</p><p>We plan to monitor table growth, query patterns (especially time-based filters), and maintenance metrics before pursuing a partitioning migration, which involves schema changes and data backfill.</p><p>We plan to explore these techniques, along with invalidation strategies (time-based, event-driven via PostgreSQL LISTEN/NOTIFY, or write-through patterns), in a follow-up discussion.</p><p>As you can see the changes i applied collectively reduced end-to-end latency from 3.5 seconds to ~300 ms. That is roughly an <strong>11× improvement </strong>while preserving correctness and scalability characteristics.</p><p>What do you think? Share your thoughts below</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9de14b849012" width="1" height="1" alt=""><hr><p><a href="https://towardsdev.com/how-we-slashed-api-latency-11-without-touching-a-line-of-frontend-code-9de14b849012">How I Slashed API Latency 11× Without Touching a Line of Frontend Code</a> was originally published in <a href="https://towardsdev.com/">Towards Dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Master your day]]></title>
            <link>https://medium.com/@fran6_ca/master-your-day-3ee84f87bce4?source=rss-49351f97aa99------2</link>
            <guid isPermaLink="false">https://medium.com/p/3ee84f87bce4</guid>
            <category><![CDATA[early-riser]]></category>
            <category><![CDATA[poem]]></category>
            <category><![CDATA[morning-routines]]></category>
            <dc:creator><![CDATA[Francis Adediran]]></dc:creator>
            <pubDate>Sun, 04 Jan 2026 19:43:22 GMT</pubDate>
            <atom:updated>2026-01-04T19:43:22.843Z</atom:updated>
            <content:encoded><![CDATA[<p>rise before the sun can climb<br>let the morning be your time<br>every moment, clear and bright<br>sets the tone from dark to light</p><p>win the hours while they are still<br>let your focus guide your will<br>small victories build the day<br>and keep the worries far away</p><p>morning strength carries you through<br>all the hours that follow too<br>for he who conquers dawn’s first ray<br>owns the hours that follow the day.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3ee84f87bce4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[In the Age of A.I, Networking is key]]></title>
            <link>https://medium.com/@fran6_ca/in-the-age-of-a-i-networking-is-key-1ef9eabdb722?source=rss-49351f97aa99------2</link>
            <guid isPermaLink="false">https://medium.com/p/1ef9eabdb722</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[career-development]]></category>
            <category><![CDATA[networking]]></category>
            <dc:creator><![CDATA[Francis Adediran]]></dc:creator>
            <pubDate>Sat, 03 Jan 2026 06:20:16 GMT</pubDate>
            <atom:updated>2026-01-03T06:20:16.199Z</atom:updated>
            <content:encoded><![CDATA[<p>In the age of A.I, do human things. Networking is no longer optional — it is foundational and imperative.</p><p>Technology can amplify ability, but relationships create opportunity.</p><p>Go to <br>- meetups( via Luma, Eventbrite, meetup app) <br>- be part of open-source projects<br>- be part of discord community<br>- be part of a local community of interest<br>- do a part time course or program to meet like-minded people</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zVaFIl-iAgA9_Rz3_bWDLw.jpeg" /><figcaption>A.I creatives network, London</figcaption></figure><p>Make a deliberate effort to help others. Contribute meaningfully. Share what you are learning and what you are building.</p><p>Visibility is the key because we want to work with humans — not profiles, not a face on a screen, not a voice. In an age where AI can convincingly fake almost anything, the most powerful signal of credibility is visible, consistent human presence.</p><p>Every single person that i know and has done any of these things has a job, are never short of an interview offers or opportunities.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1ef9eabdb722" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Leadership musing: how do i positively influence others to do something?]]></title>
            <link>https://medium.com/@fran6_ca/leadership-musing-how-do-i-positively-influence-others-to-do-something-073df7254be9?source=rss-49351f97aa99------2</link>
            <guid isPermaLink="false">https://medium.com/p/073df7254be9</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[leadership-development]]></category>
            <category><![CDATA[leadership]]></category>
            <dc:creator><![CDATA[Francis Adediran]]></dc:creator>
            <pubDate>Sun, 28 Sep 2025 01:51:09 GMT</pubDate>
            <atom:updated>2025-09-28T02:03:13.053Z</atom:updated>
            <content:encoded><![CDATA[<p>..especially when you are not in a position of power? This is a question that challenges me regularly in my personal and professional life.</p><p>Power is an interesting word in that question. It implies that the question will not be asked if the questionee is in a position of power. However, as a father, a lead developer, first born, oldest among friends, fittest among pals etc, this question still comes up. This is because nobody like being told what to do.</p><p>I’m going to use this blog to note approaches that has worked for me. It’ll be a reference note for future self and anyone that might face this challenge.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rChyJeMZF7LS4Jcotru_pA.png" /><figcaption>Shared goal;make-it-fun;lead-by-example;reward</figcaption></figure><ol><li><strong>Make it a shared goal</strong><br>Communication is important here. I found that instead of framing a task like a chore they should do, frame it as something you can do together to achieve a commonly achievable goal. For example, cleaning a room. <br>“Guys, let’s clean the room after each meeting” can be better phrased as “Let’s spend 5 minutes cleaning this room so that it’s easy to find our items meetings after meetings.” <br>This is an example. The point is to set a specific, small goal with common benefit so that the task seem less daunting and more achievable.</li><li><strong>Lead by example</strong><br>Be the change you want to see. My father always tell me and i believe Micheal Jackson <a href="https://www.youtube.com/watch?v=Z9NYDgbKsBE&amp;list=RDZ9NYDgbKsBE&amp;start_radio=1">sang about this</a>. The reason why this works is deeply rooted in behavioural science. If your act or task leads to a positive outcome, people will naturally gravitate to it. In software engineering, I’m a fan of documentation: README files, automated tests, confluence documents or code comments, i love them. They are critical components that reduce friction and accelerate knowledge transfer.<br>A lot of the time when i join a team or mentoring a developer, i find myself trying to influence this good act. This is what i do that works. <br>I start by consistently updating and adding documentation to any code or project i touch. The goal is to make this a normal constant part of your routine and not let the negative feeling of lack overcome me. When i see a project without readme file for example, i add one without complaining or making a fuss. <br>I found that over time, others start start to follow suit.<br>This aligns with the principles of <a href="https://news.wpcarey.asu.edu/20070103-gentle-science-persuasion-part-three-social-proof"><strong>Social proof by </strong>Robert Cialdini</a>, which suggests the more people who sees any idea to be correct or beneficial, the more a given individual will perceive the idea to be correct.</li><li><strong>Make it Fun</strong><br>I have my wife and son to thank for making me have this technique in my arsenal. Adding fun changes the emotional context of a task.<br>Turn the task into a game. <br>Put on some fun music. <br>Race to see who can finish a task the fastest. <br>Offer a small reward for finishing a task. <br>Turn it into a fun routine, “Readme hour”, “Cleanup saturday”. <br>I found that these changes the perception of a task from a chore to a more enjoyable activity. <br>Principles of gamification by Zichermann &amp; Cunningham in Gamification by Design support this as a way to engage others and solve problems.</li><li><strong>Reinforce Positive Behavior</strong><br>Appreciate, appreciate, appreciate. When your team or partner does the task, acknowledge and appreciate their effort.<br>“I know this isn’t easy, and i really value that you gave it a shot”<br>“Your effort here makes a big difference even if it is not obvious yet”<br>“Thank you for cleaning the kitchen, it looks great!” goes a long way. This positive reinforcement makes them feel good about their contribution and more likely to do it again.<br>Add recognition or visibility to their effort to build goodwill and trust. <br>A post in team’s chat group. A post on social media. A mention in a speech. <br>Acknowledgment and recognition are the real engines of change.</li></ol><p>What do you think of these approaches? Do you have any that you might think it will work. Please share and let’s create a template that others can follow.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=073df7254be9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>