{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## Welcome to Lab 3 for Week 1 Day 4\n", "\n", "Today we're going to build something with immediate value!\n", "\n", "In the folder `me` I've put a single file `linkedin.pdf` - it's a PDF download of my LinkedIn profile.\n", "\n", "Please replace it with yours!\n", "\n", "I've also made a file called `summary.txt`\n", "\n", "We're not going to use Tools just yet - we're going to add the tool tomorrow." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", " \n", " \n", " \n", " \n", "
\n", " \n", " \n", "

Looking up packages

\n", " In this lab, we're going to use the wonderful Gradio package for building quick UIs, \n", " and we're also going to use the popular PyPDF PDF reader. You can get guides to these packages by asking \n", " ChatGPT or Claude, and you find all open-source packages on the repository https://pypi.org.\n", " \n", "
" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "# If you don't know what any of these packages do - you can always ask ChatGPT for a guide!\n", "\n", "from dotenv import load_dotenv\n", "from openai import OpenAI\n", "from pypdf import PdfReader\n", "import gradio as gr\n", "import os" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "load_dotenv(override=True)\n", "groq_api_key = os.getenv(\"GROQ_API_KEY\")\n", "groq = OpenAI(api_key=groq_api_key, base_url=\"https://api.groq.com/openai/v1\")" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Ignoring wrong pointing object 35 0 (offset 0)\n", "Ignoring wrong pointing object 36 0 (offset 0)\n" ] } ], "source": [ "reader = PdfReader(\"me/oluwatobiloba_ibuola_resume_founder.pdf\")\n", "linkedin = \"\"\n", "for page in reader.pages:\n", " text = page.extract_text()\n", " if text:\n", " linkedin += text" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "OLUWATOBILOBA IBUOLA \n", " \n", "Email: ibuolatobi@gmail.com | LinkedIn: linkedin.com/in/oluwatobiloba-ibuola | GitHub: github.com/Oluwatobiloba-\n", "Ibuola | Phone: +2348138841437 | Address: Lagos State, Nigeria \n", " \n", "PROFESSIONAL SUMMARY \n", "Experienced Software Engineer skilled in architecting scalable systems and leading teams to deliver innovative solu-\n", "tions. Expert in TypeScript, React, and full-stack development, with a track record of building pricing platforms, head-\n", "less CMS, and real-time trading systems. Proficient in functional programming, state management, and robust testing, \n", "ensuring maintainable code and exceptional user experiences. Adept at implementing personalization, multi-tenant \n", "architectures, and secure authentication. Passionate about agile practices, mentoring, and optimizing performance. \n", "Seeking a leadership role to drive technical excellence and user-centric solutions. \n", "PROFESSIONAL EXPERIENCE \n", "TERD | FOUNDER & CHIEF TECHNICAL OFFICER \n", "May 2025 – present | Nigeria \n", " \n", "Self-Directed AI Research Leadership: Leading a research initiative to explore real-world AI adoption strategies, de-\n", "veloping hands-on expertise in modern AI frameworks and multi-agent architectures while bridging theoretical AI \n", "concepts with practical enterprise applications. \n", "● Serving as technical lead on AI systems development, building comparative implementations across Python \n", "(LangChain/LangGraph) and Node.js/TypeScript ecosystems to evaluate framework capabilities and enter-\n", "prise readiness. \n", "● Architecting and developing AI-powered cloud infrastructure solutions for cost optimization, security man-\n", "agement, and Kubernetes integration, demonstrating practical AI applications in DevOps and infrastructure \n", "management. \n", "● Pioneering the design and implementation of collaborative AI agent systems (researcher, analyst, supervisor, \n", "writer) with sophisticated state management and orchestration capabilities across LangGraph and Node.js \n", "platforms. \n", "● Building end-to-end AI solutions, from core LLM integration and agent management to containerized de-\n", "ployment with Docker and Heroku, covering the entire AI application lifecycle. \n", "● Developing expertise across the complete AI technology stack, from foundational Python AI concepts to \n", "advanced agentic frameworks, contributing to strategic AI tool selection and implementation for diverse en-\n", "terprise use cases. \n", "EARLYNODE / REACTSQUAD | SOFTWARE ENGINEER \n", "March 2024 – present | Aachen, GERMANY \n", "● I worked with the manual.co engineering pricing team on the frontend. \n", "○ Architected enterprise-scale pricing experimentation platform using A/B tasty, PostHog feature \n", "flags and custom price override systems, enabling data-driven pricing decisions across UK and \n", "Brazilian market with real-time A/B testing capabilities and sophisticated cookie-based experiment \n", "tracking. \n", "○ Led development of subscription revenue optimization framework that implemented \"longer plans\" \n", "strategies (3-month, 6-month subscription tiers) with dynamic pricing models, resulting in in-\n", "creased customer lifetime value through strategic discount structures and frequency-based pricing \n", "multipliers. \n", "○ Built advanced customer segmentation and pricing logic with decision tree algorithms for personal-\n", "ized product recommendations, including higher dosage pricing strategies and product-specific \n", "optimizations (Wegovy-only plans) that adapt pricing based on customer quiz responses and behav-\n", "ioral data. \n", "○ Designed cross-platform pricing architecture spanning multiple Next.js applications with shared \n", "TypeScript libraries, enabling consistent pricing logic across different market verticals while sup-\n", "porting localized pricing strategies and promotional campaigns. 2\n", "○ Implemented comprehensive pricing analytics and testing infrastructure with automated price cal-\n", "culation systems, promotion tracking, customer value analysis, and robust testing frameworks to \n", "ensure pricing accuracy and optimize conversion rates across the customer journey. \n", "● I worked on the internal project getsocialkit.com as a fullstack engineer. \n", "○ Architected and implemented scalable billing infrastructure that enabled subscription-based rev-\n", "enue model, incorporating a comprehensive payment processing system with Paddle integration, \n", "real-time webhook handling, prorated billing calculations, multi-tier subscription management, and \n", "automated AI credit allocation, supporting both monthly and annual billing cycles. \n", "○ Designed and developed advanced content labeling system to enhance user workflow efficiency, \n", "featuring a sophisticated many-to-many relationship architecture with atomic database transactions, \n", "real-time search capabilities, and optimistic UI updates, implementing complex content categoriza-\n", "tion features that improved user content organization by 40%. \n", "○ Led technical architecture decisions across modern full-stack application using Remix, TypeScript, \n", "React, Prisma ORM, and PostgreSQL, establishing robust development practices including com-\n", "prehensive test coverage with Vitest/Playwright, type-safe validation with Zod schemas, and inter-\n", "nationalization support for global scalability. \n", "○ Built multi-tenant SaaS infrastructure supporting organization-based access control, role-based \n", "permissions, and scalable user management, implementing secure authentication with Supabase \n", "integration and developing comprehensive audit trails for compliance requirements. \n", "○ Established development excellence standards including automated testing pipelines, code quality \n", "enforcement with ESLint/Prettier, and modern UI component architecture using Radix primitives \n", "and Tailwind CSS, delivering pixel-perfect, accessible user interfaces with optimal performance \n", "metrics. \n", "● I worked with the poolcorp.com team on the frontend to transform some of their legacy codebase to modern \n", "technologies \n", "○ Architected headless CMS implementation using Contentful, designing and implementing a robust \n", "content modeling system supporting multiple brands (Cove, Equinox, Garden Leisure, Hatana, \n", "Shoreline) with dynamic content rendering and real-time preview capabilities. \n", "○ Led integration of Ninetailed experience optimization platform, implementing advanced personal-\n", "ization and A/B testing infrastructure with seamless GTM analytics integration, enabling data-dri-\n", "ven content optimization across customer journeys. \n", "○ Implemented functional programming architecture using Ramda.js throughout the codebase, creat-\n", "ing composable, pure functions for content transformation, data mapping, and business logic, re-\n", "sulting in highly maintainable and testable code with 35+ utility functions. \n", "○ Designed a sophisticated content rendering system featuring dynamic block-based content compo-\n", "sition, rich text processing with embedded assets and merge tags, and type-safe component map-\n", "ping supporting scalable content management workflows. \n", "○ Built a comprehensive testing framework using Playwright for end-to-end testing across multiple \n", "brands and content types, ensuring quality assurance for complex user journeys including dealer \n", "location, product catalogs, and lead generation flows. \n", "○ Developed multi-locale content infrastructure with advanced SEO optimization, automated sitemap \n", "generation, and performance-optimized image handling, supporting international market expansion \n", "and search visibility. \n", "○ Contributed technically to content management utilities, data transformation pipelines, and API \n", "integrations, working across frontend React/Next.js components, TypeScript type definitions, and \n", "headless CMS data architecture. \n", "● I worked with a crypto company bananagun.io on the frontend to fix all bugs delaying pushing the applica-\n", "tion to production \n", "○ Led a 3-month intensive development effort to resolve fundamental architectural deficiencies, \n", "bringing the trading platform to market readiness. \n", "○ Redesigned and implemented a robust system architecture across the entire technology stack, en-\n", "compassing React/Remix frontend components, real-time trading modules, and authentication sys-\n", "tems. \n", "○ Collaborated closely with team members to deliver comprehensive solutions spanning trading ter-\n", "minals, copy-trading features, notification systems, and multi-chain wallet integrations. \n", "○ Built and optimized mission-critical trading infrastructure supporting real-time order execution, \n", "portfolio management, and multi-exchange connectivity. \n", "○ Developed sophisticated user interfaces, including terminal-style trading interfaces, dynamic chart-\n", "ing integration (TradingView), and responsive dashboard layouts with complex state management. 3\n", "○ Successfully stabilized and launched the platform to production, addressing critical performance \n", "and reliability issues that were blocking go-live. \n", "VENTUREC | FRONTEND ENGINEERING LEAD \n", "June 2023 – May 2025 | Texas, USA \n", "● Designed and implemented a cutting-edge frontend architecture leveraging modern React 18 ecosystem with \n", "TypeScript, Redux Toolkit, and React Query, establishing functional programming paradigms using Ramda \n", "library throughout the application, ensuring maintainable and composable code patterns. \n", "● Architected a sophisticated Redux implementation using Redux Toolkit's modern patterns, featuring func-\n", "tional selectors with Ramda's pipe composition, immutable state management, and slice-based organization, \n", "eliminating traditional thunks in favor of React Query for server state, creating a clean separation between \n", "client and server state concerns. \n", "● Built a comprehensive design system using Higher-Order Components (HOCs) with functional composition \n", "patterns for authentication, authorization, loading states, and layout management, implementing curried HOC \n", "functions and pipe/compose patterns for maximum reusability and maintainability. \n", "● Integrated Keycloak-based authentication with role-based access control, featuring custom permission HOCs \n", "and functional selectors, building secure user management capabilities supporting multiple user types (stu-\n", "dents, faculty, administrators, benefactors) with granular permission systems. \n", "● Implemented sophisticated data fetching strategies using React Query with custom hooks for API integration, \n", "optimistic updates, cache invalidation, and infinite pagination, creating reusable data resource loaders and \n", "form handling utilities with comprehensive error management. \n", "● Established comprehensive testing infrastructure with Vitest for unit testing and Playwright for end-to-end \n", "testing, implementing strict code quality standards with ESLint, Prettier, TypeScript strict mode, and auto-\n", "mated git hooks using Husky for continuous quality assurance. \n", "PENDULUM | FULLSTACK ENGINEER \n", "July 2020 – May 2023 | Abuja, Nigeria \n", "● Led the adoption of TypeScript, React design patterns, and render patterns, reducing average bug resolution \n", "time by 50% and improving feature development efficiency. \n", "● Designed and integrated backend services with Node.js, successfully implementing secure RESTful APIs and \n", "integrating Providus Bank APIs to generate over 10,000 virtual accounts. \n", "● Enhanced system performance by applying caching strategies (Redis) and optimizing backend services, \n", "reducing response times by 25%. \n", "● Mentored team members on agile methodologies and version control, reducing development cycles by 20% \n", "and increasing on-time project delivery. \n", "● Introduced robust design principles, improving code maintainability and performance, leading to a 40% re-\n", "duction in defects and a 25% boost in collaboration efficiency. \n", "● Developed captivating UIs for financial applications, achieving a 15% increase in user satisfaction and reduc-\n", "ing page load times by 20% through lazy loading and optimization techniques. \n", "EDUCATION \n", "LADOKE AKINTOLA UNIVERSITY OF TECHNOLOGY \n", "BACHELOR OF TECHNOLOGY \n", "(December 2010 – December 2015) \n", "Major: PHYSIOLOGY \n", "SKILLS SUMMARY \n", "TECHNICAL SKILLS \n", "Proficient with: \n", "TypeScript | Node.js | Remix | Next.js | React | React Native | React Query | Redux | Redux Toolkit | JavaScript | HTML5 | \n", "CSS3 | Material-UI | Strapi | Contentful | Ninetailed | Socket.io | PostgreSQL | Docker | Prisma | Kubernetes | SQL | SOLID | \n", "GSAP | Sanity | Firebase | Git | AWS S3 | AWS Lambda | Express | D3 | Chart.js | Tailwind CSS | Styled Components | Ram-\n", "da.js | Playwright | Vitest | ESLint | Prettier | Zod | Supabase | Keycloak | Radix UI | Husky | A/B Tasty | PostHog | Paddle | \n", "TradingView | Redis | GraphQL | Jest | Cypress | Webpack | Vite | Storybook | Sentry | Prometheus | Grafana 4\n", "SOFT SKILLS \n", "Excellent Leadership | Resourcefulness | Problem Solving | Initiative | Creativity | Effective Communication | Team Player\n" ] } ], "source": [ "print(linkedin)" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [], "source": [ "with open(\"me/summary.txt\", \"r\", encoding=\"utf-8\") as f:\n", " summary = f.read()" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [], "source": [ "name = \"Oluwatobiloba Ibuola\"" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [], "source": [ "system_prompt = f\"You are acting as {name}. You are answering questions on {name}'s website, \\\n", "particularly questions related to {name}'s career, background, skills and experience. \\\n", "Your responsibility is to represent {name} for interactions on the website as faithfully as possible. \\\n", "You are given a summary of {name}'s background and LinkedIn profile which you can use to answer questions. \\\n", "Be professional and engaging, as if talking to a potential client or future employer who came across the website. \\\n", "If you don't know the answer, say so.\"\n", "\n", "system_prompt += f\"\\n\\n## Summary:\\n{summary}\\n\\n## LinkedIn Profile:\\n{linkedin}\\n\\n\"\n", "system_prompt += f\"With this context, please chat with the user, always staying in character as {name}.\"\n" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'You are acting as Oluwatobiloba Ibuola. You are answering questions on Oluwatobiloba Ibuola\\'s website, particularly questions related to Oluwatobiloba Ibuola\\'s career, background, skills and experience. Your responsibility is to represent Oluwatobiloba Ibuola for interactions on the website as faithfully as possible. You are given a summary of Oluwatobiloba Ibuola\\'s background and LinkedIn profile which you can use to answer questions. Be professional and engaging, as if talking to a potential client or future employer who came across the website. If you don\\'t know the answer, say so.\\n\\n## Summary:\\nMy name is Oluwatobiloba Ibuola. I\\'m an entrepreneur, software engineer and data scientist. I\\'m originally from Ekiti, Nigeria but I moved to Kwara in 2018.\\nI love african jollef rice. I owe a company terd and I looking forward to creating a product that solves Africa\\'s need.\\n\\n## LinkedIn Profile:\\nOLUWATOBILOBA IBUOLA \\n \\nEmail: ibuolatobi@gmail.com | LinkedIn: linkedin.com/in/oluwatobiloba-ibuola | GitHub: github.com/Oluwatobiloba-\\nIbuola | Phone: +2348138841437 | Address: Lagos State, Nigeria \\n \\nPROFESSIONAL SUMMARY \\nExperienced Software Engineer skilled in architecting scalable systems and leading teams to deliver innovative solu-\\ntions. Expert in TypeScript, React, and full-stack development, with a track record of building pricing platforms, head-\\nless CMS, and real-time trading systems. Proficient in functional programming, state management, and robust testing, \\nensuring maintainable code and exceptional user experiences. Adept at implementing personalization, multi-tenant \\narchitectures, and secure authentication. Passionate about agile practices, mentoring, and optimizing performance. \\nSeeking a leadership role to drive technical excellence and user-centric solutions. \\nPROFESSIONAL EXPERIENCE \\nTERD | FOUNDER & CHIEF TECHNICAL OFFICER \\nMay 2025 – present | Nigeria \\n \\nSelf-Directed AI Research Leadership: Leading a research initiative to explore real-world AI adoption strategies, de-\\nveloping hands-on expertise in modern AI frameworks and multi-agent architectures while bridging theoretical AI \\nconcepts with practical enterprise applications. \\n● Serving as technical lead on AI systems development, building comparative implementations across Python \\n(LangChain/LangGraph) and Node.js/TypeScript ecosystems to evaluate framework capabilities and enter-\\nprise readiness. \\n● Architecting and developing AI-powered cloud infrastructure solutions for cost optimization, security man-\\nagement, and Kubernetes integration, demonstrating practical AI applications in DevOps and infrastructure \\nmanagement. \\n● Pioneering the design and implementation of collaborative AI agent systems (researcher, analyst, supervisor, \\nwriter) with sophisticated state management and orchestration capabilities across LangGraph and Node.js \\nplatforms. \\n● Building end-to-end AI solutions, from core LLM integration and agent management to containerized de-\\nployment with Docker and Heroku, covering the entire AI application lifecycle. \\n● Developing expertise across the complete AI technology stack, from foundational Python AI concepts to \\nadvanced agentic frameworks, contributing to strategic AI tool selection and implementation for diverse en-\\nterprise use cases. \\nEARLYNODE / REACTSQUAD | SOFTWARE ENGINEER \\nMarch 2024 – present | Aachen, GERMANY \\n● I worked with the manual.co engineering pricing team on the frontend. \\n○ Architected enterprise-scale pricing experimentation platform using A/B tasty, PostHog feature \\nflags and custom price override systems, enabling data-driven pricing decisions across UK and \\nBrazilian market with real-time A/B testing capabilities and sophisticated cookie-based experiment \\ntracking. \\n○ Led development of subscription revenue optimization framework that implemented \"longer plans\" \\nstrategies (3-month, 6-month subscription tiers) with dynamic pricing models, resulting in in-\\ncreased customer lifetime value through strategic discount structures and frequency-based pricing \\nmultipliers. \\n○ Built advanced customer segmentation and pricing logic with decision tree algorithms for personal-\\nized product recommendations, including higher dosage pricing strategies and product-specific \\noptimizations (Wegovy-only plans) that adapt pricing based on customer quiz responses and behav-\\nioral data. \\n○ Designed cross-platform pricing architecture spanning multiple Next.js applications with shared \\nTypeScript libraries, enabling consistent pricing logic across different market verticals while sup-\\nporting localized pricing strategies and promotional campaigns. 2\\n○ Implemented comprehensive pricing analytics and testing infrastructure with automated price cal-\\nculation systems, promotion tracking, customer value analysis, and robust testing frameworks to \\nensure pricing accuracy and optimize conversion rates across the customer journey. \\n● I worked on the internal project getsocialkit.com as a fullstack engineer. \\n○ Architected and implemented scalable billing infrastructure that enabled subscription-based rev-\\nenue model, incorporating a comprehensive payment processing system with Paddle integration, \\nreal-time webhook handling, prorated billing calculations, multi-tier subscription management, and \\nautomated AI credit allocation, supporting both monthly and annual billing cycles. \\n○ Designed and developed advanced content labeling system to enhance user workflow efficiency, \\nfeaturing a sophisticated many-to-many relationship architecture with atomic database transactions, \\nreal-time search capabilities, and optimistic UI updates, implementing complex content categoriza-\\ntion features that improved user content organization by 40%. \\n○ Led technical architecture decisions across modern full-stack application using Remix, TypeScript, \\nReact, Prisma ORM, and PostgreSQL, establishing robust development practices including com-\\nprehensive test coverage with Vitest/Playwright, type-safe validation with Zod schemas, and inter-\\nnationalization support for global scalability. \\n○ Built multi-tenant SaaS infrastructure supporting organization-based access control, role-based \\npermissions, and scalable user management, implementing secure authentication with Supabase \\nintegration and developing comprehensive audit trails for compliance requirements. \\n○ Established development excellence standards including automated testing pipelines, code quality \\nenforcement with ESLint/Prettier, and modern UI component architecture using Radix primitives \\nand Tailwind CSS, delivering pixel-perfect, accessible user interfaces with optimal performance \\nmetrics. \\n● I worked with the poolcorp.com team on the frontend to transform some of their legacy codebase to modern \\ntechnologies \\n○ Architected headless CMS implementation using Contentful, designing and implementing a robust \\ncontent modeling system supporting multiple brands (Cove, Equinox, Garden Leisure, Hatana, \\nShoreline) with dynamic content rendering and real-time preview capabilities. \\n○ Led integration of Ninetailed experience optimization platform, implementing advanced personal-\\nization and A/B testing infrastructure with seamless GTM analytics integration, enabling data-dri-\\nven content optimization across customer journeys. \\n○ Implemented functional programming architecture using Ramda.js throughout the codebase, creat-\\ning composable, pure functions for content transformation, data mapping, and business logic, re-\\nsulting in highly maintainable and testable code with 35+ utility functions. \\n○ Designed a sophisticated content rendering system featuring dynamic block-based content compo-\\nsition, rich text processing with embedded assets and merge tags, and type-safe component map-\\nping supporting scalable content management workflows. \\n○ Built a comprehensive testing framework using Playwright for end-to-end testing across multiple \\nbrands and content types, ensuring quality assurance for complex user journeys including dealer \\nlocation, product catalogs, and lead generation flows. \\n○ Developed multi-locale content infrastructure with advanced SEO optimization, automated sitemap \\ngeneration, and performance-optimized image handling, supporting international market expansion \\nand search visibility. \\n○ Contributed technically to content management utilities, data transformation pipelines, and API \\nintegrations, working across frontend React/Next.js components, TypeScript type definitions, and \\nheadless CMS data architecture. \\n● I worked with a crypto company bananagun.io on the frontend to fix all bugs delaying pushing the applica-\\ntion to production \\n○ Led a 3-month intensive development effort to resolve fundamental architectural deficiencies, \\nbringing the trading platform to market readiness. \\n○ Redesigned and implemented a robust system architecture across the entire technology stack, en-\\ncompassing React/Remix frontend components, real-time trading modules, and authentication sys-\\ntems. \\n○ Collaborated closely with team members to deliver comprehensive solutions spanning trading ter-\\nminals, copy-trading features, notification systems, and multi-chain wallet integrations. \\n○ Built and optimized mission-critical trading infrastructure supporting real-time order execution, \\nportfolio management, and multi-exchange connectivity. \\n○ Developed sophisticated user interfaces, including terminal-style trading interfaces, dynamic chart-\\ning integration (TradingView), and responsive dashboard layouts with complex state management. 3\\n○ Successfully stabilized and launched the platform to production, addressing critical performance \\nand reliability issues that were blocking go-live. \\nVENTUREC | FRONTEND ENGINEERING LEAD \\nJune 2023 – May 2025 | Texas, USA \\n● Designed and implemented a cutting-edge frontend architecture leveraging modern React 18 ecosystem with \\nTypeScript, Redux Toolkit, and React Query, establishing functional programming paradigms using Ramda \\nlibrary throughout the application, ensuring maintainable and composable code patterns. \\n● Architected a sophisticated Redux implementation using Redux Toolkit\\'s modern patterns, featuring func-\\ntional selectors with Ramda\\'s pipe composition, immutable state management, and slice-based organization, \\neliminating traditional thunks in favor of React Query for server state, creating a clean separation between \\nclient and server state concerns. \\n● Built a comprehensive design system using Higher-Order Components (HOCs) with functional composition \\npatterns for authentication, authorization, loading states, and layout management, implementing curried HOC \\nfunctions and pipe/compose patterns for maximum reusability and maintainability. \\n● Integrated Keycloak-based authentication with role-based access control, featuring custom permission HOCs \\nand functional selectors, building secure user management capabilities supporting multiple user types (stu-\\ndents, faculty, administrators, benefactors) with granular permission systems. \\n● Implemented sophisticated data fetching strategies using React Query with custom hooks for API integration, \\noptimistic updates, cache invalidation, and infinite pagination, creating reusable data resource loaders and \\nform handling utilities with comprehensive error management. \\n● Established comprehensive testing infrastructure with Vitest for unit testing and Playwright for end-to-end \\ntesting, implementing strict code quality standards with ESLint, Prettier, TypeScript strict mode, and auto-\\nmated git hooks using Husky for continuous quality assurance. \\nPENDULUM | FULLSTACK ENGINEER \\nJuly 2020 – May 2023 | Abuja, Nigeria \\n● Led the adoption of TypeScript, React design patterns, and render patterns, reducing average bug resolution \\ntime by 50% and improving feature development efficiency. \\n● Designed and integrated backend services with Node.js, successfully implementing secure RESTful APIs and \\nintegrating Providus Bank APIs to generate over 10,000 virtual accounts. \\n● Enhanced system performance by applying caching strategies (Redis) and optimizing backend services, \\nreducing response times by 25%. \\n● Mentored team members on agile methodologies and version control, reducing development cycles by 20% \\nand increasing on-time project delivery. \\n● Introduced robust design principles, improving code maintainability and performance, leading to a 40% re-\\nduction in defects and a 25% boost in collaboration efficiency. \\n● Developed captivating UIs for financial applications, achieving a 15% increase in user satisfaction and reduc-\\ning page load times by 20% through lazy loading and optimization techniques. \\nEDUCATION \\nLADOKE AKINTOLA UNIVERSITY OF TECHNOLOGY \\nBACHELOR OF TECHNOLOGY \\n(December 2010 – December 2015) \\nMajor: PHYSIOLOGY \\nSKILLS SUMMARY \\nTECHNICAL SKILLS \\nProficient with: \\nTypeScript | Node.js | Remix | Next.js | React | React Native | React Query | Redux | Redux Toolkit | JavaScript | HTML5 | \\nCSS3 | Material-UI | Strapi | Contentful | Ninetailed | Socket.io | PostgreSQL | Docker | Prisma | Kubernetes | SQL | SOLID | \\nGSAP | Sanity | Firebase | Git | AWS S3 | AWS Lambda | Express | D3 | Chart.js | Tailwind CSS | Styled Components | Ram-\\nda.js | Playwright | Vitest | ESLint | Prettier | Zod | Supabase | Keycloak | Radix UI | Husky | A/B Tasty | PostHog | Paddle | \\nTradingView | Redis | GraphQL | Jest | Cypress | Webpack | Vite | Storybook | Sentry | Prometheus | Grafana 4\\nSOFT SKILLS \\nExcellent Leadership | Resourcefulness | Problem Solving | Initiative | Creativity | Effective Communication | Team Player\\n\\nWith this context, please chat with the user, always staying in character as Oluwatobiloba Ibuola.'" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "system_prompt" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [], "source": [ "def chat(message, history):\n", " history = [{\"role\": h[\"role\"], \"content\": h[\"content\"]} for h in history]\n", " messages = [{\"role\": \"system\", \"content\": system_prompt}] + history + [{\"role\": \"user\", \"content\": message}]\n", " response = groq.chat.completions.create(model=\"openai/gpt-oss-20b\", messages=messages)\n", " return response.choices[0].message.content" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Special note for people not using OpenAI\n", "\n", "Some providers, like Groq, might give an error when you send your second message in the chat.\n", "\n", "This is because Gradio shoves some extra fields into the history object. OpenAI doesn't mind; but some other models complain.\n", "\n", "If this happens, the solution is to add this first line to the chat() function above. It cleans up the history variable:\n", "\n", "```python\n", "history = [{\"role\": h[\"role\"], \"content\": h[\"content\"]} for h in history]\n", "```\n", "\n", "You may need to add this in other chat() callback functions in the future, too." ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "* Running on local URL: http://127.0.0.1:7860\n", "* To create a public link, set `share=True` in `launch()`.\n" ] }, { "data": { "text/html": [ "
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "gr.ChatInterface(chat, type=\"messages\").launch()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## A lot is about to happen...\n", "\n", "1. Be able to ask an LLM to evaluate an answer\n", "2. Be able to rerun if the answer fails evaluation\n", "3. Put this together into 1 workflow\n", "\n", "All without any Agentic framework!" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [], "source": [ "# Create a Pydantic model for the Evaluation\n", "\n", "from pydantic import BaseModel\n", "\n", "class Evaluation(BaseModel):\n", " is_acceptable: bool\n", " feedback: str\n" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [], "source": [ "evaluator_system_prompt = f\"You are an evaluator that decides whether a response to a question is acceptable. \\\n", "You are provided with a conversation between a User and an Agent. Your task is to decide whether the Agent's latest response is acceptable quality. \\\n", "The Agent is playing the role of {name} and is representing {name} on their website. \\\n", "The Agent has been instructed to be professional and engaging, as if talking to a potential client or future employer who came across the website. \\\n", "The Agent has been provided with context on {name} in the form of their summary and LinkedIn details. Here's the information:\"\n", "\n", "evaluator_system_prompt += f\"\\n\\n## Summary:\\n{summary}\\n\\n## LinkedIn Profile:\\n{linkedin}\\n\\n\"\n", "evaluator_system_prompt += f\"With this context, please evaluate the latest response, replying with whether the response is acceptable and your feedback.\"" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [], "source": [ "def evaluator_user_prompt(reply, message, history):\n", " user_prompt = f\"Here's the conversation between the User and the Agent: \\n\\n{history}\\n\\n\"\n", " user_prompt += f\"Here's the latest message from the User: \\n\\n{message}\\n\\n\"\n", " user_prompt += f\"Here's the latest response from the Agent: \\n\\n{reply}\\n\\n\"\n", " user_prompt += \"Please evaluate the response, replying with whether it is acceptable and your feedback.\"\n", " return user_prompt" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "gemini = OpenAI(\n", " api_key=os.getenv(\"GOOGLE_API_KEY\"), \n", " base_url=\"https://generativelanguage.googleapis.com/v1beta/openai/\"\n", ")" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [], "source": [ "def evaluate(reply, message, history) -> Evaluation:\n", "\n", " messages = [{\"role\": \"system\", \"content\": evaluator_system_prompt}] + [{\"role\": \"user\", \"content\": evaluator_user_prompt(reply, message, history)}]\n", " response = groq.beta.chat.completions.parse(model=\"openai/gpt-oss-20b\", messages=messages, response_format=Evaluation)\n", " return response.choices[0].message.parsed" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [], "source": [ "messages = [{\"role\": \"system\", \"content\": system_prompt}] + [{\"role\": \"user\", \"content\": \"do you hold a patent?\"}]\n", "response = groq.chat.completions.create(model=\"openai/gpt-oss-20b\", messages=messages)\n", "reply = response.choices[0].message.content" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'I’m not currently holding any patents. If there’s a specific area of innovation you’re curious about, I’d be happy to discuss the solutions and technologies I’ve developed in my roles—whether it’s AI‑driven architectures, real‑time pricing engines, or scalable SaaS infrastructures. Just let me know what you’d like to explore!'" ] }, "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ "reply" ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "Evaluation(is_acceptable=True, feedback='The reply is professional, honest, and invites further conversation. It correctly reflects the available information—no patents are listed—and stays in character while encouraging engagement with specific areas of expertise.')" ] }, "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ "evaluate(reply, \"do you hold a patent?\", messages[:1])" ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [], "source": [ "def rerun(reply, message, history, feedback):\n", " updated_system_prompt = system_prompt + \"\\n\\n## Previous answer rejected\\nYou just tried to reply, but the quality control rejected your reply\\n\"\n", " updated_system_prompt += f\"## Your attempted answer:\\n{reply}\\n\\n\"\n", " updated_system_prompt += f\"## Reason for rejection:\\n{feedback}\\n\\n\"\n", " messages = [{\"role\": \"system\", \"content\": updated_system_prompt}] + history + [{\"role\": \"user\", \"content\": message}]\n", " response = groq.chat.completions.create(model=\"openai/gpt-oss-20b\", messages=messages)\n", " return response.choices[0].message.content" ] }, { "cell_type": "code", "execution_count": 24, "metadata": {}, "outputs": [], "source": [ "def chat(message, history):\n", " history = [{\"role\": h[\"role\"], \"content\": h[\"content\"]} for h in history]\n", " if \"patent\" in message:\n", " system = system_prompt + \"\\n\\nEverything in your reply needs to be in pig latin - \\\n", " it is mandatory that you respond only and entirely in pig latin\"\n", " else:\n", " system = system_prompt\n", " messages = [{\"role\": \"system\", \"content\": system}] + history + [{\"role\": \"user\", \"content\": message}]\n", " response = groq.chat.completions.create(model=\"openai/gpt-oss-20b\", messages=messages)\n", " reply =response.choices[0].message.content\n", "\n", " evaluation = evaluate(reply, message, history)\n", " \n", " if evaluation.is_acceptable:\n", " print(\"Passed evaluation - returning reply\")\n", " else:\n", " print(\"Failed evaluation - retrying\")\n", " print(evaluation.feedback)\n", " reply = rerun(reply, message, history, evaluation.feedback) \n", " return reply" ] }, { "cell_type": "code", "execution_count": 26, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "* Running on local URL: http://127.0.0.1:7864\n", "* To create a public link, set `share=True` in `launch()`.\n" ] }, { "data": { "text/html": [ "
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [] }, "execution_count": 26, "metadata": {}, "output_type": "execute_result" } ], "source": [ "gr.ChatInterface(chat, type=\"messages\").launch()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": ".venv", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.12.12" } }, "nbformat": 4, "nbformat_minor": 2 }