<?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: swapnil shingare</title>
    <description>The latest articles on DEV Community by swapnil shingare (@swapnil_shingare_f01cbac9).</description>
    <link>https://dev.to/swapnil_shingare_f01cbac9</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%2F3220912%2F9b5c8078-9987-4362-9c4a-81c1ba74ef9d.png</url>
      <title>DEV Community: swapnil shingare</title>
      <link>https://dev.to/swapnil_shingare_f01cbac9</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/swapnil_shingare_f01cbac9"/>
    <language>en</language>
    <item>
      <title>Building a Smart AI Health Assessment Chatbot with Streamlit and Generative AI</title>
      <dc:creator>swapnil shingare</dc:creator>
      <pubDate>Wed, 18 Jun 2025 11:07:51 +0000</pubDate>
      <link>https://dev.to/swapnil_shingare_f01cbac9/building-a-smart-ai-health-assessment-chatbot-with-streamlit-and-generative-ai-5196</link>
      <guid>https://dev.to/swapnil_shingare_f01cbac9/building-a-smart-ai-health-assessment-chatbot-with-streamlit-and-generative-ai-5196</guid>
      <description>&lt;p&gt;In the world of preventive healthcare, data-driven insights can empower people to make better lifestyle decisions. That's why I built an AI-powered Health Assessment Chatbot that not only asks meaningful health-related questions but also generates detailed, personalized health analysis reports — all through a friendly and interactive web interface.&lt;/p&gt;

&lt;p&gt;🚀 What I Built&lt;br&gt;
The Health Assessment Chatbot is a smart application that:&lt;/p&gt;

&lt;p&gt;Interactively asks health and lifestyle questions.&lt;/p&gt;

&lt;p&gt;Performs real-time calculations and health evaluations.&lt;/p&gt;

&lt;p&gt;Uses Generative AI to provide tailored recommendations.&lt;/p&gt;

&lt;p&gt;Generates a comprehensive health report based on your responses.&lt;/p&gt;

&lt;p&gt;Here’s a snapshot from a sample report it produces:&lt;/p&gt;

&lt;p&gt;📊 Sample Health Summary&lt;br&gt;
Overall Health Score: 76 / 100&lt;br&gt;
Moderate risk: Good health with room for improvement.&lt;/p&gt;

&lt;p&gt;Key Metrics:&lt;/p&gt;

&lt;p&gt;BMI: 24.9 (Normal)&lt;/p&gt;

&lt;p&gt;Waist-to-Height Ratio (WHTR): 0.471 (Good)&lt;/p&gt;

&lt;p&gt;Resting Metabolic Rate: 1926 kcal/day&lt;/p&gt;

&lt;p&gt;Daily Calorie Goal: 2312 kcal&lt;/p&gt;

&lt;p&gt;Category Breakdown:&lt;/p&gt;

&lt;p&gt;✅ Body Profile: 95/100&lt;/p&gt;

&lt;p&gt;⚠ Lifestyle: 79/100&lt;/p&gt;

&lt;p&gt;⚠ Stress Management: 63.3/100&lt;/p&gt;

&lt;p&gt;❌ Exercise: 20/100&lt;/p&gt;

&lt;p&gt;✅ Hydration: 90/100&lt;/p&gt;

&lt;p&gt;Hydration Reminder: Drink ~12 glasses/day (current: 2750ml)&lt;/p&gt;

&lt;p&gt;Personalized Tips: AI-generated suggestions for diet, exercise, and stress.&lt;/p&gt;

&lt;p&gt;🧰 Tech Stack&lt;br&gt;
This project combines the power of data science and modern web tools:&lt;/p&gt;

&lt;p&gt;Python 🐍 – Core logic, health metric calculations.&lt;/p&gt;

&lt;p&gt;Streamlit 🌐 – Quick and beautiful UI for interaction.&lt;/p&gt;

&lt;p&gt;Generative AI 🧠 – Provides intelligent analysis and custom recommendations.&lt;/p&gt;

&lt;p&gt;Pandas – For data wrangling.&lt;/p&gt;

&lt;p&gt;NumPy – For numerical operations.&lt;/p&gt;

&lt;p&gt;💡 Key Features&lt;br&gt;
🤖 Conversational UI: Feels like talking to a health assistant.&lt;/p&gt;

&lt;p&gt;📈 Real-time Health Metrics: BMI, WHTR, BMR, hydration, calorie needs, and more.&lt;/p&gt;

&lt;p&gt;📋 AI Recommendations: Diet, exercise, sleep, and stress management tips.&lt;/p&gt;

&lt;p&gt;📤 Exportable Report: Users can save or share their health reports.&lt;/p&gt;

&lt;p&gt;🔁 Assessment Retake: Restart the chat anytime to update data.&lt;/p&gt;

&lt;p&gt;🔍 How It Works&lt;br&gt;
User answers health questions → Age, weight, diet, activity, hydration, sleep, etc.&lt;/p&gt;

&lt;p&gt;AI and Python backend calculates:&lt;/p&gt;

&lt;p&gt;BMI, WHTR, Metabolic Rate&lt;/p&gt;

&lt;p&gt;Daily calorie needs&lt;/p&gt;

&lt;p&gt;Hydration percentage&lt;/p&gt;

&lt;p&gt;LLM generates recommendations for improvement.&lt;/p&gt;

&lt;p&gt;Streamlit renders a beautiful report with charts and metrics.&lt;/p&gt;

&lt;p&gt;🎯 Future Plans&lt;br&gt;
📱 Mobile responsiveness and deployment to the cloud.&lt;/p&gt;

&lt;p&gt;🩺 Doctor-mode integration for medical professionals.&lt;/p&gt;

&lt;p&gt;🧬 Adding more complex indicators like blood sugar, lipid profile, etc.&lt;/p&gt;

&lt;p&gt;📚 Long-term trend analysis with user accounts.&lt;/p&gt;

&lt;p&gt;🙌 Final Thoughts&lt;br&gt;
Healthcare shouldn't be reactive. With AI and data, we can make it proactive. This project is just a small step in that direction — helping people understand and improve their health through meaningful interaction and actionable insights.&lt;/p&gt;

&lt;p&gt;Let me know your thoughts, suggestions, or ideas to improve this further! 💬&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>ai</category>
      <category>python</category>
      <category>software</category>
    </item>
    <item>
      <title>Building an AI Stock Forecasting API</title>
      <dc:creator>swapnil shingare</dc:creator>
      <pubDate>Mon, 09 Jun 2025 09:18:13 +0000</pubDate>
      <link>https://dev.to/swapnil_shingare_f01cbac9/building-an-ai-stock-forecasting-api-225m</link>
      <guid>https://dev.to/swapnil_shingare_f01cbac9/building-an-ai-stock-forecasting-api-225m</guid>
      <description>&lt;p&gt;🧠 Build an AI Stock Forecasting API with LangGraph, OpenAI, and FastAPI&lt;br&gt;
Want to predict stock prices using modern AI tools? In this guide, we’ll build a production-grade API using LangGraph, OpenAI, and FastAPI — powered by AI agents that:&lt;/p&gt;

&lt;p&gt;✅ Analyze financial news&lt;br&gt;
✅ Analyze stock charts &amp;amp; trends&lt;br&gt;
✅ Predict price forecasts with confidence levels &amp;amp; sentiment&lt;br&gt;
✅ Suggest short- and long-term selling targets&lt;br&gt;
✅ Return elegant HTML for direct frontend display&lt;/p&gt;

&lt;p&gt;🧱 Project Architecture&lt;br&gt;
Layer   Tech Stack&lt;br&gt;
🧠 AI Reasoning   LangGraph + OpenAI GPT-4&lt;br&gt;
📉 Stock Data Yahoo Finance via yfinance&lt;br&gt;
📰 News   Custom scraper or NewsAPI&lt;br&gt;
🔁 Backend    FastAPI&lt;br&gt;
⚡ Caching Redis / FAISS&lt;br&gt;
🧩 Agents Modular, parallel AI agents&lt;/p&gt;

&lt;p&gt;🧠 AI Agent Design&lt;br&gt;
We created three modular AI agents:&lt;/p&gt;

&lt;p&gt;NewsAgent: Fetches and summarizes the latest news for a stock.&lt;/p&gt;

&lt;p&gt;TrendAgent: Analyzes historical prices and technical patterns.&lt;/p&gt;

&lt;p&gt;PredictionAgent: Uses output from News &amp;amp; Trend agents + stock history to predict:&lt;/p&gt;

&lt;p&gt;Stock prices for 7d, 15d, 1mo, and 3mo&lt;/p&gt;

&lt;p&gt;Short- and long-term sell targets&lt;/p&gt;

&lt;p&gt;📈 Bullish, 📉 Bearish, 🤝 Neutral sentiment&lt;/p&gt;

&lt;p&gt;🔍 Confidence level: High / Medium / Low&lt;/p&gt;

&lt;p&gt;🧭 Process Flow Diagram&lt;/p&gt;

&lt;p&gt;Here's how the LangGraph flow looks:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Start([🔄 Start API Call]) --&amp;gt; NewsAgent[🗞️ News Agent]
Start --&amp;gt; TrendAgent[📊 Trend Agent]
NewsAgent --&amp;gt; Combine[🔗 Merge Outputs]
TrendAgent --&amp;gt; Combine
Combine --&amp;gt; PredictionAgent[🔮 Prediction Agent]
PredictionAgent --&amp;gt; Return([📤 Return HTML Result])
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;NewsAgent and TrendAgent run in parallel&lt;/p&gt;

&lt;p&gt;PredictionAgent uses their output to forecast intelligently&lt;/p&gt;

&lt;p&gt;🔮 Prediction Agent Sample Logic&lt;/p&gt;

&lt;p&gt;def predict_future(stock, news, trend):&lt;br&gt;
    history_summary = get_history_summary(stock)&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;prompt = (
    f"Stock: {stock}\n\n"
    f"News: {news['summary']}\n"
    f"Trend: {trend['analysis']}\n"
    f"History: {history_summary}\n\n"
    f"Predict future stock price ranges:\n"
    f"  - 7d, 15d, 1mo, 3mo\n"
    f"Suggest:\n"
    f"  - Short-term and long-term sell targets\n"
    f"Provide sentiment (Bullish/Neutral/Bearish) and confidence level\n\n"
    f"Output as styled HTML with headers and bullet points."
)

response = client.chat.completions.create(
    model="gpt-4",
    messages=[{"role": "user", "content": prompt}],
    max_tokens=800
)
return {"html_prediction": response.choices[0].message.content}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;🧪 Example HTML Output&lt;/p&gt;

&lt;h2&gt;📈 15-Day Price Forecast&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;
&lt;strong&gt;7 Days:&lt;/strong&gt; ₹3,420 – ₹3,480&lt;/li&gt;
  &lt;li&gt;
&lt;strong&gt;15 Days:&lt;/strong&gt; ₹3,500 – ₹3,570&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;🎯 Sell Targets&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;
&lt;strong&gt;Short-term:&lt;/strong&gt; ₹3,550&lt;/li&gt;
  &lt;li&gt;
&lt;strong&gt;Long-term:&lt;/strong&gt; ₹3,700+&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;📊 Sentiment&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;🚀 Bullish&lt;/strong&gt; – Positive momentum and rising volumes.&lt;/p&gt;

&lt;h2&gt;🔍 Confidence&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;High&lt;/strong&gt; – Aligned news and technical signals, with historical support.&lt;/p&gt;

&lt;p&gt;⚡ Frontend Integration&lt;br&gt;
Return the prediction as HTMLResponse from your FastAPI backend:&lt;/p&gt;

&lt;p&gt;from fastapi.responses import HTMLResponse&lt;br&gt;
@app.post("/predict", response_class=HTMLResponse)&lt;br&gt;
async def predict_stock(...):&lt;br&gt;
    result = await flow.invoke(input)&lt;br&gt;
    return result["html_prediction"]&lt;/p&gt;

&lt;p&gt;Inject in React or Vue:&lt;/p&gt;



&lt;p&gt;💾 Caching for Performance&lt;br&gt;
Use Redis or FAISS to cache:&lt;/p&gt;

&lt;p&gt;Past news summaries&lt;/p&gt;

&lt;p&gt;Processed trend data&lt;/p&gt;

&lt;p&gt;Full prediction HTML for frequently requested stocks&lt;/p&gt;

&lt;p&gt;import redis&lt;/p&gt;

&lt;p&gt;redis_client = redis.Redis(host="localhost", port=6379)&lt;br&gt;
redis_client.set(stock_symbol, prediction_html, ex=3600)&lt;br&gt;
🚀 Deployment Tips&lt;br&gt;
Use uvicorn or gunicorn to serve FastAPI&lt;/p&gt;

&lt;p&gt;Host on Render, Fly.io, or your own VPS&lt;/p&gt;

&lt;p&gt;Secure .env for API keys&lt;/p&gt;

&lt;p&gt;Use openai&amp;gt;=1.0.0 (new SDK format)&lt;/p&gt;

&lt;p&gt;🎯 Final Thoughts&lt;br&gt;
With LangGraph + FastAPI + OpenAI, you've created a fully modular, explainable stock forecasting API that:&lt;/p&gt;

&lt;p&gt;Thinks like an AI co-analyst 🧠&lt;/p&gt;

&lt;p&gt;Responds in seconds 🔁&lt;/p&gt;

&lt;p&gt;Presents beautiful HTML results 🌐&lt;/p&gt;

&lt;p&gt;Gives confidence-driven decisions for buyers &amp;amp; investors&lt;/p&gt;

&lt;p&gt;For collab DM me on &lt;a href="https://www.linkedin.com/in/swapnil-shingare" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let me know your thoughts or suggestions on this idea in the comments below! 👇&lt;/p&gt;

</description>
    </item>
    <item>
      <title>🧠 Building a Smart Regulatory Chatbot for IRDAI Using LangChain, Angular, FastAPI &amp; OpenAI</title>
      <dc:creator>swapnil shingare</dc:creator>
      <pubDate>Thu, 29 May 2025 07:14:56 +0000</pubDate>
      <link>https://dev.to/swapnil_shingare_f01cbac9/building-a-smart-regulatory-chatbot-for-irdai-using-langchain-angular-fastapi-openai-7il</link>
      <guid>https://dev.to/swapnil_shingare_f01cbac9/building-a-smart-regulatory-chatbot-for-irdai-using-langchain-angular-fastapi-openai-7il</guid>
      <description>&lt;p&gt;Have you ever struggled to find the latest circular or regulation from the &lt;strong&gt;IRDAI (Insurance Regulatory and Development Authority of India)&lt;/strong&gt; website?&lt;/p&gt;

&lt;p&gt;So did I — and that’s why I decided to &lt;strong&gt;build a full-stack AI-powered chatbot&lt;/strong&gt; that can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Scrape circulars and press notes from the IRDAI website&lt;/li&gt;
&lt;li&gt;Extract and embed content from PDFs/HTML&lt;/li&gt;
&lt;li&gt;Answer user questions with accurate regulatory information&lt;/li&gt;
&lt;li&gt;Suggest follow-up questions like a real assistant&lt;/li&gt;
&lt;li&gt;Provide a beautiful and modern UI using Angular + Bootstrap&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this blog, I’ll walk through the &lt;strong&gt;architecture&lt;/strong&gt;, &lt;strong&gt;tech stack&lt;/strong&gt;, and some &lt;strong&gt;cool agentic automation&lt;/strong&gt; behind the scenes.&lt;/p&gt;




&lt;h2&gt;
  
  
  🚀 Overview: What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The IRDAI Chatbot&lt;/strong&gt; is a fully automated system that:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Scrapes and downloads&lt;/strong&gt; IRDAI circulars across all paginated pages&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Parses and embeds&lt;/strong&gt; PDFs using LangChain + OpenAI embeddings&lt;/li&gt;
&lt;li&gt;Stores the embeddings in a local &lt;strong&gt;Chroma vectorstore&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Uses a smart LangChain QA Agent to answer questions using RAG (retrieval-augmented generation)&lt;/li&gt;
&lt;li&gt;Offers an interactive, smooth &lt;strong&gt;Angular frontend&lt;/strong&gt; with live chat, typing effects, suggestion bubbles, and animated scroll&lt;/li&gt;
&lt;li&gt;Suggests relevant follow-up questions based on each answer!&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🧰 Tech 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;Tech&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;🧠 LLM&lt;/td&gt;
&lt;td&gt;OpenAI GPT-4 via LangChain&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🧱 Vectorstore&lt;/td&gt;
&lt;td&gt;ChromaDB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;📚 Embedding&lt;/td&gt;
&lt;td&gt;&lt;code&gt;OpenAIEmbeddings&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🔍 RAG&lt;/td&gt;
&lt;td&gt;LangChain QA chains&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🧩 Agent Framework&lt;/td&gt;
&lt;td&gt;LangGraph&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🔧 Backend&lt;/td&gt;
&lt;td&gt;FastAPI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🧼 PDF Parsing&lt;/td&gt;
&lt;td&gt;PyMuPDF&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🌐 Frontend&lt;/td&gt;
&lt;td&gt;Angular 17 + Bootstrap 5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🤖 Scraping&lt;/td&gt;
&lt;td&gt;Selenium + BeautifulSoup&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🔁 Async&lt;/td&gt;
&lt;td&gt;Python &lt;code&gt;asyncio&lt;/code&gt; + batching&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  🧠 Backend: AI Agent Architecture
&lt;/h2&gt;

&lt;p&gt;I built a smart multi-step LangGraph agent with these nodes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Scrape Node&lt;/strong&gt; — uses Selenium to crawl all IRDAI circular pages, follows paginated "Next" links, and downloads PDFs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Parse Node&lt;/strong&gt; — uses PyMuPDF to read PDF content&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Embed Node&lt;/strong&gt; — splits content into chunks and stores embeddings in Chroma&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;QA Node&lt;/strong&gt; — answers questions by retrieving relevant docs using vector similarity&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Suggestion Node&lt;/strong&gt; — uses another agent to suggest follow-up questions based on the bot's answer&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;All nodes are reusable and callable as standalone FastAPI routes too.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧠 Chatbot Flow: How Everything Connects
&lt;/h2&gt;

&lt;p&gt;Here’s a visual flow of how the chatbot works — from user input to AI agents performing RAG-based document search and response formatting:&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%2Fpdqtliip0nfzj075q5dl.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%2Fpdqtliip0nfzj075q5dl.png" alt="IRDAI Chatbot Flow Diagram" width="800" height="1200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Text Input:&lt;/strong&gt; User submits a question.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ChatGPT Core:&lt;/strong&gt; Formats the query, routes it to agents.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI Agents:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Scraper&lt;/code&gt;: Collects PDFs &amp;amp; press notes&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ETL&lt;/code&gt;: Parses and embeds documents&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;QA&lt;/code&gt;: Handles similarity search + answer generation&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Database:&lt;/strong&gt; Stores and retrieves document embeddings&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Chat Interface:&lt;/strong&gt; Formats HTML responses and suggestions&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;This modular design ensures scalability and clarity.&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚙️ Smart Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;✅ &lt;strong&gt;Async batching for large document QA&lt;/strong&gt; (splits input across token-safe chunks)&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Automatic spell correction + similar question detection&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Answer caching&lt;/strong&gt; to improve performance with a time-aware LRU-like strategy&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Suggestions engine&lt;/strong&gt; that generates related follow-up questions using a second LLM chain&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Common &lt;code&gt;llm_provider.py&lt;/code&gt;&lt;/strong&gt; to centralize LLM configuration across the app&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  💬 Frontend: Angular Chat UI
&lt;/h2&gt;

&lt;p&gt;The frontend is built with &lt;strong&gt;Angular 17 standalone components&lt;/strong&gt;, styled with &lt;strong&gt;Bootstrap 5&lt;/strong&gt;, and includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;💡 Suggested questions before and after answers&lt;/li&gt;
&lt;li&gt;🤖 Typing animation (blinking dots)&lt;/li&gt;
&lt;li&gt;🎯 Smart session tracking using UUIDs&lt;/li&gt;
&lt;li&gt;🔄 Smooth scroll-to-bottom on every update&lt;/li&gt;
&lt;li&gt;❌ Graceful error handling&lt;/li&gt;
&lt;li&gt;🔥 Responsive, mobile-friendly layout&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🌐 FastAPI Backend
&lt;/h2&gt;

&lt;p&gt;The backend exposes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;/ask&lt;/code&gt; — main QA endpoint&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/suggest&lt;/code&gt; — generate follow-up questions&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/scrape&lt;/code&gt; — run scraper&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/embed&lt;/code&gt; — re-embed new content&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can trigger scraping + embedding via the LangGraph agent, CLI, or API — fully flexible.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧠 Example Q&amp;amp;A
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Q:&lt;/strong&gt; What is Saral Jeevan Bima?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A:&lt;/strong&gt; Saral Jeevan Bima is a standard term life insurance policy mandated by IRDAI...&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Suggested follow-ups:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"Who is eligible for Saral Jeevan?"&lt;/li&gt;
&lt;li&gt;"Is it mandatory for insurers?"&lt;/li&gt;
&lt;li&gt;"What are the premium limits?"&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  💡 Lessons Learned
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;🔍 &lt;strong&gt;LangGraph is amazing&lt;/strong&gt; for building modular multi-step agent flows.&lt;/li&gt;
&lt;li&gt;⚠️ Be cautious of OpenAI token limits — I had to chunk documents smartly.&lt;/li&gt;
&lt;li&gt;🔄 Building a good &lt;strong&gt;frontend experience is just as important&lt;/strong&gt; as the backend logic.&lt;/li&gt;
&lt;li&gt;⚡ Don’t forget &lt;strong&gt;caching&lt;/strong&gt; when dealing with repeated queries or expensive operations.&lt;/li&gt;
&lt;/ul&gt;




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

&lt;ul&gt;
&lt;li&gt;Add user authentication for session history&lt;/li&gt;
&lt;li&gt;Push updates to a Firebase or Netlify-hosted frontend&lt;/li&gt;
&lt;li&gt;Enable upload of user PDFs for comparison&lt;/li&gt;
&lt;li&gt;Train a custom model on domain-specific terms&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  📦 Repo Coming Soon
&lt;/h2&gt;

&lt;p&gt;Planning to open-source this soon. Let me know if you’d like early access!&lt;/p&gt;




&lt;h2&gt;
  
  
  🙌 Let’s Connect!
&lt;/h2&gt;

&lt;p&gt;If you found this useful or have feedback:&lt;/p&gt;

&lt;p&gt;💬 Comment below&lt;br&gt;&lt;br&gt;
🧠 Follow me on &lt;a href="//www.linkedin.com/in/swapnil-shingare"&gt;LinkedIn&lt;/a&gt;&lt;br&gt;&lt;br&gt;
💡 Have a chatbot idea? Let’s collaborate!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>langchain</category>
      <category>agentaichallenge</category>
      <category>rag</category>
    </item>
  </channel>
</rss>
