<?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: Mayank Parashar</title>
    <description>The latest articles on Forem by Mayank Parashar (@mahirr).</description>
    <link>https://forem.com/mahirr</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%2F3698934%2Fabce3a65-3054-4671-b2c6-9ebacafe8c55.jpg</url>
      <title>Forem: Mayank Parashar</title>
      <link>https://forem.com/mahirr</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/mahirr"/>
    <language>en</language>
    <item>
      <title>How I Served 80,000+ Recommendations in Under 50ms</title>
      <dc:creator>Mayank Parashar</dc:creator>
      <pubDate>Wed, 15 Apr 2026 04:53:56 +0000</pubDate>
      <link>https://forem.com/mahirr/how-i-served-80000-recommendations-in-under-50ms-1l32</link>
      <guid>https://forem.com/mahirr/how-i-served-80000-recommendations-in-under-50ms-1l32</guid>
      <description>&lt;p&gt;Every recommendation tutorial I found was either a Netflix black box or a 1,000-row Jupyter notebook toy. I wanted something in between — real, deployable, and something I actually understood.&lt;br&gt;
That's how Inkpick was born: a hybrid recommendation engine across cinema, music, and courses with sub-50ms inference on 80,000+ items. Just NumPy, FastAPI, and deliberate design choices.&lt;/p&gt;

&lt;p&gt;What "&lt;strong&gt;Hybrid&lt;/strong&gt;" Means&lt;/p&gt;

&lt;p&gt;Content-Based Filtering — works on day one, no user history needed. But it traps users in a bubble.&lt;br&gt;
Collaborative Filtering — discovers surprising cross-user patterns. Falls apart for new users (cold-start problem).&lt;/p&gt;

&lt;p&gt;A hybrid blends both:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;score_hybrid(i) = α · score_cb(i) + (1 - α) · score_cf(i)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Inkpick defaults α = 0.65 — content-biased for cold-start users, shifting toward collaborative as history grows.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;plaintext
The Architecture
Client (Vanilla JS)
       │
  FastAPI (Async)
  ┌────┴────┬──────────┐
TF-IDF   Latent    Levenshtein
+ CSR    Factor    Fuzzy Search
  └────┬────┘
  Hybrid Layer
       │
 Service Registry
(cinema / audio / edu)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each domain is fully decoupled. Adding a new domain = one new service file.&lt;/p&gt;

&lt;p&gt;Content-Based: &lt;strong&gt;TF-IDF + Cosine Similarity&lt;/strong&gt;&lt;br&gt;
TF-IDF turns item metadata (title, genre, tags) into vectors. Words unique to one item = high weight. Common words like "the" = penalized.&lt;/p&gt;

&lt;p&gt;Similarity between items is then a dot product:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;similarity(q, i) = (q · i) / (‖q‖ · ‖i‖)

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Why not SciPy? Inkpick implements CSR (Compressed Sparse Row) ops directly in NumPy — cutting a ~30MB dependency, reducing memory, and keeping full control over the pipeline. An 80,000-item matrix is ~98% zeros; CSR stores only non-zero values.&lt;/p&gt;

&lt;p&gt;Collaborative Filtering: Latent Factors&lt;br&gt;
CF decomposes the user–item interaction matrix into lower-dimensional embeddings:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;R ≈ U × Vᵀ
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These latent dimensions learn hidden patterns — "likes slow-burn thrillers" — without being told. In Inkpick, this module is a production-ready stub awaiting a trained ALS/BPR model. Honest limitation, next on the roadmap.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fuzzy Search Fallback&lt;/strong&gt;&lt;br&gt;
Search "Godfater" → no match → system fails. Not ideal.&lt;br&gt;
Inkpick uses Levenshtein edit-distance as a safety net:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"Godfater" → "Godfather" = 1 edit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When exact search fails, fuzzy kicks in and returns the closest matches. Small addition, big UX improvement.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;The API
GET /recommend/cinema?item_id=tt0111161&amp;amp;top_k=5&amp;amp;mode=hybrid
json{
  "domain": "cinema",
  "results": [{ "title": "The Godfather", "score": 0.94 }],
  "latency_ms": 38
}
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The mode param accepts content, collaborative, or hybrid — handy for debugging.&lt;/p&gt;

&lt;p&gt;What I'd Fix in v2&lt;/p&gt;

&lt;p&gt;Train the CF model — ALS or BPR. The hybrid is only as good as both components.&lt;br&gt;
SBERT over TF-IDF — semantic similarity that keyword matching completely misses.&lt;/p&gt;

&lt;p&gt;Add evaluation metrics — Precision@K, NDCG. Fast latency is measurable; recommendation quality currently isn't.&lt;/p&gt;

&lt;p&gt;Dynamic α — learn the blend weight per user instead of hardcoding 0.65.&lt;/p&gt;

&lt;p&gt;Diversity control — MMR to avoid returning "10 Batman movies."&lt;/p&gt;

&lt;p&gt;Try It&lt;/p&gt;

&lt;p&gt;live   : inkpick.vercel.app&lt;br&gt;
github : github.com/MayankParashar28/inkpick&lt;/p&gt;

&lt;p&gt;Drop a comment if you're building something similar — would love to exchange notes.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>fastapi</category>
      <category>performance</category>
    </item>
    <item>
      <title>Lumina — Where Blogs Meet AI</title>
      <dc:creator>Mayank Parashar</dc:creator>
      <pubDate>Mon, 12 Jan 2026 16:39:26 +0000</pubDate>
      <link>https://forem.com/mahirr/lumina-where-blogs-meet-ai-4m30</link>
      <guid>https://forem.com/mahirr/lumina-where-blogs-meet-ai-4m30</guid>
      <description>&lt;p&gt;&lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/MayankParashar28/Lumina" rel="noopener noreferrer"&gt;https://github.com/MayankParashar28/Lumina&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Live Demo:&lt;/strong&gt; &lt;a href="https://lluminaa.vercel.app" rel="noopener noreferrer"&gt;https://lluminaa.vercel.app&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Developer:&lt;/strong&gt; Mahir (Mayank Parashar)&lt;/p&gt;




&lt;h2&gt;
  
  
  Project Overview
&lt;/h2&gt;

&lt;p&gt;Lumina is a full-stack intelligent blogging platform that integrates Artificial Intelligence and semantic search to enhance how users create, discover, and interact with content. The platform transforms traditional blogging into a context-aware knowledge ecosystem using vector embeddings and AI-powered analysis.&lt;/p&gt;

&lt;p&gt;This project demonstrates strong capabilities in modern web development, backend architecture, API integrations, and scalable system design. Lumina was built with production readiness, performance optimization, and maintainability in mind.&lt;/p&gt;




&lt;h2&gt;
  
  
  Key Features
&lt;/h2&gt;

&lt;h3&gt;
  
  
  AI-Powered Semantic Search
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Context-aware search powered by Google Gemini embeddings
&lt;/li&gt;
&lt;li&gt;Cosine similarity matching for accurate content retrieval &lt;/li&gt;
&lt;li&gt;Smart recommendations based on semantic relevance
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Intelligent Content Processing
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Automated content summarization &lt;/li&gt;
&lt;li&gt;Related article discovery using embeddings&lt;/li&gt;
&lt;li&gt;Improved search ranking and relevance&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Real-Time Experience
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Live notifications using Socket.IO&lt;/li&gt;
&lt;li&gt;Infinite scrolling feed for optimized UX&lt;/li&gt;
&lt;li&gt;Responsive layout across devices&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Security and Access Control
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Secure authentication using OAuth and password hashing&lt;/li&gt;
&lt;li&gt;Role-based access control&lt;/li&gt;
&lt;li&gt;Admin moderation dashboard&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Technology Stack
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Layer&lt;/th&gt;
&lt;th&gt;Technologies&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Frontend&lt;/td&gt;
&lt;td&gt;EJS Templates, HTML, CSS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Backend&lt;/td&gt;
&lt;td&gt;Node.js, Express.js&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database&lt;/td&gt;
&lt;td&gt;MongoDB Atlas&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AI Services&lt;/td&gt;
&lt;td&gt;Google Gemini API&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Real-Time&lt;/td&gt;
&lt;td&gt;Socket.IO&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Deployment&lt;/td&gt;
&lt;td&gt;Vercel, Docker&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Version Control&lt;/td&gt;
&lt;td&gt;GitHub&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Architecture Overview
&lt;/h2&gt;

&lt;p&gt;Lumina follows a modular and scalable architecture:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Client Layer:&lt;/strong&gt; User interface rendering and user interaction&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Application Layer:&lt;/strong&gt; Routing, middleware, authentication&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Business Logic Layer:&lt;/strong&gt; Blog services, AI processing, search engine
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;External Services:&lt;/strong&gt; Gemini API, MongoDB Atlas, CDN&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This separation of concerns improves maintainability, scalability, and development velocity.&lt;/p&gt;




&lt;h2&gt;
  
  
  Engineering Highlights
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Implemented semantic search pipelines using vector embeddings&lt;/li&gt;
&lt;li&gt;Designed secure authentication and authorization workflows&lt;/li&gt;
&lt;li&gt;Built real-time communication channels using WebSockets&lt;/li&gt;
&lt;li&gt;Optimized backend performance with modular service architecture&lt;/li&gt;
&lt;li&gt;Containerized the application for scalable deployments&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Learning Outcomes
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Practical experience integrating AI APIs into production systems
&lt;/li&gt;
&lt;li&gt;Full-stack development with real-world scalability considerations
&lt;/li&gt;
&lt;li&gt;Secure system design and data handling
&lt;/li&gt;
&lt;li&gt;Performance optimization and system modularization
&lt;/li&gt;
&lt;li&gt;Deployment automation and cloud hosting workflows
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Repository and Demo
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Source Code: &lt;a href="https://github.com/MayankParashar28/Lumina" rel="noopener noreferrer"&gt;https://github.com/MayankParashar28/Lumina&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Live Application: &lt;a href="https://lluminaa.vercel.app" rel="noopener noreferrer"&gt;https://lluminaa.vercel.app&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Career Objective
&lt;/h2&gt;

&lt;p&gt;I am actively seeking internship opportunities in Software Engineering, Full Stack Development, and AI-driven applications where I can contribute to impactful products while continuing to strengthen my engineering skills.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>ai</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
