<?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: Aditi</title>
    <description>The latest articles on DEV Community by Aditi (@aditibajpai).</description>
    <link>https://dev.to/aditibajpai</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%2F3583533%2Ff190b81e-48e4-4c51-a5dc-a89087e77777.jpeg</url>
      <title>DEV Community: Aditi</title>
      <link>https://dev.to/aditibajpai</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aditibajpai"/>
    <language>en</language>
    <item>
      <title>Redflare - Find market divergence in seconds</title>
      <dc:creator>Aditi</dc:creator>
      <pubDate>Mon, 09 Feb 2026 05:09:14 +0000</pubDate>
      <link>https://dev.to/aditibajpai/redflare-find-market-divergence-in-seconds-fnp</link>
      <guid>https://dev.to/aditibajpai/redflare-find-market-divergence-in-seconds-fnp</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 Non-Conversational Experiences&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  𝗖𝗮𝘁𝗲𝗴𝗼𝗿𝘆 𝗦𝘂𝗯𝗺𝗶𝘀𝘀𝗶𝗼𝗻: &lt;strong&gt;Consumer-Facing Non-Conversational Experiences&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Challenge Prompt Fit:&lt;/strong&gt; This project is intentionally submitted as a &lt;strong&gt;Consumer-Facing Non-Conversational Experience&lt;/strong&gt;. It enhances investor workflows proactively through search, divergence detection, and contextual retrieval without requiring a chat-first interface.&lt;/p&gt;

&lt;p&gt;Participants: &lt;a class="mentioned-user" href="https://dev.to/aditibajpai"&gt;@aditibajpai&lt;/a&gt; &lt;/p&gt;




&lt;h3&gt;
  
  
  Video ▶️
&lt;/h3&gt;

&lt;p&gt;

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


&lt;/p&gt;

&lt;p&gt;ㅤ&lt;/p&gt;

&lt;h2&gt;
  
  
  What we built 🤔
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Red Flare&lt;/strong&gt; is an AI-powered divergence detection platform for retail investors.&lt;/p&gt;

&lt;p&gt;Institutional desks use expensive terminals to detect valuation, debt, and sentiment anomalies in real time. Retail investors usually discover risk too late. Red Flare closes that gap with fast search, NLP filters, historical pattern matching, and AI-assisted risk analysis for NIFTY 500 and Nasdaq 100 stocks .&lt;/p&gt;

&lt;p&gt;🏠 &lt;strong&gt;Homepage&lt;/strong&gt;: &lt;a href="https://redflare.vercel.app" rel="noopener noreferrer"&gt;https://redflare.vercel.app&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works? 💣
&lt;/h2&gt;

&lt;p&gt;Users search stocks naturally using phrases like &lt;code&gt;high debt banks&lt;/code&gt;, &lt;code&gt;overvalued tech&lt;/code&gt;, or even typo queries like &lt;code&gt;Relience&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The app combines:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Algolia Search + Query Rules + Synonyms&lt;/strong&gt; for instant discovery&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Algolia Agent Studio&lt;/strong&gt; across 4 indices for contextual AI analysis&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Yahoo Finance&lt;/strong&gt; for live market enrichment&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Upstash Redis&lt;/strong&gt; for cached AI responses and lower latency&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Flow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;User searches or opens a stock&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/api/stock&lt;/code&gt; fetches quote + fundamentals and enriches with Algolia metadata&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/api/news&lt;/code&gt; computes sentiment from recent headlines&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/api/analyze&lt;/code&gt; detects divergences, computes risk score, queries patterns/scandals, then streams AI output&lt;/li&gt;
&lt;li&gt;Result is cached in Redis for 6 hours for repeat access&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;ㅤ&lt;/p&gt;

&lt;h2&gt;
  
  
  App Repository 🔗
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Red Flare&lt;/strong&gt; 👉 &lt;a href="https://github.com/aditibajpaii/redflare" rel="noopener noreferrer"&gt;https://github.com/aditibajpaii/redflare&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%2Fvw7gt5hvseml69j9odbr.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%2Fvw7gt5hvseml69j9odbr.png" alt="App"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Features 🎠
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Algolia Agent Studio RAG&lt;/strong&gt; with multi-index context&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;NLP Query Rules&lt;/strong&gt; (7 rules) for natural search intent&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Financial Synonyms&lt;/strong&gt; (10 groups) for better retrieval&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Typo Tolerance&lt;/strong&gt; (&lt;code&gt;Relience&lt;/code&gt; → Reliance)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Custom Ranking&lt;/strong&gt; by market cap&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dynamic Enrichment&lt;/strong&gt; from Yahoo Finance (debt, valuation, margins)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Divergence Detection Engine&lt;/strong&gt; (price/sentiment/fundamental mismatch)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Risk Scoring&lt;/strong&gt; (1-10 scale with weighted signals)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Upstash Redis Caching&lt;/strong&gt; (6-hour TTL)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Streaming Analysis UI&lt;/strong&gt; with graceful fallback behavior&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shareable Analysis Reel Route&lt;/strong&gt; (&lt;code&gt;/share&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Responsive Dashboard&lt;/strong&gt; for desktop + mobile&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;ㅤ&lt;/p&gt;

&lt;h3&gt;
  
  
  Real Performance Snapshot 📊
&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;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Search Latency&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;12–18ms avg&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Index Coverage&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;~600 stocks (NIFTY 500 and NASDAQ 100)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Query Rules&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;7 active&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Synonym Groups&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;RAG Indices&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;4 connected&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cache HIT Latency&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;~50–100ms&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;ㅤ&lt;/p&gt;

&lt;h3&gt;
  
  
  System Architecture 📊
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Frontend (Next.js 16)
  ├─ StockOmnibar
  ├─ LiveChart
  ├─ VerdictCard
  └─ Share flow

API Layer
  ├─ /api/stock   -&amp;gt; Yahoo + Algolia enrichment
  ├─ /api/news    -&amp;gt; sentiment extraction
  └─ /api/analyze -&amp;gt; divergence detection + RAG + streaming

Infra
  ├─ Algolia (nifty_companies, divergence_patterns, sebi_scandals, sector_benchmarks)
  ├─ Upstash Redis (analysis cache)
  └─ Yahoo Finance (quote + fundamentals)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;ㅤ&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Algolia Agent Studio?
&lt;/h3&gt;

&lt;p&gt;Search quality and retrieval speed are core to this product.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Algolia gives us low-latency discovery, robust typo tolerance, rules-based intent parsing, and a clean path to RAG through Agent Studio. We can ground AI outputs using multiple indices instead of generating generic commentary.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;agentResponse&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;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;agentUrl&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;POST&lt;/span&gt;&lt;span class="dl"&gt;"&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;Content-Type&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;application/json&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;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;apiKey&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;parts&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="s2"&gt;text&lt;/span&gt;&lt;span class="dl"&gt;"&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;context&lt;/span&gt; &lt;span class="p"&gt;}]&lt;/span&gt; &lt;span class="p"&gt;}],&lt;/span&gt;
    &lt;span class="na"&gt;stream&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="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Additional Algolia usage:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Query Rules for intent shortcuts (&lt;code&gt;high debt&lt;/code&gt;, &lt;code&gt;risky&lt;/code&gt;, &lt;code&gt;banks&lt;/code&gt;, etc.)&lt;/li&gt;
&lt;li&gt;Synonyms for finance vocabulary normalization&lt;/li&gt;
&lt;li&gt;Custom ranking for market-cap-prioritized relevance&lt;/li&gt;
&lt;/ul&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%2F8s6fwbxss2q31e5xn9so.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%2F8s6fwbxss2q31e5xn9so.png" alt="Algolia Usage"&gt;&lt;/a&gt;ㅤ&lt;/p&gt;

&lt;h3&gt;
  
  
  Caching Layer (Upstash Redis) ⚡
&lt;/h3&gt;

&lt;p&gt;To prevent repeated expensive generation and improve UX, we cache completed analyses per symbol/day:&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;CACHE_TTL_SECONDS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;key&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`redflare:analysis:&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;symbol&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;:&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;date&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This gives fast repeat loads while keeping data fresh.&lt;/p&gt;

&lt;p&gt;ㅤ&lt;/p&gt;

&lt;h2&gt;
  
  
  Design 🎨
&lt;/h2&gt;

&lt;p&gt;The UI is intentionally terminal-inspired with a high-signal visual style:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;dark market-console aesthetic&lt;/li&gt;
&lt;li&gt;compact data-dense cards&lt;/li&gt;
&lt;li&gt;animated but restrained interactions&lt;/li&gt;
&lt;li&gt;emphasis on quick scanning of risk and divergence indicators&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Design goal: make analysis feel immediate, not overwhelming.&lt;/p&gt;

&lt;p&gt;ㅤ&lt;/p&gt;

&lt;h2&gt;
  
  
  Challenges we ran into 😤
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Getting robust fallback behavior when external AI providers timeout or hit quota&lt;/li&gt;
&lt;li&gt;Balancing fast streaming UX with deterministic fallback output&lt;/li&gt;
&lt;li&gt;Keeping search intent parsing precise across mixed &lt;code&gt;AND/OR&lt;/code&gt; financial filters&lt;/li&gt;
&lt;li&gt;Preserving responsiveness while rendering dense analytics cards and charts&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;ㅤ&lt;/p&gt;

&lt;h2&gt;
  
  
  What’s next? 🚀
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;User auth + per-user watchlists&lt;/li&gt;
&lt;li&gt;Alerting on divergence threshold changes&lt;/li&gt;
&lt;li&gt;Better abuse protection on analysis endpoints&lt;/li&gt;
&lt;li&gt;Sector-level heatmaps and multi-stock compare view&lt;/li&gt;
&lt;li&gt;Expanded historical event intelligence and explainability&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;ㅤ&lt;/p&gt;

&lt;h3&gt;
  
  
  End Notes 🙌🏻
&lt;/h3&gt;

&lt;p&gt;Thanks to the hackathon organizers and the Algolia ecosystem for the tooling that made this possible.&lt;/p&gt;

&lt;h3&gt;
  
  
  Permissive License ⚖️
&lt;/h3&gt;

&lt;p&gt;MIT&lt;/p&gt;

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