A production-grade Retrieval-Augmented Generation (RAG) pipeline designed for heavy machinery diagnostic manuals. This system enforces strict Data Provenance, utilizes Hybrid Search (Dense + Sparse), and features an NLI Cross-Encoder Guardrail to programmatically block LLM hallucinations before they reach field technicians.
Designed with a high-contrast, neobrutalist frontend for industrial deployment visibility.
Massive Multimodal Ingestion (v1_ingest_knowledge.py):
/manuals) and scales across internal documentation wikis.RecursiveCharacterTextSplitter for semantic paragraph-level chunking to maintain engineering context.FAISS via Hugging Face all-MiniLM-L6-v2) and a Sparse Keyword Store (BM25) to guarantee retrieval of exact part numbers and conceptual issues.The Diagnostic Agent & API (api.py):
topic_cluster) used to generate the response.Responsible AI Guardrails (The NLI Judge):
nli-distilroberta-base) evaluates the generated text against the retrieved context.Flan-T5-Large (Generation), nli-distilroberta-base (Evaluation)Install Dependencies: pip install fastapi uvicorn langchain langchain-community langchain-huggingface faiss-cpu sentence-transformers rank_bm25 pypdf wikipedia
Build the Knowledge Base: Drop any proprietary PDFs into the /manuals directory, then compile the FAISS and BM25 indices: python v1_ingest_knowledge.py
Boot the diagnostic API: python api.py
Launch the UI: Open index.html in any modern web browser to access the Diagnostic Node frontend.
A production-grade Retrieval-Augmented Generation (RAG) pipeline designed for heavy machinery diagnostic manuals. This system enforces strict Data Provenance, utilizes Hybrid Search (Dense + Sparse), and features an NLI Cross-Encoder Guardrail to programmatically block LLM hallucinations before they reach field technicians.
Designed with a high-contrast, neobrutalist frontend for industrial deployment visibility.
Massive Multimodal Ingestion (v1_ingest_knowledge.py):
/manuals) and scales across internal documentation wikis.RecursiveCharacterTextSplitter for semantic paragraph-level chunking to maintain engineering context.FAISS via Hugging Face all-MiniLM-L6-v2) and a Sparse Keyword Store (BM25) to guarantee retrieval of exact part numbers and conceptual issues.The Diagnostic Agent & API (api.py):
topic_cluster) used to generate the response.Responsible AI Guardrails (The NLI Judge):
nli-distilroberta-base) evaluates the generated text against the retrieved context.Flan-T5-Large (Generation), nli-distilroberta-base (Evaluation)Install Dependencies: pip install fastapi uvicorn langchain langchain-community langchain-huggingface faiss-cpu sentence-transformers rank_bm25 pypdf wikipedia
Build the Knowledge Base: Drop any proprietary PDFs into the /manuals directory, then compile the FAISS and BM25 indices: python v1_ingest_knowledge.py
Boot the diagnostic API: python api.py
Launch the UI: Open index.html in any modern web browser to access the Diagnostic Node frontend.