An open-source, production-ready AI chatbot for automotive dealerships built with LangFlow, Ollama, Google Gemini, and ChromaDB.
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.
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
- 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
- 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
- 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
- Docker & Docker Compose installed
- Google Gemini API key (get one here)
- Ollama installed locally (optional; can use via container)
-
Clone the repository
git clone https://github.com/yourusername/car-dealership-chatbot.git cd car-dealership-chatbot -
Set up environment variables
cp .env.example .env # Edit .env and add your Google Gemini API key -
Start services with Docker
docker compose up -d
This starts:
- LangFlow (UI) β http://localhost:7860
- ChromaDB (Vector Store) β http://localhost:8000
- PostgreSQL (Database) β localhost:5432
-
Add your dealership data
- Place dealership documents (
.txt,.pdf) in the./datafolder - LangFlow will automatically ingest and embed them
- Place dealership documents (
-
Access the chatbot
- Open http://localhost:7860 in your browser
- Load the
Car_Dealership_Chatbot.jsonworkflow - Start chatting!
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
- Add your API key to
.env - Available models:
gemini-pro,gemini-1.5-pro - Custom instructions can be set in the Prompt Template component
- Persist Directory:
./chroma/data - Collection Name:
dealership - Similarity Search Type: Similarity (default) or MMR
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 |
-
Policy Question
"What are your store hours on Saturday?"
-
Warranty Question
"What's covered under the manufacturer warranty?"
-
Service Question
"How long does an oil change take?"
-
Financing Question
"What financing options do you offer for someone with fair credit?"
-
Vehicle Question
"Tell me about the safety features of your popular models."
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
docker compose up -dContributions are welcome! Please open issues or submit pull requests for improvements.
