"case_study": "ai-crm-chat"
Teaching a CRM to answer from its own data
A retrieval-augmented chat assistant that answers questions from a business's actual documents and email — not from a language model's imagination.
The problem
CRM knowledge lives in PDFs, email threads, and notes — places a keyword search barely reaches and a plain LLM can't see at all. Ask a generic chatbot about your own customers and it will confidently invent answers.
Retrieval-augmented generation fixes the trust problem: the model only answers from documents actually retrieved from your data, so the answer is grounded in something that exists.
The pipeline
- Ingestion: uploaded PDFs are parsed and chunked; Gmail and Google Workspace data comes in through the Google APIs.
- Chunks are embedded and stored in a FAISS vector index — retrieval is a nearest-neighbor search over meaning, not keywords.
- LangChain orchestrates the loop: embed the question, retrieve the relevant chunks, and hand the model only that context to answer from.
- Inference can run through Ollama — locally-hosted models, so sensitive CRM data doesn't have to leave the company's own infrastructure.
- The frontend is a streaming Next.js chat built on the Vercel AI SDK: answers render token by token, the way people expect AI products to feel.
Why it matters
RAG is the pattern that makes LLMs safe to point at business data, and this project covers the full span of it — ingestion, vector search, orchestration, and a production chat UI. The frontend is public, with a live demo.