AI Sales Engine
★ FeaturedCommercial RAG engine
A salesperson that never sleeps: hybrid RAG (vectors + graph) with cost-aware model routing.
# Overview
AI Sales Engine is a RAG-powered lead capture engine. It combines vector search (pgvector) with a knowledge graph (Neo4j) to answer with precise context about products, pricing and cases, qualify leads and hand off to a human when needed. It includes model routing: simple queries go to cheap models and complex ones to powerful models, optimizing cost without sacrificing quality. Orchestrated with LangChain on FastAPI and deployed with Docker/Traefik.
! The problem
Sales prospecting burns hours answering the same questions and qualifying leads by hand. A generic chatbot makes up data (hallucinates) and doesn't know the real catalog or the relationships between products, plans and customers.
✓ The solution
Hybrid RAG: vectors retrieve semantically close passages and the graph contributes explicit relationships (which plan includes what, which case applies to which industry). The model answers grounded in real sources, qualifies the lead and books or hands off. Cost-aware routing keeps spend under control at scale.
# Features
Hybrid vector + graph RAG
pgvector for semantic similarity and Neo4j for explicit domain relationships.
Cost-aware model routing
Classifies query difficulty and routes to the cheapest model that solves it well.
Lead qualification
Extracts intent, budget and urgency to prioritize human follow-up.
Sourced answers
Every answer is grounded in retrieved passages: traceability and less hallucination.
Integration-ready API
FastAPI with versioned endpoints and response streaming.
# Architecture
A query enters through FastAPI; a classifier decides the route and compute budget. The retriever queries pgvector (similarity) and Neo4j (relationships), fuses and re-ranks the context, and LangChain builds the source-grounded prompt. The generator answers via the router-selected model; the conversation and lead are persisted for follow-up.
# Tech stack
# Learnings
- → Graph and vectors don't compete: the vector finds what's similar, the graph guarantees what's correct. Together they cut hallucination.
- → Model routing is the biggest cost saver in production: not everything needs the most expensive model.
- → Traceability (answering with sources) is what makes a sales assistant trustworthy.
# Roadmap
Useful for your business?
This solution can be adapted to your organization. Share the project or reach out to discuss it.