Skip to content

YashPatel04/RAG-Enhanced-LLM-Assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš— Car Dealership AI Assistant

An open-source, production-ready AI chatbot for automotive dealerships built with LangFlow, Ollama, Google Gemini, and ChromaDB.

Β Β  Β Β  Β Β 

alt text

πŸ“‹ Overview

This project demonstrates how to build intelligent, domain-specific chatbots for any business. Our implementation helps car dealership customers get instant, accurate answers about general queries related to Dealership policies & procedures, financing & leasing options, service info, warranty and much more.

🎯 How It Works

Architecture Overview

User Query
    ↓
[Embeddings] β†’ Convert text to vectors
    ↓
[ChromaDB] β†’ Retrieve relevant context documents
    ↓
[Prompt Template] β†’ Combine context + history + query
    ↓
[LLM] β†’ Generate natural language response
    ↓
Response + Memory Storage

Step-by-Step Process

1. Embedding with Ollama

  • Dealership documents (policies, FAQs, vehicle specs) are split into chunks
  • Embedding model generates local vector embeddings for each chunk
  • Embeddings are stored in ChromaDB for fast semantic search
  • Benefit: No data leaves your infrastructure; full privacy control

2. Retrieval-Augmented Generation (RAG) with ChromaDB

  • User asks a question
  • Question is embedded using the same Ollama model
  • ChromaDB performs semantic similarity search to find relevant documents
  • Top results are retrieved as context for the LLM
  • Benefit: Responses are grounded in your actual dealership data

3. Response Generation with LLM

  • Retrieved context + conversation history + user query are formatted into a prompt
  • Google Gemini generates a natural, conversational response
  • Response is stored in message memory for future context
  • Benefit: State-of-the-art language understanding and generation

πŸš€ Getting Started

Prerequisites

  • Docker & Docker Compose installed
  • Google Gemini API key (get one here)
  • Ollama installed locally (optional; can use via container)

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/car-dealership-chatbot.git
    cd car-dealership-chatbot
  2. Set up environment variables

    cp .env.example .env
    # Edit .env and add your Google Gemini API key
  3. Start services with Docker

    docker compose up -d

    This starts:

  4. Add your dealership data

    • Place dealership documents (.txt, .pdf) in the ./data folder
    • LangFlow will automatically ingest and embed them
  5. Access the chatbot

    • Open http://localhost:7860 in your browser
    • Load the Car_Dealership_Chatbot.json workflow
    • Start chatting!

βš™οΈ Configuration

Embedding Model (Ollama)

Change the embedding model in LangFlow:

  • Base URL: http://host.docker.internal:11434 (default)
  • Model: Select any Ollama embedding model (e.g., nomic-embed-text)
  • Privacy: All embeddings stay local

LLM (Google Gemini)

  • Add your API key to .env
  • Available models: gemini-pro, gemini-1.5-pro
  • Custom instructions can be set in the Prompt Template component

Vector Store (ChromaDB)

  • Persist Directory: ./chroma/data
  • Collection Name: dealership
  • Similarity Search Type: Similarity (default) or MMR

πŸ“Š Workflow Components

The LangFlow workflow includes:

Component Role
File Input Upload dealership documents
Split Text Chunk documents for embedding
Ollama Embeddings Generate vector embeddings
ChromaDB Store and retrieve vectors
Chat Input Accept user questions
Prompt Template Format context + history + query
Google Generative AI Generate responses
Chat Output Display responses
Message History Store conversation memory

πŸ§ͺ Testing the Chatbot

Test Prompts

  1. Policy Question

    "What are your store hours on Saturday?"

  2. Warranty Question

    "What's covered under the manufacturer warranty?"

  3. Service Question

    "How long does an oil change take?"

  4. Financing Question

    "What financing options do you offer for someone with fair credit?"

  5. Vehicle Question

    "Tell me about the safety features of your popular models."

πŸ“ Project Structure

car-dealership-chatbot/
β”œβ”€β”€ Car_Dealership_Chatbot.json    # LangFlow workflow definition
β”œβ”€β”€ dealership.txt                 # Dealership knowledge base
β”œβ”€β”€ docker-compose.yml             # Container orchestration
β”œβ”€β”€ .env.example                   # Environment template
β”œβ”€β”€ data/                          # Documents to embed
β”‚   └── (add your .txt/.pdf files here)
β”œβ”€β”€ chroma/                        # ChromaDB persistence
β”‚   └── data/
└── README.md

πŸ”„ Deployment

Local Development

docker compose up -d

🀝 Contributing

Contributions are welcome! Please open issues or submit pull requests for improvements.

πŸŽ“ Learn More

About

AI assistant leveraging Retrieval-Augmented Generation (RAG) with LangFlow, Ollama, Google Gemini, and ChromaDB. This project demonstrates how to build scalable, context-aware chatbots for business use cases using semantic search, and advanced LLMs.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors