This project is a Retrieval-Augmented Generation (RAG) chatbot for network engineering documentation.
- ⚡ Runs entirely on CPU – no GPU required (This makes it lightweight and portable, but responses may be slower compared to GPU setups.)
- 🔒 Privacy-focused – everything is processed locally on your machine:
- Documents are never uploaded to the cloud
- Embeddings are stored in a local Chroma database
- LLM inference is done through Ollama, fully offline
This makes the chatbot lightweight, portable, and secure for use with sensitive networking documentation.
- Ollama for running local LLMs (e.g., llama3.2:3b)
- Chroma as the vector database
- HuggingFace embeddings for semantic search
- Unstructured for PDF/Doc parsing
- LangChain Text Splitters for clean chunking
- Rich for colored terminal UI
The chatbot retrieves context from your networking documentation (PDFs) and answers queries with proper citations.
. ├── .env # Environment variables ├── chat.py # Interactive chatbot loop ├── RAG_network_documents.py # Script to process docs & build vector DB ├── tools.py # Utilities (embedding, retriever, logging, checks) ├── docs/ # Place your PDF docs here │ ├── CISCO - XR │ │ └── Cisco XR 12000 Series Router.pdf │ │ │ ├── HUAWEI - NE40e │ │ └── NE40E Product Description.pdf │ │ │ └── NOKIA - SR-7750 │ └── nokia-7750-service-router-datasheet-en.pdf │ ├── chromadb/ # Chroma persistence directory (auto-created) ├── chat_logs/ # Saved chat logs (JSON + Markdown, auto-created) pip install -r requirements.txtStart the Ollama server:
ollama serveEdit the .env file:
MODEL_NAME="llama3.2:3b" CHROMA_DB_PATH="./chromadb" COLLECTION_NAME="network_docs" DOCS_PATH="./docs" EMBEDDING_MODEL_NAME="intfloat/multilingual-e5-large-instruct" TOP_K=5To process your networking PDFs into embeddings and store them in Chroma:
python RAG_network_documents.pyThis will:
- Parse PDFs from
./docsusing unstructured - Chunk the text using LangChain text splitters
- Generate embeddings
- Store them in the Chroma DB
Start an interactive chat:
python chat.py- Colored terminal UI
- Context-aware answers with citations
/exit,/quit,/qto exit- Empty queries are ignored
- Chat logs saved as JSON + Markdown on exit
This project was inspired by and adapted from: Ray End-to-End RAG Tutorial
LinkedIn: Lahcen Khouchane WebSite : NetOpsAutomation.com