Skip to content

๐Ÿ  Vaasthu Vision AI answers Vaasthu-related queries from the Qdrant DB using RAG and can also handle unrelated questions seamlessly. ๐Ÿ”ฎโœจ Built to provide intelligent, context-aware responses with ease.

Notifications You must be signed in to change notification settings

Shiva-Prasad-Naroju/Vaasthu-Vision-AI-Version1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

59 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿก Vaasthu Vision AI - AI-Powered Vaasthu Consultant

๐Ÿš€ Project Overview

Vaasthu Vision AI is an intelligent GenAI system designed to provide authentic guidance, directional insights, and remedial suggestions based on Vaasthu Shastra. Unlike generic chatbots, it uses a Retrieval-Augmented Generation (RAG) architecture to ensure that every response is accurate, reliable, and context-aware.

The system carefully routes queries using similarity scores and critical keyword checks, preventing wrong or hallucinated answers while always prioritizing trustworthy knowledge from its Vaasthu knowledge base.

๐ŸŽฅ Project Demo

Iโ€™ve shared my project demo and explanation on LinkedIn โ€” check them out below:

๐Ÿ‘‰ Click to watch the full explanation or directly view the video output.

๐ŸŽฏ Objective

To build an AI assistant that:

  • Understands Vaasthu rules deeply
  • Provides reliable answers
  • Avoids hallucinations
  • Runs fast on web (connected to a slick frontend)

๐Ÿ“Š RAGAS Evaluation Metrics

  • Faithfulness: 0.9โ€“1.0
  • Answer Relevancy: ~0.7โ€“0.85
  • Latency: Measured and optimized for real-time responses
  • Hallucination Rate: Reduced via retrieval grounding and fallback strategies

๐Ÿ› ๏ธ Tech Stack

  • Frontend: Built the website using bolt ai and customized as desired.
  • Backend: Python (FastAPI / Streamlit for local)
  • LLM: LLaMA3-8B-8192 via Groq API
  • Vector DB: Qdrant with all-MiniLM-L6-v2 embeddings
  • RAG: LangChain-powered pipeline

๐Ÿงฉ Data & Design Decisions

๐Ÿ”ง Data Transformation

  • Started with 40 structured Vaasthu elements in JSON
  • Converted to 350+ high-quality natural-language rules
  • Added metadata: zone, rule_id, category
  • Stored using RULE_START and RULE_END delimiters

๐Ÿง  Prompt Engineering

  • Final prompt: minimalistic, 4 - 6 lines of answer.
  • Designed for clarity, consistency, and production use
  • Used temperature=0 and top_p=1 for deterministic output

โš™๏ธ RAG Flow

  1. Query โ†’ Embedding
  2. Qdrant โ†’ Top 3 relevant rules
  3. Custom prompt โ†’ Groq LLM (LLaMA3)
  4. Final response โ†’ Displayed in UI

System Architecture:

graph TD
    A[User Question] --> B[Critical Keyword Check]
    B -->|Yes| C[RAG QA Chain]
    B -->|No| D[Vectorstore Retrieval]
    D --> E[Qdrant Similarity Score]
    E --> F{Confidence Thresholds}
    F -->|High| C
    F -->|Medium| G[`I don't know Response`]
    F -->|Low| H[Fallback Chat Chain]
    C --> I[Final Vaasthu Answer]
    G --> I
    H --> I
Loading

Query Router

This project implements a smart query routing system that decides whether a userโ€™s question should be answered via RAG pipeline (vector database retrieval) or by an LLM fallback, based on similarity scores and critical keywords.

โšก Workflow Overview

  1. User enters a query
  2. The system runs a similarity search on the vector database.
  3. A similarity score is calculated for the top retrieved chunks.
  4. Based on this score and rules, the query is routed:

๐Ÿ”Ž Query Routing Logic

  • Case 1: High Confidence (โ‰ฅ HIGH_THRESHOLD)

    • โœ… Strong match found in vector DB
    • ๐Ÿ‘‰ Response generated by RAG pipeline (qa_chain)
  • Case 2: Low Confidence (< LOW_THRESHOLD)

    • โš ๏ธ Retrieved chunks are unreliable
    • ๐Ÿ‘‰ Routed to LLM fallback, which replies:
    • "Sorry, I donโ€™t have an idea about this query."
  • Case 3: Critical Keywords Override

    • ๐Ÿ”‘ Even if similarity score is below LOW_THRESHOLD,
    • If the query contains critical keywords (e.g., Kitchen, Bathroom, Hall),
    • ๐Ÿ‘‰ Still answered through RAG pipeline (domain relevance guaranteed)
  • Case 4: Nonsense / Out-of-Domain Queries

    • ๐Ÿšซ No relevant match + no critical keywords
    • ๐Ÿ‘‰ Routed to LLM fallback for casual/nonsense handling

๐ŸŽฏ Key Features

  • Confidence-based Routing โ†’ prevents misleading answers from weak retrievals.
  • Domain Awareness โ†’ critical keywords always prioritize vector DB results.
  • LLM Fallback โ†’ handles nonsense or completely unrelated queries.
  • Accuracy & Safety First โ†’ ensures only reliable information is returned.
  • Contribute Feature โ†’ Allows users to submit data or upload files for review. After admin verification, contributions can be incorporated into the project.

๐Ÿง  Learnings

  • Prompt structure impacts hallucination significantly
  • Simpler is better: hardcoded rules > complex intent classifier
  • Fast, reliable LLMs like Groq drastically improve UX
  • Semantic granularity in rules increases RAG accuracy

๐ŸŒ Website of frontend only without backend integration:

๐Ÿ”— Click here : Visit Site

or

website : https://jazzy-entremet-70cc2a.netlify.app/

๐Ÿ’ผ Ready for Production

The system is ready for real-world integration and can be expanded to:

  • Multiple languages
  • Room-by-room suggestions
  • Vaastu-based house plan checker

๐Ÿณ Docker Setup

We provide a Docker image for Vaasthu Vision AI so you can run the app anywhere without installing dependencies.

Prerequisites

Run via Docker Hub Image:

Pull the latest image from Docker Hub:

  • docker pull docker.io/shivaprasadnaroju/vaasthu-vision-ai:latest

Run the container with your .env:

  • docker run -p 8000:8000 --env-file .env docker.io/shivaprasadnaroju/vaasthu-vision-ai:latest

Visit: http://localhost:8000/docs to access FastAPI Swagger UI.

Notes:

  • The image is preconfigured to connect to Qdrant Cloud via .env.

  • For a local Qdrant setup, a separate Docker Compose file can be used

๐Ÿ™Œ Special Thanks

Inspired by traditional Indian architecture wisdom and empowered by modern AI.

๐Ÿ“ฌ Connect with Me

Iโ€™m open to collaborations, feedback, or AI-based consulting.
๐Ÿ“ง Email: shivanaroju26@gmail.com

About

๐Ÿ  Vaasthu Vision AI answers Vaasthu-related queries from the Qdrant DB using RAG and can also handle unrelated questions seamlessly. ๐Ÿ”ฎโœจ Built to provide intelligent, context-aware responses with ease.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published