<?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: Sneha Wani</title>
    <description>The latest articles on DEV Community by Sneha Wani (@snehawani).</description>
    <link>https://dev.to/snehawani</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%2F3987088%2Fea90c328-dcc4-46ec-9919-52ae8d302f54.png</url>
      <title>DEV Community: Sneha Wani</title>
      <link>https://dev.to/snehawani</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/snehawani"/>
    <language>en</language>
    <item>
      <title>India's Lending Market Is a Classic Matching Theory Problem — Here's How AI Solves It</title>
      <dc:creator>Sneha Wani</dc:creator>
      <pubDate>Tue, 16 Jun 2026 09:59:13 +0000</pubDate>
      <link>https://dev.to/snehawani/indias-lending-market-is-a-classic-matching-theory-problem-heres-how-ai-solves-it-4nbe</link>
      <guid>https://dev.to/snehawani/indias-lending-market-is-a-classic-matching-theory-problem-heres-how-ai-solves-it-4nbe</guid>
      <description>&lt;p&gt;You've probably heard of the Stable Matching Problem — the Nobel Prize-winning algorithm behind how med students get matched to hospitals, or how college admissions work in theory.&lt;/p&gt;

&lt;p&gt;What most people don't realize: &lt;strong&gt;every time someone uses a loan marketplace in India, a version of this same problem is being solved in real time.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;And it's way harder than it looks.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Setup
&lt;/h2&gt;

&lt;p&gt;India has over 10,000 registered NBFCs and dozens of major banks, all offering personal loans with different:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Interest rate bands (10% to 36%+ p.a.)&lt;/li&gt;
&lt;li&gt;Eligibility criteria (income floor, employer tier, city, age)&lt;/li&gt;
&lt;li&gt;Risk appetite (prime, near-prime, subprime borrowers)&lt;/li&gt;
&lt;li&gt;Internal credit models (CIBIL weight vs bureau agnostic)&lt;/li&gt;
&lt;li&gt;Product constraints (minimum/maximum loan amount, tenure)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On the other side, you have borrowers with wildly different profiles — salaried vs self-employed, different cities, different CIBIL scores, different loan amounts, different urgency.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The job of a loan marketplace is to match these two sides.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;But here's the catch: unlike a search engine that just needs to rank results, a loan marketplace has to produce &lt;em&gt;actionable&lt;/em&gt; matches — offers a borrower is likely to accept &lt;em&gt;and&lt;/em&gt; a lender is likely to approve.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Naive Matching Fails
&lt;/h2&gt;

&lt;p&gt;The obvious approach: show every borrower every lender, sort by interest rate, done.&lt;/p&gt;

&lt;p&gt;This fails for a few reasons:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Eligibility mismatch wastes lender bandwidth&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If a borrower with a 620 CIBIL score applies to a lender whose internal floor is 700, that application gets rejected. The borrower's score takes a hard inquiry hit. The lender wastes an underwriter review. Everyone loses.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Rate alone is not the objective function&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A 12% loan with ₹15,000 in processing fees may cost more than a 14% loan with zero fees over a 24-month tenure. The real comparison metric is &lt;strong&gt;effective annualized cost&lt;/strong&gt; — which most borrowers don't calculate and most naive UIs don't show.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Lender preferences are multi-dimensional and hidden&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Lenders don't publish their exact underwriting criteria. A large PSU bank might love a government employee with a 680 score but reject a private sector employee with 720. An NBFC might do the opposite. The mapping is implicit, learned from outcomes — not a public API you can just query.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Good Matching Actually Requires
&lt;/h2&gt;

&lt;p&gt;A well-designed loan matching engine has to do several things simultaneously:&lt;/p&gt;

&lt;h3&gt;
  
  
  Eligibility Filtering (Rule-Based Layer)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;passes_hard_filters&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;borrower&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;lender_config&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="nf"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;borrower&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cibil_score&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="n"&gt;lender_config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;min_score&lt;/span&gt;
        &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;borrower&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;monthly_income&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="n"&gt;lender_config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;min_income&lt;/span&gt;
        &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;borrower&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;city&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;lender_config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;serviceable_cities&lt;/span&gt;
        &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;lender_config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;min_loan&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;borrower&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;requested_amount&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;lender_config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;max_loan&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is the easy part. Fast, deterministic, eliminates clearly incompatible pairs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Soft Probability Scoring (ML Layer)
&lt;/h3&gt;

&lt;p&gt;For the remaining lender-borrower pairs, you need an estimated probability of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Lender actually approving this profile (approval probability)&lt;/li&gt;
&lt;li&gt;Borrower accepting this offer (acceptance probability)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Both are trained on historical data. The approval model is essentially a binary classifier — did the lender approve profiles like this one? The acceptance model predicts whether someone with this profile, seeing this rate, converts.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Match Score = P(approval | borrower_features, lender_id) 
            x P(acceptance | rate_offered, borrower_urgency, alternatives_shown)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Offer Ranking (Optimization Layer)
&lt;/h3&gt;

&lt;p&gt;You now have N borrower-lender pairs, each with a match score. But you can't just sort by score.&lt;/p&gt;

&lt;p&gt;Some lenders have capacity constraints — they're not trying to take every borrower, they want the right risk mix. Some prefer faster repayment profiles. Some are running promotions for specific employer categories.&lt;/p&gt;

&lt;p&gt;The ranking problem becomes: &lt;em&gt;given all constraints and preferences on both sides, what's the optimal set of offers to surface?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This is structurally similar to &lt;strong&gt;two-sided market clearing&lt;/strong&gt; — the same family of problems as ad auctions, rideshare dispatch, and gig economy job matching.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Soft Check Problem
&lt;/h2&gt;

&lt;p&gt;Here's a wrinkle that makes this harder: &lt;strong&gt;you can't run a hard credit pull to get accurate data before showing offers.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A hard inquiry (when a lender formally checks your bureau report) affects your CIBIL score. Doing this across 20 lenders simultaneously would crater a borrower's score before they'd even seen their options.&lt;/p&gt;

&lt;p&gt;So the matching has to work on &lt;strong&gt;soft-check data&lt;/strong&gt; — self-reported income, employer name, city, requested amount, and a soft bureau pull that returns a score range and some basic flags, not the full report.&lt;/p&gt;

&lt;p&gt;That's like running a recommendation engine where your key signals are noisy proxies for the actual variables your model was trained on.&lt;/p&gt;

&lt;p&gt;The engineering solution: &lt;strong&gt;two-stage architecture.&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Stage 1 — Soft Match: Use the soft-check signal to narrow to 3-5 high-probability lenders. Show the borrower these offers with estimated rates.&lt;/li&gt;
&lt;li&gt;Stage 2 — Hard Match: When the borrower selects an offer and proceeds, &lt;em&gt;that single&lt;/em&gt; lender runs the hard pull and finalizes the rate.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Only one hard inquiry. Borrower's score is protected. The marketplace stays trustworthy.&lt;/p&gt;




&lt;h2&gt;
  
  
  What This Looks Like in Practice
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://swipeloan.in" rel="noopener noreferrer"&gt;SwipeLoan&lt;/a&gt; — an AI-powered loan marketplace in India — is a real-world implementation of this architecture. When you enter your details, you're not filling out 20 loan applications. You're feeding a matching engine that:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Runs eligibility filters across 100+ RBI-registered lenders&lt;/li&gt;
&lt;li&gt;Scores your profile against each lender's historical approval patterns&lt;/li&gt;
&lt;li&gt;Surfaces matched offers ranked by effective cost (not just headline rate)&lt;/li&gt;
&lt;li&gt;Protects your CIBIL score by only triggering a hard inquiry when you formally apply&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;From a systems design perspective, that's: one input → multi-lender eligibility graph → soft-score ranking → single-lender hard underwriting. The borrower sees a clean UI. Under the hood, it's a real-time combinatorial optimization pipeline.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Cold Start Problem
&lt;/h2&gt;

&lt;p&gt;No discussion of two-sided matching is complete without acknowledging the cold start problem.&lt;/p&gt;

&lt;p&gt;A new lender joining the platform has no historical approval data in your system. You can't estimate &lt;code&gt;P(approval | borrower, lender)&lt;/code&gt; because you have no outcomes to train on.&lt;/p&gt;

&lt;p&gt;Common approaches:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Content-based fallback&lt;/strong&gt;: Use the lender's published criteria as a hard filter proxy until you accumulate data&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bandit algorithms&lt;/strong&gt;: Treat each new lender as an arm in a multi-armed bandit — explore intentionally, exploit as data accrues&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Transfer learning&lt;/strong&gt;: Use approval patterns from lenders with similar product profiles as a prior&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is an active research area in fintech ML, and the teams building these systems are solving genuinely hard problems — not just CRUD apps with a finance skin.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why This Matters Beyond Fintech
&lt;/h2&gt;

&lt;p&gt;The patterns here show up everywhere:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Domain&lt;/th&gt;
&lt;th&gt;Borrower Side&lt;/th&gt;
&lt;th&gt;Lender Side&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Loan Marketplace&lt;/td&gt;
&lt;td&gt;Borrower profile&lt;/td&gt;
&lt;td&gt;Lender criteria&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Job Board&lt;/td&gt;
&lt;td&gt;Candidate resume&lt;/td&gt;
&lt;td&gt;Employer requirements&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Healthcare&lt;/td&gt;
&lt;td&gt;Patient needs&lt;/td&gt;
&lt;td&gt;Provider availability&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cloud Infra&lt;/td&gt;
&lt;td&gt;Workload profile&lt;/td&gt;
&lt;td&gt;Instance types&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Any time you have heterogeneous supply, heterogeneous demand, hidden preferences, and the cost of a bad match is high — you're in this problem space.&lt;/p&gt;

&lt;p&gt;The techniques — two-stage filtering, soft signals as proxies, probability scoring, ranking under constraints — generalize surprisingly well.&lt;/p&gt;




&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;p&gt;Loan marketplaces aren't directories with a filter. They're real-time, two-sided matching engines solving an optimization problem with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hidden lender preferences&lt;/li&gt;
&lt;li&gt;Noisy borrower signals (soft checks only)&lt;/li&gt;
&lt;li&gt;Hard constraints on both sides&lt;/li&gt;
&lt;li&gt;Asymmetric cost of bad matches&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you're building in fintech or any marketplace vertical, this is the architecture worth studying.&lt;/p&gt;

&lt;p&gt;And if you're on the borrower side and haven't used a matching-based platform yet — &lt;a href="https://swipeloan.in/loans/personal-loan/" rel="noopener noreferrer"&gt;SwipeLoan's personal loan comparison&lt;/a&gt; is worth trying. Free soft check, no CIBIL impact, real matched offers. The engineering behind it is more interesting than most people realize.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Thoughts on the matching architecture? I'd love to hear how other marketplace engineers handle the cold start and soft-signal problems — drop it in the comments.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>algorithms</category>
      <category>fintech</category>
      <category>machinelearning</category>
      <category>india</category>
    </item>
  </channel>
</rss>
