Skip to content

Projects

Case study

Enterprise Customer Support Assistant

Hybrid RAG for support questions: vector search plus BM25, fused, then answered by a local LLM with citations.

BuiltOriginal work

RAG · LLM · Local AI

01 / Overview

Enterprise customer support RAG system using hybrid retrieval — vector search and BM25 — with a local LLM via Ollama.

  • Python
  • LangChain
  • FAISS
  • BM25
  • sentence-transformers
  • Ollama
  • Streamlit

02 / Problem

Support questions mix paraphrase (“how do I reset access?”) with exact tokens (error codes, product names, ticket IDs). Pure vector search misses keywords; pure keyword search misses meaning.

03 / Approach

A RAG pipeline that retrieves from a knowledge base, historical tickets, and release notes using FAISS embeddings and BM25 in parallel, fuses ranks with Reciprocal Rank Fusion, then generates an answer with citations using a local Ollama model (OpenAI is an optional alternative).

04 / Architecture

  1. 01

    User query

  2. 02

    Query processing

  3. 03

    Vector search

    FAISS + MiniLM

  4. 04

    BM25 search

    Keyword

  5. 05

    Reciprocal Rank Fusion

  6. 06

    Context + citations

  7. 07

    LLM generation

    Ollama or OpenAI

  8. 08

    Answer + sources

05 / Implementation

  • Document loading and chunking for .txt, .md, and .pdf across knowledge_base, tickets, and release_notes (src/document_loader.py).
  • Indexing with sentence-transformers (MiniLM) into FAISS (src/indexer.py).
  • Hybrid retriever combining vector search and BM25, fused with RRF (src/retriever.py).
  • Generator and pipeline modules for grounded answers (src/generator.py, src/pipeline.py).
  • Streamlit chat UI (ui/app.py) and a CLI query path.

06 / Engineering decisions

Hybrid retrieval instead of vector-only
Support corpora reward both semantic similarity and exact token match. Running both retrievers and fusing with RRF is a deliberate choice over a single index.
Citations are part of the answer
The generator is expected to return sources. A fluent answer without provenance is treated as incomplete for support use.
Local LLM as the default path
Ollama is the recommended runtime so the system can run without sending support text to a hosted API. OpenAI is optional, not assumed.

07 / Evaluation

Evaluation data has not yet been benchmarked. No published retrieval metrics (recall, nDCG), answer faithfulness scores, or latency numbers.

08 / Limitations

  • This is a project named for an enterprise support use case — not a claim that it is deployed in production at an enterprise.
  • Index quality depends on the documents in data/; treating the sample corpus as a production knowledge base would be incorrect.
  • Reranking beyond RRF fusion is not described as a separate learned stage.
  • No online evaluation or human review protocol is documented.