Portfolio  ›  Projects  ›  AI Assistant
RAGPythonVector SearchFastAPI

BitWithBite AI Assistant,
RAG Support Agent

Most support bots either make things up or forward you to a human. This one answers only from documents it has actually indexed, and shows you which document each answer came from — running entirely on a local model.

◆ Live · deployed on this site
Context: Built for BitWithBite  ·  Role: Sole engineer
Deployment: Live on this site  ·  Running cost: no paid API
8API endpoints
4Document formats
$0API cost
NightlyAuto re-index
🚀 Try the Assistant🧮 How It Works
Overview

Answers grounded in your own documents

A support assistant built on retrieval-augmented generation. Instead of relying on what a language model happens to remember, it retrieves the relevant passages from an indexed knowledge base first, then asks the model to answer using only that material — and reports the sources alongside the answer with a confidence score.

It ingests markdown, PDF and DOCX, and crawls the website on a nightly schedule so the index reflects the current site rather than a snapshot from whenever it was last built. Conversations are multi-turn, and questions it could not answer are logged as knowledge gaps — which is usually the most useful output for whoever maintains the documentation.

The Problem

A support bot that invents policy is worse than no bot

The failure mode that matters for customer support is not a missing answer — it is a confident wrong one. A model asked about refund terms it has never seen will still produce fluent text, and a customer has no way to tell the difference.

The second problem is staleness. A knowledge base indexed once drifts away from the live site immediately, and nobody notices until a customer is told something that stopped being true months ago.

Technical Approach

Retrieve first, then answer

Documents are split into passages and embedded into a vector index. A question is embedded the same way, the closest passages are retrieved, and only those are given to the language model as context. The answer carries the retrieved sources and a confidence score, so a low-confidence answer looks different from a well-grounded one.

The model runs locally through Ollama and the embeddings are open — there is no per-question cost and no document leaves the machine.

01 INGESTMarkdown, PDF, DOCX and crawled pages
02 CHUNKSplit into retrievable passages
03 EMBEDOpen embedding model, no API
04 INDEXFAISS vector store
05 RETRIEVENearest passages for the question
06 ANSWERLocal model, cited sources, confidence
Capabilities

What it does

📚

Knowledge ingestion

  • Markdown, PDF, DOCX and web pages
  • Upload through the UI
  • Nightly re-crawl keeps the index current
🔍

Grounded answering

  • Retrieval before generation
  • Source citation on every answer
  • Confidence score exposed to the caller
💬

Conversation

  • Multi-turn memory per session
  • English and Urdu
  • Unanswered questions logged as knowledge gaps
Technologies

Actual stack

Retrieval
FAISSOpen embeddingsChunking pipeline
Generation
OllamaLocal LLMLangChain
Service
FastAPIStreamlitDocker Compose
Practice
Cited sourcesConfidence scoringGap logging
Limitations

What it does not do

⚠️ Bounded by the index, on purpose

It can only answer from what has been indexed. Asked something outside the knowledge base it says so rather than guessing, which is the intended behaviour rather than a gap to close.

Answer quality tracks the local model. No accuracy benchmark is claimed — it has not been evaluated against a labelled question set, so no such figure appears anywhere.

Try it on this site

The assistant is deployed here and answers from BitWithBite's own documentation. Ask it something the site covers, and something it does not.