<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Faizal Ardian Putra</title>
    <description>The latest articles on DEV Community by Faizal Ardian Putra (@faizalardian).</description>
    <link>https://dev.to/faizalardian</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%2F2005742%2F61ddcd56-aa99-48f7-990a-5a1d9871f9a5.jpeg</url>
      <title>DEV Community: Faizal Ardian Putra</title>
      <link>https://dev.to/faizalardian</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/faizalardian"/>
    <language>en</language>
    <item>
      <title>From Laravel to Vector Databases: Exploring AI-Powered Search</title>
      <dc:creator>Faizal Ardian Putra</dc:creator>
      <pubDate>Sat, 19 Jul 2025 12:53:17 +0000</pubDate>
      <link>https://dev.to/faizalardian/from-laravel-to-vector-databases-exploring-ai-powered-search-2854</link>
      <guid>https://dev.to/faizalardian/from-laravel-to-vector-databases-exploring-ai-powered-search-2854</guid>
      <description>&lt;p&gt;&lt;em&gt;A backend developer's honest take on building semantic search, RAG systems, and recommendation engines&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Why I Built These Projects
&lt;/h2&gt;

&lt;p&gt;As a Laravel backend developer, I'm comfortable with the usual stack – MySQL databases, Eloquent ORM, Redis for caching. But lately, I've been hearing a lot about "AI" and "vector databases" and wondered what all the fuss was about.&lt;/p&gt;

&lt;p&gt;So I decided to build four projects to understand how these technologies actually work and how they might fit into the web development world I know. This isn't about replacing Laravel or MySQL – it's about understanding new tools that could complement what we already do well.&lt;/p&gt;

&lt;p&gt;Here's what I discovered by building these projects from scratch.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the Heck is a Vector Database Anyway?
&lt;/h2&gt;

&lt;p&gt;Let me explain this the way I wish someone had explained it to me. &lt;/p&gt;

&lt;p&gt;You know how in Laravel, we store data in rows and columns? Well, imagine if instead of storing "iPhone 13 Pro Max" as a string, we could store the &lt;em&gt;meaning&lt;/em&gt; of that phrase as a list of 384 numbers. Sounds crazy, right?&lt;/p&gt;

&lt;p&gt;Here's the magic: when someone searches for "latest Apple smartphone," the system converts that query into the same type of 384-number list. Then it finds database entries with similar number patterns. Boom – semantic search!&lt;/p&gt;

&lt;p&gt;Think of it like this: if traditional databases are like filing cabinets where you need to know the exact folder name, vector databases are like having a super-smart librarian who understands what you actually mean.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why These Projects Explore Vector Databases
&lt;/h2&gt;

&lt;p&gt;I'm not abandoning MySQL – it's still perfect for transactional data. But these projects explore what happens when you need to understand meaning and context, which traditional databases aren't designed for.&lt;/p&gt;

&lt;p&gt;Here's what I wanted to understand through these projects:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Search Problem&lt;/strong&gt;: What if users could search by meaning instead of exact keywords? How would that work technically?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Recommendation Problem&lt;/strong&gt;: Instead of simple "related products," what if recommendations could understand deeper relationships between items?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Content Problem&lt;/strong&gt;: When you have thousands of documents, how do you find related content that shares concepts but different words?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Multi-Modal Problem&lt;/strong&gt;: How can you search images using text descriptions, or find similar images?&lt;/p&gt;

&lt;h2&gt;
  
  
  Project 1: Understanding Document Search
&lt;/h2&gt;

&lt;p&gt;My first project was intentionally simple: a semantic search system with 23 diverse documents. The goal was to understand how vector search actually works compared to traditional database queries.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Technical Reality
&lt;/h3&gt;

&lt;p&gt;In Laravel, we're used to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nv"&gt;$products&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Product&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;where&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'name'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'LIKE'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'%'&lt;/span&gt; &lt;span class="mf"&gt;.&lt;/span&gt; &lt;span class="nv"&gt;$query&lt;/span&gt; &lt;span class="mf"&gt;.&lt;/span&gt; &lt;span class="s1"&gt;'%'&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;get&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With vector search, the approach is fundamentally different:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Convert text to 384-dimensional vector
&lt;/span&gt;&lt;span class="n"&gt;embedding&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;encode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;search query&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# Find similar vectors in database
&lt;/span&gt;&lt;span class="n"&gt;results&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;collection&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;query&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;query_embeddings&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;embedding&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;What I discovered&lt;/strong&gt;: When I searched for "Warcraft," the system returned documents about "Thrall meets Jaina" and "Sylvanas Windrunner" – even though those documents never contained the word "Warcraft." The system understood these were related concepts through the vector representations.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why This Matters for Laravel Devs
&lt;/h3&gt;

&lt;p&gt;Imagine you're building a blog platform. Instead of:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nv"&gt;$posts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Post&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;where&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'title'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'LIKE'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'%laravel%'&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;orWhere&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'content'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'LIKE'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'%laravel%'&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;get&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You could do:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Find posts semantically related to Laravel
&lt;/span&gt;&lt;span class="n"&gt;posts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;search_posts&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;web development framework PHP&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# Returns Laravel posts, Symfony posts, CodeIgniter posts, etc.
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The difference? Your search understands that someone looking for "web development framework PHP" probably wants Laravel content, even if they didn't type "Laravel."&lt;/p&gt;

&lt;h2&gt;
  
  
  Project 2: Exploring RAG (Retrieval-Augmented Generation)
&lt;/h2&gt;

&lt;p&gt;RAG stands for Retrieval-Augmented Generation – basically combining search with AI to answer questions using your own content.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Concept I Wanted to Test
&lt;/h3&gt;

&lt;p&gt;The idea is simple: instead of having AI answer questions from its general training, you first search your own documents for relevant information, then have AI answer based on that specific content.&lt;/p&gt;

&lt;h3&gt;
  
  
  How RAG Works in Practice
&lt;/h3&gt;

&lt;p&gt;Think of it as a three-step process:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Search your content&lt;/strong&gt; for relevant information (the retrieval part)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Combine the question with found content&lt;/strong&gt; (the augmentation part)
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Generate an answer&lt;/strong&gt; based on your specific content (the generation part)&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  The Technical Flow
&lt;/h3&gt;

&lt;p&gt;In this project, the process works like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;User asks: "What are vector databases used for?"&lt;/li&gt;
&lt;li&gt;System searches the document collection for relevant content&lt;/li&gt;
&lt;li&gt;AI receives both the question and the found content as context&lt;/li&gt;
&lt;li&gt;AI generates an answer based only on the provided content&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This approach ensures the AI answers are grounded in your actual content rather than making up information from its general training.&lt;/p&gt;

&lt;h2&gt;
  
  
  Project 3: Exploring Multi-Modal Search
&lt;/h2&gt;

&lt;p&gt;This project explores something that fascinated me: searching images using text descriptions, and vice versa.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Traditional Approach vs. Multi-Modal
&lt;/h3&gt;

&lt;p&gt;Typically in Laravel, we handle images like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nc"&gt;Schema&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'products'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;Blueprint&lt;/span&gt; &lt;span class="nv"&gt;$table&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nv"&gt;$table&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'image_path'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nv"&gt;$table&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'alt_text'&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;nullable&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;But what if you could search images by describing what you're looking for? Like typing "a cute cat" and finding cat images, even if they were never tagged or named "cat"?&lt;/p&gt;

&lt;h3&gt;
  
  
  Understanding CLIP
&lt;/h3&gt;

&lt;p&gt;CLIP (Contrastive Language-Image Pre-training) is a model that converts both images and text into the same 512-dimensional vector space. This means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Images become vectors&lt;/li&gt;
&lt;li&gt;Text descriptions become vectors
&lt;/li&gt;
&lt;li&gt;Similar concepts (image + text) have similar vectors&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The project demonstrates two types of search:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Text-to-image&lt;/strong&gt;: Search for images using text descriptions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Image-to-image&lt;/strong&gt;: Find similar images using another image as the query&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Real-World Applications for Web Developers
&lt;/h3&gt;

&lt;p&gt;Imagine building:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;E-commerce platforms&lt;/strong&gt; where users upload a photo and find similar products&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Content management systems&lt;/strong&gt; where editors can find stock photos by describing what they need&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Social platforms&lt;/strong&gt; where you can search posts by visual content, not just hashtags&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Project 4: Understanding Content-Based Recommendations
&lt;/h2&gt;

&lt;p&gt;This project explores how to build recommendations based on product characteristics rather than simple category matching.&lt;/p&gt;

&lt;h3&gt;
  
  
  Traditional vs. Vector-Based Recommendations
&lt;/h3&gt;

&lt;p&gt;In Laravel, we typically do simple recommendations like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nv"&gt;$related&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Product&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;where&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'category_id'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$product&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;category_id&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;where&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'id'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'!='&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$product&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;id&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;inRandomOrder&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;limit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;4&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;get&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This project explores a different approach: what if recommendations were based on understanding the actual characteristics of products?&lt;/p&gt;

&lt;h3&gt;
  
  
  The Content-Based Concept
&lt;/h3&gt;

&lt;p&gt;Instead of "people who bought X also bought Y," this system analyzes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Product descriptions and features&lt;/li&gt;
&lt;li&gt;User purchase history patterns&lt;/li&gt;
&lt;li&gt;Semantic similarities between products&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The system creates embeddings from product descriptions using TF-IDF (Term Frequency-Inverse Document Frequency), then builds user profiles based on their purchase history.&lt;/p&gt;

&lt;h3&gt;
  
  
  How It Works in Practice
&lt;/h3&gt;

&lt;p&gt;The project demonstrates:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Product Analysis&lt;/strong&gt;: Convert product descriptions into vector representations&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;User Profiling&lt;/strong&gt;: Create user "taste profiles" from their purchase history&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Similarity Matching&lt;/strong&gt;: Find products with similar characteristics to user preferences&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This approach can recommend products across different categories if they share similar characteristics or appeal to similar user preferences.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Learned Building These Projects
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The Learning Curve
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Mathematical Concepts&lt;/strong&gt;: As a web developer, concepts like "cosine similarity" and "high-dimensional vectors" seemed intimidating at first. But they're actually just ways to measure how similar things are.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;New Dependencies&lt;/strong&gt;: Instead of just Composer packages, I was dealing with Python libraries, pre-trained models, and different types of data processing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Different Thinking&lt;/strong&gt;: Moving from "exact matches" to "similarity scores" required rethinking how search and recommendations work.&lt;/p&gt;

&lt;h3&gt;
  
  
  What Made It Manageable
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Pre-trained Models&lt;/strong&gt;: I didn't need to train anything from scratch. Using existing models like SentenceTransformer and CLIP made the projects feasible.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Simple Analogies&lt;/strong&gt;: Vector similarity is like measuring distance between points, just in many more dimensions than we can visualize.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Incremental Complexity&lt;/strong&gt;: Starting with basic document search, then adding AI responses, then images, then recommendations built understanding gradually.&lt;/p&gt;

&lt;h2&gt;
  
  
  What These Projects Taught Me
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Technical Insights
&lt;/h3&gt;

&lt;p&gt;These aren't just cool tech demos – they represent different approaches to common web development problems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Semantic search&lt;/strong&gt; could improve site search functionality&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;RAG systems&lt;/strong&gt; could power smarter help systems or chatbots&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-modal search&lt;/strong&gt; could enhance e-commerce product discovery&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Content-based recommendations&lt;/strong&gt; could improve user engagement&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Practical Advice for Laravel Developers
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Start Here, Not There
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Don't&lt;/strong&gt;: Try to build everything from scratch&lt;br&gt;
&lt;strong&gt;Do&lt;/strong&gt;: Use existing services like OpenAI embeddings API or Cohere&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Don't&lt;/strong&gt;: Worry about the math initially&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Do&lt;/strong&gt;: Focus on the user experience and business value&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Don't&lt;/strong&gt;: Replace your entire stack overnight&lt;br&gt;
&lt;strong&gt;Do&lt;/strong&gt;: Add vector search as a complementary feature&lt;/p&gt;

&lt;h3&gt;
  
  
  How This Could Work with Laravel
&lt;/h3&gt;

&lt;p&gt;These projects showed me that you don't need to replace existing systems. Instead, you could:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Keep Laravel&lt;/strong&gt; for user management, transactions, and business logic&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep MySQL&lt;/strong&gt; for structured data that needs consistency&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add vector services&lt;/strong&gt; for search and discovery features&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use APIs&lt;/strong&gt; to connect Laravel with AI services when needed&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Practical Integration Options
&lt;/h3&gt;

&lt;p&gt;Based on building these projects, here are approaches that could work:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Managed Services&lt;/strong&gt;: Use APIs like OpenAI embeddings or Pinecone for vector storage&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Microservices&lt;/strong&gt;: Run Python-based AI services alongside Laravel applications&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hybrid Search&lt;/strong&gt;: Combine traditional database queries with semantic search&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gradual Adoption&lt;/strong&gt;: Start with one feature like improved search, then expand&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Reflections on the Technology
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What I Understand Now
&lt;/h3&gt;

&lt;p&gt;Building these projects clarified several things:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It's About Enhancement, Not Replacement&lt;/strong&gt;: Vector databases don't replace traditional databases – they solve different problems.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Tools Are Maturing&lt;/strong&gt;: Pre-trained models and managed services make this technology accessible without deep AI expertise.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Real Business Value&lt;/strong&gt;: These aren't just demos – semantic search, intelligent Q&amp;amp;A, and better recommendations solve real user problems.&lt;/p&gt;

&lt;h3&gt;
  
  
  Areas for Further Exploration
&lt;/h3&gt;

&lt;p&gt;These projects opened up questions I'd like to explore:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Performance at Scale&lt;/strong&gt;: How do these approaches perform with millions of documents or users?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cost Management&lt;/strong&gt;: What are the ongoing costs of embedding generation and vector storage?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hybrid Approaches&lt;/strong&gt;: How can you combine traditional and semantic search for the best results?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Integration Patterns&lt;/strong&gt;: What are the best ways to integrate these capabilities into existing Laravel applications?&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I Think This is Worth Exploring
&lt;/h2&gt;

&lt;p&gt;Building these projects taught me that vector databases and AI aren't some distant future technology – they're tools that can solve problems we face today in web development.&lt;/p&gt;

&lt;p&gt;The barrier to entry is lower than I expected. You don't need to understand neural network architectures or train your own models. You can start with pre-built services and libraries.&lt;/p&gt;

&lt;p&gt;For Laravel developers, this feels similar to when we first learned about Redis or Elasticsearch – initially unfamiliar, but ultimately just another tool that's good at specific tasks.&lt;/p&gt;

&lt;p&gt;If you're curious about how these technologies work in practice, I'd recommend starting with a simple document search project. The concepts become much clearer when you see them in action rather than just reading about them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;

&lt;p&gt;The projects in this repository progress from simple to complex:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Start with Project 1&lt;/strong&gt; if you want to understand basic vector search&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Try Project 2&lt;/strong&gt; to see how AI can answer questions using your content
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Explore Project 3&lt;/strong&gt; for multi-modal search capabilities&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Build Project 4&lt;/strong&gt; to understand content-based recommendations&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Each project includes detailed documentation explaining every line of code, assuming no prior AI knowledge.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;The complete code and technical documentation for all four projects is available in the &lt;a href="https://github.com/faizal97/vector-stores-project" rel="noopener noreferrer"&gt;vector-stores-project repository&lt;/a&gt;. Each project includes step-by-step explanations designed for web developers exploring AI-powered applications.&lt;/em&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Fastest AI Model ever</title>
      <dc:creator>Faizal Ardian Putra</dc:creator>
      <pubDate>Sat, 19 Jul 2025 10:40:27 +0000</pubDate>
      <link>https://dev.to/faizalardian/fastest-ai-model-ever-3d4p</link>
      <guid>https://dev.to/faizalardian/fastest-ai-model-ever-3d4p</guid>
      <description>&lt;p&gt;I was just reading a paper about Mercury, an AI language model that generates text and code incredibly fast by using a different method called “diffusion.”&lt;/p&gt;

&lt;p&gt;Before I explain it a bit more, if you’re interested in reading the full paper, you can check it out at: &lt;a href="https://arxiv.org/pdf/2506.17298" rel="noopener noreferrer"&gt;https://arxiv.org/pdf/2506.17298&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;How Traditional AI Models Work&lt;br&gt;
Mercury is an AI model similar to GPT, Gemini, Claude, etc., but the difference lies in how it generates answers.&lt;/p&gt;

&lt;p&gt;Traditional AI models use autoregressive processing, working sequentially like a person talking — word by word, or in AI terms, token by token. Each token depends on the previous one. This approach is accurate but slow because of its one-by-one process. It’s like someone writing a sentence word by word.&lt;/p&gt;

&lt;p&gt;How Mercury Works: Diffusion&lt;br&gt;
Mercury, however, uses what’s called diffusion. This model works in parallel, starting with a rough “noisy” draft of the entire answer and refining it all at once over several steps. It generates multiple tokens simultaneously.&lt;/p&gt;

&lt;p&gt;Think of it like a sculptor starting with a rough block of stone and quickly chipping away to reveal the final statue. This approach is much faster on modern computer chips (GPUs).&lt;/p&gt;

&lt;p&gt;Their big idea is: From fixing to creating&lt;br&gt;
If you can train an AI to be incredibly good at fixing something that’s broken, you can use that skill to create something new from scratch.&lt;/p&gt;

&lt;p&gt;How they train the AI&lt;br&gt;
Before the AI can do anything useful, it needs to be trained. This is how Mercury trains the AI:&lt;/p&gt;

&lt;p&gt;Start with something perfect: They begin with something flawless, like a piece of code that actually runs.&lt;br&gt;
Systematically ruin it: They intentionally add “noise” or damage to the code, such as adding gibberish words, deleting some, or shuffling others. This is done in stages, from slightly worse to completely unreadable and nonsensical.&lt;br&gt;
Teach the AI to fix it: They show the AI the damaged version and tell it: “This is a broken version of the original. Your only job is to figure out what the original, perfect version looked like.”&lt;br&gt;
They repeat this millions of times with millions of examples. The AI doesn’t learn how to create code; it learns how to restore broken code to its original, perfect state. This is called a denoising objective.&lt;/p&gt;

&lt;p&gt;How to generate a new answer&lt;br&gt;
This is where the magic happens. Now that they have an expert “restorer” AI, how can they ask it to write new code to answer a prompt like “write a Python function to sort a list?”&lt;/p&gt;

&lt;p&gt;Give it pure chaos: Instead of providing damaged code like in the training phase, they give it completely random gibberish that matches the length of the expected answer.&lt;br&gt;
Ask the AI to “fix” it: They tell the AI: “This is a broken version of an actual perfectly written Python function to sort a list that has been damaged 100%. Restore it.”&lt;br&gt;
The AI gets to work: The AI looks at the random noise and, using its restoration training, makes its best guess.&lt;br&gt;
Step 1: The gibberish becomes a faint, blurry outline of code structure.&lt;br&gt;
Step 2: The blurry structure sharpens into recognizable words like def, return, brackets, etc.&lt;br&gt;
Step 3: The words arrange themselves into a final, perfect working piece of code.&lt;br&gt;
The Secret to its speed: Working in parallel&lt;br&gt;
Modern GPUs are like having thousands of tiny workers. The old way of AI only gives one worker a job at a time. The Mercury approach gives all thousands of workers a job to do simultaneously, which is why it’s incredibly fast.&lt;/p&gt;

&lt;p&gt;A Final Piece: The AI’s “Brain”&lt;br&gt;
The paper mentions the “Transformer architecture.” You can simply think of this as the specific design of the AI’s brain. They chose a very popular and well-understood brain design. This was a smart move because it meant they could use all the existing tools and optimizations that have been built for it over the years, making their job much easier.&lt;/p&gt;

&lt;p&gt;So, in summary: they taught a popular type of AI brain a new trick (unscrambling) which allows it to generate entire answers at once, making it dramatically faster.&lt;/p&gt;

&lt;p&gt;You can try it yourself at &lt;a href="https://chat.inceptionlabs.ai/" rel="noopener noreferrer"&gt;https://chat.inceptionlabs.ai/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>diffusion</category>
      <category>programming</category>
      <category>learning</category>
    </item>
  </channel>
</rss>
