How lelekhoa1812/aitc-localbot works
Project type and purpose
• This is a full-stack, retrieval-augmented generation (RAG) system for answering compliance queries over hardware catalog PDFs.
• It ingests, parses, and indexes PDF text and images into a vector store + metadata store, then handles user queries via semantic search + LLM reasoning.
File structure
• Top-level:
– build/: Jupyter notebook for prototyping or offline processing
– cataloges/: raw PDF datasheets
– compliance/: sample outputs or test files
– middleware/: nginx config (nginx.txt) and a main.py (reverse-proxy or gateway logic)
– static/: web UI assets (index.html, script.js, styles.css)
– script/: helper scripts (resolver.py)
– system/: core backend (app.py, config/, control scripts, parser.py, embed.py, retrieval.py, grader.py, examiner.py, interpreter.py, memory.py, rotator.py, warmup.py, db.py) plus Dockerfile and requirements.txt
• Notable patterns: MVC-style separation (static UI / middleware / backend “system” code), a clear ingestion pipeline, persistent storage (MongoDB + FAISS), control scripts for deployment.
README insights
• Describes a seven-stage RAG pipeline:
1. PDF ingestion & parsing
2. Text chunking, embedding, vector indexing (FAISS) + metadata in MongoDB
3. Image processing (OCR + VLM captioning) fused into vector index
4. Query interpretation (parameter/operator/value extraction)
5. Semantic search against FAISS + metadata filtering
6. Compliance evaluation via Gemini Flash 2.0 (LLM reasoning, optional function-calling tools for numeric checks)
7. Structured response generation (matched value, compliance yes/no, source citation)
• Cold-start design: precompute and persist index + metadata to speed up query time.
• Technologies: Python, LangChain, FAISS, MongoDB, PyMuPDF/Unstructured, Tesseract, a VLM (e.g. BLIP-2 or LLaVA) for images, Gemini Flash API.