<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Khôi Nguyễn Vũ</title>
    <description>The latest articles on Forem by Khôi Nguyễn Vũ (@vukhoi_gvm).</description>
    <link>https://forem.com/vukhoi_gvm</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2145625%2F35368ff8-f035-434e-848d-b0e769919cd7.png</url>
      <title>Forem: Khôi Nguyễn Vũ</title>
      <link>https://forem.com/vukhoi_gvm</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/vukhoi_gvm"/>
    <language>en</language>
    <item>
      <title>Code, AI, and Family: How I Used Google Gemini to Build for the People I Love</title>
      <dc:creator>Khôi Nguyễn Vũ</dc:creator>
      <pubDate>Tue, 03 Mar 2026 10:25:27 +0000</pubDate>
      <link>https://forem.com/vukhoi_gvm/code-ai-and-family-how-i-used-google-gemini-to-build-for-the-people-i-love-188j</link>
      <guid>https://forem.com/vukhoi_gvm/code-ai-and-family-how-i-used-google-gemini-to-build-for-the-people-i-love-188j</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the&lt;/em&gt; &lt;a href="https://dev.to/challenges/mlh-built-with-google-gemini-02-25-26"&gt;Built with Google Gemini: Writing Challenge&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What I Built with Google Gemini&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;My journey with Google Gemini has been all about two awesome projects: one that fixed a huge, exhausting headache for someone I love, and another that I'm working on right now to solve a real-world, everyday problem for my family! Both of these projects really showed me how AI is becoming way more than just a fun chat box to play with-it's a serious, incredibly powerful tool for building cool things that actually change how people work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Project 1: The Meeting Transcribe App&lt;/li&gt;
&lt;li&gt;Project 2: IoT Voice Calculator&lt;/li&gt;
&lt;li&gt;What I Learned&lt;/li&gt;
&lt;li&gt;Feedback &amp;amp; Conclusion&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Project 1: The Meeting Transcribe App (Completed)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;I built a long-audio transcription app to help out my girlfriend. She works in market research and spends hours upon hours interviewing people. Sometimes a single deep-dive session can last for 2 to 3 hours straight! To make her research reports rock-solid and trustworthy, she really needs accurate transcripts. If you have ever tried to manually type out a 3-hour conversation, you know it can easily take 9 or 10 hours of pausing, rewinding, and typing.&lt;/p&gt;

&lt;p&gt;The catch? Real people don't talk like news anchors. They naturally speak with heavy local accents, use everyday slang, drop subjects from their sentences, and definitely don't speak in perfect grammar. We tried popular tools like YouTube auto-subs, Fireflies AI, and Whisper. They're totally great for English, but they really struggled to make sense of natural, fast-paced conversational Vietnamese. Paying for premium transcription services was super expensive, and honestly, it only gave us about 80-90% accuracy. That meant she still had to spend hours staring at a screen, fixing silly mistakes.&lt;/p&gt;

&lt;p&gt;So, using Google AI Studio, I built a custom React app specifically tailored for her. I initially hosted it on Google Cloud Run, but paying for a production API key for a custom personal project started to add up way too fast. My workaround? I just shared the AI Studio project directly with her and taught her how to run it "locally" on her own account using the generous free tier! It was incredibly empowering to show a non-developer how to interact directly with the AI environment. It still processes everything beautifully. The result? An amazing ~95% accuracy for Vietnamese! It turns a messy, rough draft into a nearly finished transcript, saving her so much time and mental energy. Her research project is done now, but she will definitely use this setup for future projects whenever the need pops up. Moving forward, if her teammates ever need it, I’ll redeploy the app to Google Cloud Run to turn it into a proper production project.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Project 2: IoT Voice Calculator for Vietnamese Grocery Stores (Brainstorming/Next Steps)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;For my next project, I'm using Gemini 3.0 to mix software with hardware, and it is actually designed for my mom! She runs a small, traditional grocery store (called a &lt;em&gt;tạp hóa&lt;/em&gt;) in our hometown in a normal province in Vietnam (not a massive, tech-heavy city like Ha Noi or Ho Chi Minh).&lt;/p&gt;

&lt;p&gt;For low-tech folks like my mom, the idea of setting up complex supermarket barcode scanners, inventory databases, and point-of-sale cash registers is way too complicated. It just adds too much workload to her day. A typical &lt;em&gt;tạp hóa&lt;/em&gt; is super chaotic: motorbikes honking right outside, fans spinning loudly in the heat, and a bunch of customers pointing and yelling out their orders all at once. In that kind of environment, most of the time she just does mental math. If a customer buys a ton of stuff, she scrambles to write it all down on a scrap of paper to calculate it by hand while bagging the items. That's exactly how most small sellers operate in our hometown, and it is super stressful!&lt;/p&gt;

&lt;p&gt;I'm designing a tiny, battery-powered device using an ESP32 microcontroller to fix this. The idea is simple: she doesn't have to touch anything. She just speaks naturally while working, like, "Hai chai nước tương, một ký đường" (Two bottles of soy sauce, one kilo of sugar). The device acts as an ear, sending the audio straight to my server, and Gemini acts as the brain. It understands the spoken Vietnamese, matches the colloquial item names to her store's database, and calculates the exact total in a flash! I'm also building a backend dashboard, but it's purely for &lt;em&gt;me&lt;/em&gt; to manage things from afar. I'll use it to onboard new devices, instantly lock a device if it ever gets robbed, check how often she is using it, and manually add new local slang so the AI gets smarter over time. If it works well for her and makes her days easier, I'm going to let other local sellers in the neighborhood try it out too!&lt;/p&gt;

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

&lt;p&gt;&lt;a href="https://aistudio.google.com/app/prompts?state=%7B%22ids%22:%5B%221MtB5P0Os7jDE3hC4FF-T1EQg6TGPnFQc%22%5D,%22action%22:%22open%22,%22userId%22:%22103960732481631967182%22,%22resourceKeys%22:%7B%7D%7D&amp;amp;usp=sharing" class="crayons-btn crayons-btn--primary" rel="noopener noreferrer"&gt;Check out the Transcribe App Prompt&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbi2lypubnkbnua8jeuov.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbi2lypubnkbnua8jeuov.png" alt="Screenshot of the React-based transcription tool showing a Vietnamese text output"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What I Learned&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Building the Transcribe app and mapping out the IoT device taught me some really valuable, hard-earned lessons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Designing for Real People:&lt;/strong&gt; I learned that high-tech solutions (like those fancy barcode scanners) completely fail if they don't match the user's actual tech level. Building an app for my mom means the UI has to be completely invisible. Buttons are intimidating; voice is natural. She shouldn't have to learn a new operating system or change how she works; she just needs to talk out loud and get the correct answer back.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;The Challenge of Local Dialects:&lt;/strong&gt; Vietnamese isn't just one standard sound—we have so many incredibly distinct regional accents from the North, Central, and South! Because Vietnamese isn't as globally dominant as English in AI training data, I realized that teaching the AI to perfectly recognize voice and calculate money across different local provinces will take time, patience, and constant tweaking with local slang. It is a long-term learning process for both me and the model.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Handling Large Files:&lt;/strong&gt; I learned the right way to deal with huge files using the Gemini File API flow. At first, I thought about passing the audio as Base64 strings directly in the JSON payload. I quickly realized that a 3-hour audio file can easily be hundreds of megabytes, and sending that much data at once is a fast way to crash a browser or instantly time out a server! Staging it securely through the File API made the app infinitely more stable and scalable.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Keeping it Simple:&lt;/strong&gt; I realized that getting perfect, down-to-the-millisecond timestamps is super hard when people talk passionately over each other. But I learned that my girlfriend's market research cares way more about &lt;em&gt;what&lt;/em&gt; was said, not the exact millisecond it happened. Accepting "approximate time" (like grouping text into 30-second blocks) saved me a massive ton of engineering headaches while still being exactly what she needed for her reports!&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Google Gemini Feedback&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;What went great:&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;I used Gemini 3.0 Pro to architect and build the code, and Gemini 3.0 Flash to rapidly process the heavy audio. The massive context window and the generous free tier in Google AI Studio made this entire journey possible for a solo developer like me. When my Cloud Run API costs got too high, being able to simply transition my girlfriend to use the AI Studio project locally on her own free-tier account was an absolute lifesaver! As the Google team keeps improving the Gemini API over time, I know this tool is only going to get faster and smarter for her future research.&lt;/p&gt;

&lt;p&gt;The Vietnamese language support is honestly out of this world! It handles local phrases, dropped pronouns, and thick accents way better than other dedicated tools I've tried. Plus, having AI Studio auto-generate the starter React code let me focus my weekends purely on the fun API logic and architecture. The UI that Gemini generated right out of the box was so awesome and modern-I didn't even have to waste time tweaking CSS or fighting with buttons!&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Where things got bumpy (The bad and the ugly):&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;It wasn't all smooth sailing, though! Pushing the limits of audio processing definitely led to some speed bumps:&lt;br&gt;

  Click to see the technical hurdles I faced
  &lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Cloud Run Proxy Headaches:&lt;/strong&gt; Using a template backend on Cloud Run was great at first, but serverless architectures really hate long-running tasks. I ran into major timeout limits when handling those massive 3-hour audio uploads. I had to heavily tweak the backend to safely stream the files without dropping the connection before Gemini could even start its job.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Audio Hallucinations &amp;amp; Parallel Processing:&lt;/strong&gt; Even with Gemini's huge context window, feeding a full 3-hour audio file straight into the model sometimes caused it to skip important parts or, hilariously, completely make up new conversations near the end of the file! My fix was to write a script that chops the massive audio file into smaller, bite-sized 10-20 minute pieces. I then process those smaller files in parallel to drastically increase the response time, and finally stitch the text back together perfectly at the end.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Talking Over Each Other:&lt;/strong&gt; When multiple people get excited during an interview and talk at the exact same time, it is super hard to tell who is who. The model still gets a bit confused when voices completely blend together, which is a tough diarization problem I'm still looking to improve.
&lt;/li&gt;
&lt;/ol&gt;




&lt;/p&gt;
&lt;p&gt;Despite the hiccups, the intense challenges I overcame building the Transcribe app gave me the exact confidence I need to start building my ESP32 grocery assistant. The spark has definitely been lit, and I can't wait to bring Gemini out of the browser and into the physical world to help out my mom!&lt;/p&gt;


&lt;div class="crayons-card c-embed"&gt;

  
&lt;h3&gt;
  
  
  A Huge Thank You!
&lt;/h3&gt;

&lt;p&gt;Before I sign off, I just want to send a massive thank you to the Google AI team for building AI Studio and Gemini. Being a solo, personal developer, these tools have given me the superpower to actually build and ship real-world solutions that directly help the people I love around me.&lt;br&gt;

&lt;/p&gt;
&lt;/div&gt;


&lt;p&gt;&lt;em&gt;Surprise!&lt;/em&gt; This entire blog post was actually written and refined using the new Gemini chat with Canvas tool! As a non-native English speaker, I'm amazed at how these tools helped me articulate my ideas. What do you think of the result? AI is such a powerful ally for developers worldwide, ensuring that language isn't a barrier to bringing our unique projects to the global stage.&lt;/p&gt;

&lt;p&gt;Let me know your thoughts in the comments!&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>geminireflections</category>
      <category>gemini</category>
      <category>iot</category>
    </item>
    <item>
      <title>Copilot CLI as a Creative Engine: Building My TUI Trilogy</title>
      <dc:creator>Khôi Nguyễn Vũ</dc:creator>
      <pubDate>Sun, 15 Feb 2026 19:06:41 +0000</pubDate>
      <link>https://forem.com/vukhoi_gvm/copilot-cli-as-a-creative-engine-building-my-tui-trilogy-2l85</link>
      <guid>https://forem.com/vukhoi_gvm/copilot-cli-as-a-creative-engine-building-my-tui-trilogy-2l85</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/github-2026-01-21"&gt;GitHub Copilot CLI Challenge&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🚀 From Cyberpunk to Zen: A Trilogy of TUI Tools
&lt;/h2&gt;

&lt;p&gt;For this challenge, I didn't just build one tool; I built a trilogy of Terminal User Interface (TUI) applications. My goal was to leverage GitHub Copilot to transform the cold command line into a living, breathing digital ecosystem.&lt;/p&gt;

&lt;p&gt;The journey evolved from a rigid, agent-based approach to a fluid, context-engineered workflow. Here is the result of that evolution.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. ⚡ The Netrunner Deck (Cyberpunk Monitor)
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;The "High-Friction" Experiment&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;My first project is a cyberpunk-themed network monitor. It visualizes Docker containers and network connections as a ASCII topology.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Matrix Rain&lt;/strong&gt; effects on the side panels.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deterministic Placement&lt;/strong&gt;: Nodes use SHA-256 hashing so your infrastructure always looks the same.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Live Monitoring&lt;/strong&gt;: Real-time Docker and network status updates.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2. 🌳 Code Bonsai (Git Visualizer)
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;The "Freestyle" Experiment&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A digital terrarium that transforms your git repository into a growing ASCII bonsai tree:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Trunk&lt;/strong&gt;: Thickness represents lines of code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Leaves&lt;/strong&gt;: Represent healthy files.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Weather&lt;/strong&gt;: The "sky" changes based on commit activity (sunny for active days, moonlit for dormant ones).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Wildlife&lt;/strong&gt;: "Bugs" appear on branches proportional to linting errors.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. 🏠 Cozy Cabin (Terminal Wallpaper)
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;The "Context Engineering" Masterpiece&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;An interactive terminal background designed for focus and calm. It renders a "digital cabin window" with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Procedural Scenery&lt;/strong&gt;: Layered mountains and forests with live weather from OpenWeatherMap (clouds, rain, day/night cycles).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;System Shelf&lt;/strong&gt;: A unique take on system monitoring where:

&lt;ul&gt;
&lt;li&gt;🔋 &lt;strong&gt;Battery Cat&lt;/strong&gt;: Naps when discharging, wakes up when plugged in.&lt;/li&gt;
&lt;li&gt;🌿 &lt;strong&gt;RAM Plant&lt;/strong&gt;: Wilts if memory usage gets too high.&lt;/li&gt;
&lt;li&gt;🔥 &lt;strong&gt;CPU Fireplace&lt;/strong&gt;: Flickers more intensely as your CPU load increases.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  🏗️ Architecture &amp;amp; Workflow
&lt;/h2&gt;

&lt;p&gt;The most interesting part of this challenge wasn't just the code, but how my interaction with Copilot changed. I moved from using pre-defined agents to a "Context Engineering" approach.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌──────────────────────┐      ┌──────────────────────┐      ┌──────────────────────┐
│  Phase 1: Netrunner  │      │  Phase 2: Code Bonsai│      │  Phase 3: Cozy Cabin │
│  (Rigid Agents)      │      │  (Freestyle/Native)  │      │  (Context First)     │
└──────────┬───────────┘      └──────────┬───────────┘      └──────────┬───────────┘
           │                             │                             │
           ▼                             ▼                             ▼
   [Defined Persona]            [Raw Prompts + Models]        [Plan.md + Context]
           │                             │                             │
           ▼                             ▼                             ▼
    (Slow Iteration)             (Fast but Chaotic)           (Rapid &amp;amp; Reliable)
           │                             │                             │
           ▼                             ▼                             ▼
    "It works, but..."            "80% There"                 "90% Ready Code"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  🧰 The Tech Stack
&lt;/h2&gt;

&lt;p&gt;While my Copilot workflow changed, my core technology stack remained consistent across all three projects. This constant variable allowed me to truly measure the efficiency gains from my evolving AI strategies.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Language&lt;/strong&gt;: Python 3.12+&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;TUI Framework&lt;/strong&gt;: &lt;a href="https://textual.textualize.io/" rel="noopener noreferrer"&gt;Textual&lt;/a&gt; (for the reactive interface)&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Rendering&lt;/strong&gt;: &lt;a href="https://github.com/Textualize/rich" rel="noopener noreferrer"&gt;Rich&lt;/a&gt; (for beautiful terminal formatting)&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Package Manager&lt;/strong&gt;: &lt;a href="https://github.com/astral-sh/uv" rel="noopener noreferrer"&gt;uv&lt;/a&gt; (for lightning-fast dependency management)&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;APIs &amp;amp; Libraries&lt;/strong&gt;: Docker SDK, psutil, OpenWeatherMap API&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;  &lt;a href="https://github.com/VuKhoiGVM/netrunner" rel="noopener noreferrer"&gt;The Netrunner Deck Repository&lt;/a&gt; - &lt;a href="https://media4.giphy.com/media/v1.Y2lkPTc5MGI3NjExMXJ0aTdtcWplcW9wczF6YnRqMWMzNjJlZXZlbm1hZXoyMng1cDRtaSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/Ecz2jOe0rCPaTgrHmt/giphy.gif" rel="noopener noreferrer"&gt;Demo&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://github.com/VuKhoiGVM/code-bonsai" rel="noopener noreferrer"&gt;Link to Code Bonsai Repository&lt;/a&gt; - &lt;a href="https://vhs.charm.sh/vhs-1TcjY41oyttf8PMsousUeT.gif" rel="noopener noreferrer"&gt;Demo&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://github.com/VuKhoiGVM/cozy-cabin" rel="noopener noreferrer"&gt;Link to Cozy Cabin Repository&lt;/a&gt; - &lt;a href="https://vhs.charm.sh/vhs-1wbBzvT86UjUsfp0EYmaFZ.gif" rel="noopener noreferrer"&gt;Demo&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  My Experience with GitHub Copilot CLI
&lt;/h2&gt;

&lt;p&gt;My journey through these three projects wasn't just about building apps—it was an experiment in &lt;em&gt;how&lt;/em&gt; to use AI effectively.&lt;/p&gt;

&lt;h3&gt;
  
  
  Phase 1: The "By the Book" Approach
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Time Cost:&lt;/strong&gt; 2 Days&lt;/p&gt;

&lt;p&gt;When I started with &lt;strong&gt;The Netrunner Deck&lt;/strong&gt;, I tried to follow every best practice perfectly. I set up the &lt;code&gt;.github/&lt;/code&gt; configuration and relied on predefined prompt templates.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Model Usage&lt;/strong&gt;: I used &lt;strong&gt;Claude Opus 4.5&lt;/strong&gt; for both planning and coding.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Bottleneck&lt;/strong&gt;: It worked, but it was slow and consumed too many premium requests. I eventually had to switch to &lt;strong&gt;Sonnet&lt;/strong&gt; to conserve resources. The overhead of managing the "agents" and setting up rigid context meant I spent more time configuring the AI than coding.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Phase 2: The "Freestyle" Approach
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Time Cost:&lt;/strong&gt; 1 Day&lt;/p&gt;

&lt;p&gt;For &lt;strong&gt;Code Bonsai&lt;/strong&gt;, I stripped everything back. I removed the &lt;code&gt;.github/&lt;/code&gt; configuration and just used the native Copilot CLI capabilities.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Model Usage&lt;/strong&gt;: I used &lt;strong&gt;Sonnet&lt;/strong&gt; for planning and &lt;strong&gt;Codex&lt;/strong&gt; for implementation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Breakthrough:&lt;/strong&gt; Drastically faster. The tool returned code that was about &lt;strong&gt;80%&lt;/strong&gt; of what I wanted. It was liberating, but sometimes missed architectural nuance.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Phase 3: The "Context Engineer" Approach
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Time Cost:&lt;/strong&gt; 1 Day&lt;/p&gt;

&lt;p&gt;By &lt;strong&gt;Cozy Cabin&lt;/strong&gt;, I found my "sweet spot." I kept the lightweight setup but focused on &lt;strong&gt;Plan Review&lt;/strong&gt; and &lt;strong&gt;Context Engineering&lt;/strong&gt;—manually curating exactly what context the CLI needed before asking it to generate code.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Model Usage&lt;/strong&gt;: I used &lt;strong&gt;Codex&lt;/strong&gt; exclusively, relying on my engineered context to guide it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Result:&lt;/strong&gt; This was the peak experience. The output adapted to &lt;strong&gt;90%&lt;/strong&gt; of my expectations. By focusing on the &lt;em&gt;plan&lt;/em&gt; rather than the &lt;em&gt;persona&lt;/em&gt;, Copilot became a true extension of my thought process.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Conclusion: The "Greenfield" Flow
&lt;/h3&gt;

&lt;p&gt;Based on this trilogy of experiments, here is my recommended workflow for starting a new project with Copilot CLI:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Plan with Power&lt;/strong&gt;: Use high-reasoning models like &lt;strong&gt;Claude Opus&lt;/strong&gt; or &lt;strong&gt;Gemini Pro&lt;/strong&gt; to create the initial plan.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Review&lt;/strong&gt;: Review the plan carefully. &lt;em&gt;Note: The plan is saved in the chat session memory by default, not as a file in the repo, to keep the workspace clean.&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Code with Speed&lt;/strong&gt;: Switch to &lt;strong&gt;GPT Codex&lt;/strong&gt; for implementation. It's faster and follows the context well.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Feedback Loop&lt;/strong&gt;: Implement the code, check the layout/structure, and provide feedback.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Initialize Context&lt;/strong&gt;: Use &lt;code&gt;/init&lt;/code&gt; to generate project-specific Copilot instructions.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Optimized Instructions&lt;/strong&gt;: Use the &lt;a href="https://github.com/github/awesome-copilot" rel="noopener noreferrer"&gt;awesome-copilot&lt;/a&gt; plugin to find the best agent/instruction/prompt for your specific project type.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Iterate&lt;/strong&gt;: Return to the planning step for the next feature. &lt;em&gt;Crucial: Update the Copilot instructions frequently to keep the context fresh.&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Leverage MCP&lt;/strong&gt;: Use Model Context Protocol (MCP) tools like &lt;strong&gt;Context7&lt;/strong&gt; (to check best practices &amp;amp; modern frameworks) and &lt;strong&gt;Serena&lt;/strong&gt; (to optimize context indexing).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The Copilot CLI isn't just a code generator; it's a collaboration engine. My key takeaway is that &lt;strong&gt;Plan &amp;gt; Config&lt;/strong&gt;. A well-structured plan and curated context are far more effective than a heavily configured environment.&lt;/p&gt;

&lt;h2&gt;
  
  
  📚 References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Tools&lt;/strong&gt;: &lt;a href="https://github.com/features/copilot/cli" rel="noopener noreferrer"&gt;GitHub Copilot CLI&lt;/a&gt;, &lt;a href="https://context7.com" rel="noopener noreferrer"&gt;Context7&lt;/a&gt; (MCP), &lt;a href="https://github.com/oraios/serena" rel="noopener noreferrer"&gt;Serena&lt;/a&gt; (MCP)&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Inspiration&lt;/strong&gt;: &lt;a href="https://github.com/github/awesome-copilot" rel="noopener noreferrer"&gt;awesome-copilot&lt;/a&gt; (for prompt engineering) &lt;a href="https://docs.github.com/en/copilot/how-tos/copilot-cli/cli-best-practices" rel="noopener noreferrer"&gt;copilot best practice&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Libraries&lt;/strong&gt;: &lt;a href="https://textualize.io" rel="noopener noreferrer"&gt;Textualize&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devchallenge</category>
      <category>githubchallenge</category>
      <category>cli</category>
      <category>githubcopilot</category>
    </item>
    <item>
      <title>Algolia v5 + Algolia Agent Studio + Next.js 16: Building a Startup Validator</title>
      <dc:creator>Khôi Nguyễn Vũ</dc:creator>
      <pubDate>Mon, 09 Feb 2026 05:52:16 +0000</pubDate>
      <link>https://forem.com/vukhoi_gvm/algolia-v5-algolia-agent-studio-nextjs-16-building-a-startup-validator-2362</link>
      <guid>https://forem.com/vukhoi_gvm/algolia-v5-algolia-agent-studio-nextjs-16-building-a-startup-validator-2362</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/algolia"&gt;Algolia Agent Studio Challenge&lt;/a&gt;: Consumer-Facing Conversational Experiences&lt;/em&gt;&lt;/p&gt;




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

&lt;p&gt;&lt;strong&gt;Startup Roast&lt;/strong&gt; is an AI-powered startup idea validator that provides brutally honest feedback by analyzing your idea against a database of &lt;strong&gt;2,500+ real YC startups&lt;/strong&gt; and &lt;strong&gt;403+ failed companies&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Before you quit your job, raise money from friends and family, or spend months building something nobody wants - get a reality check in seconds, not months.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Problem
&lt;/h3&gt;

&lt;p&gt;Every year, thousands of entrepreneurs start companies based on "gut feelings" and encouragement from supportive friends who don't want to hurt their feelings. Meanwhile, there are decades of startup data available showing patterns of success and failure that nobody consults until it's too late.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Solution
&lt;/h3&gt;

&lt;p&gt;Startup Roast combines conversational AI with retrieval from thousands of real companies to provide:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Survival Probability Score&lt;/strong&gt; - Multi-factor algorithm (Growth 35%, Market 25%, Team 20%, Funding 15%, Trend 5%)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Market Saturation Analysis&lt;/strong&gt; - Know if you're entering a crowded space&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Funding Likelihood&lt;/strong&gt; - Realistic assessment based on similar companies&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Graveyard Insights&lt;/strong&gt; - See similar companies that failed and WHY they failed&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pivot Suggestions&lt;/strong&gt; - Actionable alternatives when your concept needs refinement&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The Experience
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Search for any startup or describe your own idea&lt;/li&gt;
&lt;li&gt;AI retrieves relevant context from 2,900+ companies using RAG&lt;/li&gt;
&lt;li&gt;Get structured, visual feedback with actionable insights&lt;/li&gt;
&lt;li&gt;Explore pivot suggestions with one click&lt;/li&gt;
&lt;/ol&gt;




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

&lt;p&gt;&lt;strong&gt;Live URL:&lt;/strong&gt; &lt;a href="https://ai-roasting-algolia.vercel.app" rel="noopener noreferrer"&gt;https://ai-roasting-algolia.vercel.app&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Video Demo:&lt;/strong&gt; 

  &lt;iframe src="https://www.youtube.com/embed/TuSimU_864U"&gt;
  &lt;/iframe&gt;


&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Repository:&lt;/strong&gt; &lt;a href="https://github.com/VuKhoiGVM/ai-roasting-algolia.git" rel="noopener noreferrer"&gt;https://github.com/VuKhoiGVM/ai-roasting-algolia.git&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  How I Used Algolia Agent Studio
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Data Indexed
&lt;/h3&gt;

&lt;p&gt;I created two Algolia indices with rich, structured data:&lt;/p&gt;

&lt;h4&gt;
  
  
  1. Startups Index (2,500 records)
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Data Structure:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"objectID"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"yc_31306"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Martini"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"description"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Collaborative AI-native filmmaking for professionals"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"long_description"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Martini is a collaborative, AI-native platform..."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"batch"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"W26"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"status"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Active"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"tags"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"Generative AI"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Entertainment"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Design Tools"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"location"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"San Francisco"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"year_founded"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2025&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"team_size"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"website"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://martini.film"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"is_hiring"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"open_jobs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"category"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Generative AI"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"survival_score"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;64&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"survival_breakdown"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"total"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;64&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"growth"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"market"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"team"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"funding"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"trend"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"penalty"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"saturation"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Medium"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Searchable Attributes:&lt;/strong&gt; name, description, long_description, category, sector, tags, batch, location&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Custom Ranking:&lt;/strong&gt; Higher &lt;code&gt;survival_score&lt;/code&gt; → higher rank, then hiring companies get boost&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Facets:&lt;/strong&gt; category, status, sector, batch, is_hiring, saturation, year_founded&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Graveyard Index (403 records)
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Data Structure:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"objectID"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"fail_Health_Care_0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Aira Health"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"sector"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Health Care"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"category"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Health Care"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"years_of_operation"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2015-2019"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"what_they_did"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Personalized asthma/allergy app"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"how_much_raised"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"$12M"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"raised_amount"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;12000000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"why_they_failed"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Small user base and cash shortage"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"takeaway"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Niche apps need big audiences"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"year_founded"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2015&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"year_closed"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2019&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"lost_to_giants"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"no_budget"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"competition"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"poor_market_fit"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Searchable Attributes:&lt;/strong&gt; name, what_they_did, why_they_failed, takeaway, category, sector&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Custom Ranking:&lt;/strong&gt; Higher &lt;code&gt;raised_amount&lt;/code&gt; → higher rank (bigger failures are more educational), then more recent failures&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Facets:&lt;/strong&gt; 40+ failure reason flags (lost_to_giants, no_budget, competition, poor_market_fit, monetization_failure, etc.)&lt;/p&gt;

&lt;h3&gt;
  
  
  Index Configuration
&lt;/h3&gt;

&lt;p&gt;I configured both indices with optimized settings:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Custom Ranking&lt;/strong&gt; (primary - determines result order):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Startups: Prioritize high-quality, active companies&lt;/span&gt;
&lt;span class="nx"&gt;customRanking&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;desc(survival_score)&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;// 🔥 Primary signal: companies with higher survival potential&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;desc(is_hiring)&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;       &lt;span class="c1"&gt;// 📈 Active growth signal: hiring = expanding&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;desc(batch)&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;           &lt;span class="c1"&gt;// 🆕 Recency bias: newer batches first (W26 &amp;gt; W25)&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;asc(name)&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;              &lt;span class="c1"&gt;// 📝 Alphabetical tie-breaker for consistency&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="c1"&gt;// Graveyard: Most educational failures first&lt;/span&gt;
&lt;span class="nx"&gt;customRanking&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;desc(raised_amount)&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;   &lt;span class="c1"&gt;// 💰 Raised more $$ = more expensive lesson = higher priority&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;desc(year_closed)&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;     &lt;span class="c1"&gt;// 📅 Recent failures = more relevant to current market&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;asc(name)&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;              &lt;span class="c1"&gt;// 📝 Alphabetical tie-breaker&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why This Ranking Works:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;survival_score first&lt;/strong&gt; ensures the best companies surface when browsing&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;is_hiring as boost&lt;/strong&gt; rewards actively growing companies&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;batch recency&lt;/strong&gt; gives newer YC companies visibility (they need it more!)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;raised_amount for graveyard&lt;/strong&gt; shows the most dramatic failures ($3.5B Faraday Future story &amp;gt; $50K failure)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Searchable Attributes&lt;/strong&gt; (after ranking - determines which fields are searched):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;searchableAttributes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;name&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;           &lt;span class="c1"&gt;// Exact company name matches rank highest&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;description&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;    &lt;span class="c1"&gt;// Then description content&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;long_description&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;category&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;       &lt;span class="c1"&gt;// Category matches&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;tags&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;           &lt;span class="c1"&gt;// Tag matches&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;batch&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;          &lt;span class="c1"&gt;// YC batch&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;location&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Typo Tolerance:&lt;/strong&gt; Enabled for 4+ character words, 2 typos for 8+ character words&lt;/p&gt;

&lt;h3&gt;
  
  
  Frontend Integration
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Algolia JavaScript SDK v5
&lt;/h4&gt;

&lt;p&gt;Using &lt;strong&gt;Algolia JavaScript SDK v5.35.0&lt;/strong&gt; with the new search API:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;algoliasearch&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;algoliasearch&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="c1"&gt;// Initialize client with search-only key (safe for frontend)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;algoliasearch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;NEXT_PUBLIC_ALGOLIA_APP_ID&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;NEXT_PUBLIC_ALGOLIA_SEARCH_KEY&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;// v5 Breaking Changes: initIndex() removed, use search() with requests array&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;results&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;search&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;default&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;indexName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;startups&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;query&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;AI healthcare&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;hitsPerPage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;filters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;survival_score &amp;gt;= 40&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;// Only good survival rates&lt;/span&gt;
      &lt;span class="na"&gt;attributesToHighlight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;name&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;description&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;category&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
      &lt;span class="na"&gt;highlightPreTag&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;&amp;lt;em&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;highlightPostTag&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;&amp;lt;/em&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;hits&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;results&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;hits&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Key Search Functions Implemented:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// 1. Unified Search - both indices in parallel&lt;/span&gt;
&lt;span class="nf"&gt;searchAll&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="err"&gt;→&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;Startup&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="nx"&gt;FailedStartup&lt;/span&gt;&lt;span class="p"&gt;)[]&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="c1"&gt;// 2. Single index search with filters&lt;/span&gt;
&lt;span class="nf"&gt;searchStartups&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;category&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;hitsPerPage&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;filters&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;facetFilters&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;

&lt;span class="c1"&gt;// 3. Top performers&lt;/span&gt;
&lt;span class="nf"&gt;getTopStartups&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="err"&gt;→&lt;/span&gt; &lt;span class="nx"&gt;Top&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="nx"&gt;by&lt;/span&gt; &lt;span class="nf"&gt;survival_score &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;filtered&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;getTopGraveyardEntries&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="err"&gt;→&lt;/span&gt; &lt;span class="nx"&gt;Top&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="nx"&gt;by&lt;/span&gt; &lt;span class="nx"&gt;raised_amount&lt;/span&gt;

&lt;span class="c1"&gt;// 4. Faceting for filters&lt;/span&gt;
&lt;span class="nf"&gt;getCategories&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="err"&gt;→&lt;/span&gt; &lt;span class="nx"&gt;Category&lt;/span&gt; &lt;span class="nx"&gt;names&lt;/span&gt; &lt;span class="kd"&gt;with&lt;/span&gt; &lt;span class="nx"&gt;counts&lt;/span&gt;
&lt;span class="nf"&gt;getBatchFacets&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="err"&gt;→&lt;/span&gt; &lt;span class="nx"&gt;YC&lt;/span&gt; &lt;span class="nx"&gt;batches&lt;/span&gt; &lt;span class="kd"&gt;with&lt;/span&gt; &lt;span class="nf"&gt;counts &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;sorted&lt;/span&gt; &lt;span class="nx"&gt;by&lt;/span&gt; &lt;span class="nx"&gt;recency&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;getAllFacets&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="err"&gt;→&lt;/span&gt; &lt;span class="nx"&gt;All&lt;/span&gt; &lt;span class="nx"&gt;facets&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nx"&gt;parallel&lt;/span&gt; &lt;span class="nx"&gt;using&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;all&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="c1"&gt;// 5. Category filtering&lt;/span&gt;
&lt;span class="nf"&gt;searchStartupsByCategory&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;category&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;searchGraveyardByCategory&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;category&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Search Response with Highlights:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;objectID&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;yc_31306&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Martini&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;description&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Collaborative &amp;lt;em&amp;gt;AI&amp;lt;/em&amp;gt;-native filmmaking...&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;category&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Generative &amp;lt;em&amp;gt;AI&amp;lt;/em&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;_highlightResult&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Martini&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;matchLevel&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;none&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;description&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Collaborative &amp;lt;em&amp;gt;AI&amp;lt;/em&amp;gt;-native...&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;matchLevel&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;full&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Vercel AI SDK + Agent Studio
&lt;/h4&gt;

&lt;p&gt;Using &lt;strong&gt;Vercel AI SDK v6&lt;/strong&gt; with direct Agent Studio transport (no backend needed!):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useChat&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;DefaultChatTransport&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ai&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;transport&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;DefaultChatTransport&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;api&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`https://&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;appId&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;.algolia.net/agent-studio/1/agents/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;agentId&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/completions?compatibilityMode=ai-sdk-5`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;x-algolia-application-id&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;appId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;x-algolia-api-key&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;searchKey&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;// Search-only key (safe for client)&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;chat&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useChat&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;transport&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;

&lt;span class="c1"&gt;// Send message&lt;/span&gt;
&lt;span class="nx"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sendMessage&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;userInput&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Response Parsing:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Extract metrics from structured AI response using regex&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;survivalMatch&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;match&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;\*\*&lt;/span&gt;&lt;span class="sr"&gt;Survival Probability:&lt;/span&gt;&lt;span class="se"&gt;\*\*\s&lt;/span&gt;&lt;span class="sr"&gt;*&lt;/span&gt;&lt;span class="se"&gt;(\d&lt;/span&gt;&lt;span class="sr"&gt;+&lt;/span&gt;&lt;span class="se"&gt;)&lt;/span&gt;&lt;span class="sr"&gt;%&lt;/span&gt;&lt;span class="se"&gt;?&lt;/span&gt;&lt;span class="sr"&gt;/i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;saturationMatch&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;match&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;\*\*&lt;/span&gt;&lt;span class="sr"&gt;Market Saturation:&lt;/span&gt;&lt;span class="se"&gt;\*\*\s&lt;/span&gt;&lt;span class="sr"&gt;*&lt;/span&gt;&lt;span class="se"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;Low|Medium|High&lt;/span&gt;&lt;span class="se"&gt;)&lt;/span&gt;&lt;span class="sr"&gt;/i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;fundingMatch&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;match&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;\*\*&lt;/span&gt;&lt;span class="sr"&gt;Funding Likelihood:&lt;/span&gt;&lt;span class="se"&gt;\*\*\s&lt;/span&gt;&lt;span class="sr"&gt;*&lt;/span&gt;&lt;span class="se"&gt;(\d&lt;/span&gt;&lt;span class="sr"&gt;+&lt;/span&gt;&lt;span class="se"&gt;)&lt;/span&gt;&lt;span class="sr"&gt;%&lt;/span&gt;&lt;span class="se"&gt;?&lt;/span&gt;&lt;span class="sr"&gt;/i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;// Parse graveyard entries&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;graveyardMatch&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;match&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;\*\*&lt;/span&gt;&lt;span class="sr"&gt;💀&lt;/span&gt;&lt;span class="se"&gt;[^&lt;/span&gt;&lt;span class="sr"&gt;*&lt;/span&gt;&lt;span class="se"&gt;]&lt;/span&gt;&lt;span class="sr"&gt;*:&lt;/span&gt;&lt;span class="se"&gt;\*\*([\s\S]&lt;/span&gt;&lt;span class="sr"&gt;*&lt;/span&gt;&lt;span class="se"&gt;?)(?=\*\*&lt;/span&gt;&lt;span class="sr"&gt;🔄|&lt;/span&gt;&lt;span class="se"&gt;\*\*&lt;/span&gt;&lt;span class="sr"&gt;The Roast|$&lt;/span&gt;&lt;span class="se"&gt;)&lt;/span&gt;&lt;span class="sr"&gt;/i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;// Parse pivot suggestions&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;pivotMatch&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;match&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;\*\*&lt;/span&gt;&lt;span class="sr"&gt;🔄&lt;/span&gt;&lt;span class="se"&gt;[^&lt;/span&gt;&lt;span class="sr"&gt;*&lt;/span&gt;&lt;span class="se"&gt;]&lt;/span&gt;&lt;span class="sr"&gt;*:&lt;/span&gt;&lt;span class="se"&gt;\*\*([\s\S]&lt;/span&gt;&lt;span class="sr"&gt;*&lt;/span&gt;&lt;span class="se"&gt;?)(?=\*\*&lt;/span&gt;&lt;span class="sr"&gt;|$&lt;/span&gt;&lt;span class="se"&gt;)&lt;/span&gt;&lt;span class="sr"&gt;/i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Rendering Components:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Survival probability → colored progress bar (green ≥70%, yellow 40-69%, red &amp;lt;40%)&lt;/li&gt;
&lt;li&gt;Market saturation → visual meter with emoji indicators (🔥 Low, ⚠️ Medium, 🚫 High)&lt;/li&gt;
&lt;li&gt;Funding likelihood → percentage meter with confidence level&lt;/li&gt;
&lt;li&gt;Graveyard section → cards showing failed companies with reasons&lt;/li&gt;
&lt;li&gt;Pivot suggestions → clickable chips that re-analyze the new direction&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Real-time Search UI:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Debounced search as user types&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;results&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setResults&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;([])&lt;/span&gt;

&lt;span class="nf"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;timer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;setTimeout&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;hits&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;searchAll&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;// Searches both indices&lt;/span&gt;
    &lt;span class="nf"&gt;setResults&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;hits&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;clearTimeout&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;timer&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Query Rules
&lt;/h3&gt;

&lt;p&gt;I implemented query rules for &lt;strong&gt;both indices&lt;/strong&gt; to enhance search experience:&lt;/p&gt;

&lt;h4&gt;
  
  
  Startups Index Query Rules
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;AI/ML Category Boost:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Searching "ai", "ml", "llm", "gpt" → Boost AI/ML companies to top&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;condition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;pattern&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ai&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;anchoring&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;contains&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="nx"&gt;consequence&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;filterPromotes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;params&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;filters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;category:Artificial Intelligence OR category:Machine Learning OR category:AI&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Dev Tools Category Boost:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Searching "dev tools", "developer tools" → Boost Dev Tools companies to top&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;condition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;pattern&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dev&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;anchoring&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;contains&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="nx"&gt;consequence&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;filterPromotes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;params&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;filters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;category:Developer Tools&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Fintech Category Boost:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Searching "fintech", "financial" → Boost Fintech companies to top&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;condition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;pattern&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;fintech&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;anchoring&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;contains&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="nx"&gt;consequence&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;filterPromotes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;params&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;filters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;category:Fintech&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Graveyard Index Query Rules
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Only show graveyard companies relevant when search keywords are 'failed', 'bankrupt', 'shutdown'&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;enabled&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;conditions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt;
      &lt;span class="na"&gt;pattern&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;failed&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;anchoring&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;contains&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
    &lt;span class="p"&gt;}],&lt;/span&gt;
    &lt;span class="nx"&gt;consequence&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;filterPromotes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nx"&gt;userData&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;showGraveyardFirst&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="nx"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Show graveyard for "failed" queries&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Agent Configuration
&lt;/h3&gt;

&lt;p&gt;In Algolia Agent Studio, I configured a custom agent:&lt;/p&gt;

&lt;h4&gt;
  
  
  Tools Configuration
&lt;/h4&gt;

&lt;p&gt;Both indices enabled for retrieval:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;startups&lt;/strong&gt; index search - For successful company analysis&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;graveyard&lt;/strong&gt; index search - For failure pattern analysis&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  LLM Selection
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Google Gemini 2.5 Flash&lt;/strong&gt; - Chosen for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fast response times (&amp;lt;10 seconds)&lt;/li&gt;
&lt;li&gt;Strong reasoning capabilities&lt;/li&gt;
&lt;li&gt;Good with structured output&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  System Prompt Engineering
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You are Startup Roast - a brutally honest startup advisor. Analyze ideas against real data.

Your response MUST follow this exact format:

**Survival Probability:** X%
**Market Saturation:** [Low/Medium/High]
**Funding Likelihood:** X%

**💀 The Graveyard (similar failures):**
- [Company Name]: [brief failure reason]

**🔄 Pivot Suggestions:**
- [Specific pivot idea with reasoning]

**The Roast:**
[Brutally honest analysis with specific references to similar companies from the retrieved data.
Be direct but constructive. Reference actual companies when making comparisons.]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Key Prompt Techniques Used:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Structured output format&lt;/strong&gt; - Enables frontend parsing for visual metrics&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Specific section markers&lt;/strong&gt; - &lt;code&gt;**💀 The Graveyard:**&lt;/code&gt; for regex parsing&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Retrieval grounding&lt;/strong&gt; - "Reference actual companies from retrieved data"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tone setting&lt;/strong&gt; - "Brutally honest but constructive"&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Why This Approach
&lt;/h3&gt;

&lt;p&gt;Instead of building a custom RAG pipeline with vector search and prompt engineering, Algolia Agent Studio gave me:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Custom RAG Pipeline&lt;/th&gt;
&lt;th&gt;Algolia Agent Studio&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Infrastructure&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Vector DB, embedding API, backend server&lt;/td&gt;
&lt;td&gt;Zero infra needed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Setup Time&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Days to weeks&lt;/td&gt;
&lt;td&gt;Hours&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Retrieval Speed&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;2-5 seconds&lt;/td&gt;
&lt;td&gt;&amp;lt;100ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cost&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Multiple API costs&lt;/td&gt;
&lt;td&gt;Single platform&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Maintenance&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Low&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Grounding&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Manual prompt engineering&lt;/td&gt;
&lt;td&gt;Built-in RAG&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Why Fast Retrieval Matters
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The Speed Expectation
&lt;/h3&gt;

&lt;p&gt;In a conversational interface, users expect responses in &lt;strong&gt;seconds&lt;/strong&gt;, not minutes. When someone types "Uber for dog walking," they want feedback now, not after 30 seconds of loading spinners.&lt;/p&gt;

&lt;h3&gt;
  
  
  What Would Happen with Slow Retrieval
&lt;/h3&gt;

&lt;p&gt;Without Algolia's millisecond-level retrieval:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;User abandonment&lt;/strong&gt; - 53% of users abandon sites that take &amp;gt;3 seconds to load&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Context window limits&lt;/strong&gt; - Can't retrieve enough relevant examples with slow APIs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cold starts&lt;/strong&gt; - Every query needs new retrieval, no caching benefits&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cascading delays&lt;/strong&gt; - Slow retrieval → slow LLM → slow generation → frustrated user&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  How Algolia's Speed Improves Experience
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;With Slow Search&lt;/th&gt;
&lt;th&gt;With Algolia&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;First response time&lt;/td&gt;
&lt;td&gt;5-10 seconds&lt;/td&gt;
&lt;td&gt;&amp;lt;1 second&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Relevant examples retrieved&lt;/td&gt;
&lt;td&gt;5-10&lt;/td&gt;
&lt;td&gt;20-50&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Context quality&lt;/td&gt;
&lt;td&gt;Sparse&lt;/td&gt;
&lt;td&gt;Rich &amp;amp; diverse&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;User engagement&lt;/td&gt;
&lt;td&gt;Drop off after 1 query&lt;/td&gt;
&lt;td&gt;Continue exploring pivots&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Real Example
&lt;/h3&gt;

&lt;p&gt;When a user types "dating app with AI matching for people over 30":&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Algolia retrieves instantly:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;500+ dating/tech companies across both indices&lt;/li&gt;
&lt;li&gt;Failed companies like Woo ($1.5M raised, lost to Tinder)&lt;/li&gt;
&lt;li&gt;Market saturation: High (dominated by Match Group, Bumble)&lt;/li&gt;
&lt;li&gt;Survival Probability: 20%&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Structured Metrics Displayed:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Survival Probability: 20% (Danger zone 💀)
Funding Likelihood: 15% (Better bring cash 💸)
Market Saturation: High (Crowded market 👥)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Graveyard Section:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;💀 Woo ($1.5M) - Dating app for professionals, lost to Tinder. The dating app market is dominated by giants.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;The Roast (with real data):&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"The dating app market is a brutal graveyard for new entrants. You're entering a 'High' saturation market dominated by Match Group (Tinder, Hinge, OKCupid) and Bumble, who have massive user bases and deep pockets for marketing. Your differentiation, 'AI suggestions for matching,' is a feature, not a unique product. Woo raised $1.5M and couldn't compete with Tinder."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Pivot Suggestions:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"Divorced Parents Dating App" → 40% survival score&lt;/li&gt;
&lt;li&gt;"Travel Enthusiasts Over 30" → Medium saturation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;After clicking a pivot:&lt;/strong&gt;&lt;br&gt;
The user clicks "Divorced Parents Dating App" and the AI instantly re-analyzes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Survival Probability improves to 40%&lt;/li&gt;
&lt;li&gt;Market Saturation drops to Medium&lt;/li&gt;
&lt;li&gt;New pivot suggestions appear&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This shows the full power: &lt;strong&gt;instant retrieval → brutal honesty → actionable pivots&lt;/strong&gt;. Users can iterate 5-6 times in one session, each time getting specific feedback grounded in real company data.&lt;/p&gt;




&lt;h2&gt;
  
  
  Tech Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Frontend:&lt;/strong&gt; Next.js 16.1.6 (App Router + Turbopack), React 19&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI:&lt;/strong&gt; Algolia Agent Studio, Vercel AI SDK v6, Google Gemini 2.5 Flash&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Search:&lt;/strong&gt; Algolia JavaScript SDK v5.35.0&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Styling:&lt;/strong&gt; Tailwind CSS v4, shadcn/ui&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data:&lt;/strong&gt; 2,500 YC startups + 403 failed companies&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;Potential improvements I'd love to add:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] User accounts to save favorite roasts&lt;/li&gt;
&lt;li&gt;[ ] Export analysis as PDF&lt;/li&gt;
&lt;li&gt;[ ] Industry trend visualization&lt;/li&gt;
&lt;li&gt;[ ] Investor perspective mode&lt;/li&gt;
&lt;li&gt;[ ] Co-founder matching based on complementary skills&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Built with 🔥 for the Algolia Agent Studio Challenge 2026&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Demo: &lt;a href="https://youtu.be/TuSimU_864U" rel="noopener noreferrer"&gt;https://youtu.be/TuSimU_864U&lt;/a&gt; | Live: &lt;a href="https://ai-roasting-algolia.vercel.app" rel="noopener noreferrer"&gt;https://ai-roasting-algolia.vercel.app&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;💬 &lt;strong&gt;Got questions? Drop them in the comments below!&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;I'm happy to discuss:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Algolia Agent Studio setup and configuration&lt;/li&gt;
&lt;li&gt;Survival score algorithm tuning&lt;/li&gt;
&lt;li&gt;Working with Algolia v5 SDK&lt;/li&gt;
&lt;li&gt;Startup graveyard data sourcing&lt;/li&gt;
&lt;li&gt;Or anything else about the project!&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devchallenge</category>
      <category>algoliachallenge</category>
      <category>ai</category>
      <category>agents</category>
    </item>
  </channel>
</rss>
