An end-to-end AI-powered Industrial Knowledge Intelligence Platform that enables organizations to upload, index, search, and interact with technical documents using Retrieval-Augmented Generation (RAG) powered entirely by local AI models.
The platform supports heterogeneous industrial documents, OCR for scanned PDFs, semantic search, conversational question answering, confidence scoring, and source-aware responses while keeping all processing local using Ollama and ChromaDB.
- Problem Statement
- Features
- Tech Stack
- Installation
- Backend API
- Project Architecture
- Project Structure
- Progress
- End-to-End Workflow
- Why Local AI
- Screenshots
- Key Highlights
- Project Status
- Future Enhancements
- What I Learned
- License
Industrial organizations manage thousands of documents such as operating procedures, maintenance manuals, inspection reports, safety guidelines, and technical documentation. Finding accurate information quickly is difficult because these documents are often distributed across multiple systems and formats.
This project aims to build an intelligent AI platform that indexes industrial documents, performs semantic search, and answers user questions using Retrieval-Augmented Generation (RAG).
- ✔ Multi-document upload
- ✔ Drag-and-drop interface
- ✔ Batch processing
- ✔ Camera capture support
- ✔ Multiple document formats
Supported Document Formats
- DOCX
- PPTX
- XLSX
- CSV
- TXT
- PNG
- JPG
- JPEG
- ✔ Native PDF parsing
- ✔ OCR for scanned PDFs
- ✔ Automatic OCR fallback
- ✔ Mixed PDF support
- ✔ Metadata extraction
-
✔ Document chunking using a sliding window approach
-
✔ Local embedding generation using Ollama (
mxbai-embed-large) -
✔ Batch embedding generation
-
✔ Persistent vector storage with ChromaDB
-
✔ Metadata-preserving document indexing
-
✔ Semantic similarity search
- ✔ Conversational chat
- ✔ Context retrieval
- ✔ Local LLM inference
- ✔ Context-aware answers
- ✔ Retrieval confidence score
- ✔ Source citations
- ✔ Document grouping
- ✔ Relevance scoring
- ✔ Semantic similarity search
- ✔ Cross-document retrieval
- ✔ Multi-document indexing
- ✔ Best matching chunks
- ✔ Grouped document citations
- ✔ Streamlit UI
- ✔ Sidebar navigation
- ✔ Upload page
- ✔ Chat page
- ✔ Chat history
- ✔ Suggested questions
- ✔ Confidence indicator
- ✔ Repository explorer
- ✔ Source visualization
- ✔ Document statistics
- Python
- FastAPI
- Pydantic
- mxbai-embed-large:latest
- llama3.1:8b
- ChromaDB
- Tesseract OCR
- pdf2image
- Pillow
- PyMuPDF
- python-docx
- python-pptx
- openpyxl
- Streamlit
- streamlit-option-menu
- Sentence Embeddings
- Retrieval-Augmented Generation (RAG)
- Semantic Search
Follow the steps below to set up and run the Industrial Knowledge Intelligence Platform locally.
git clone https://github.com/Yash-Raj-Ravi/industrial-knowledge-intelligence
cd industrial-knowledge-intelligenceWindows
python -m venv .venv
.venv\Scripts\activateLinux / macOS
python3 -m venv .venv
source .venv/bin/activateInstall the backend dependencies:
pip install -r requirements.txtInstall the frontend dependencies:
pip install -r frontend/requirements.txtDownload and install Ollama from:
Start the Ollama server:
ollama serveEmbedding model:
ollama pull mxbai-embed-large:latestLarge Language Model:
ollama pull llama3.1:8bTo enable OCR support for scanned PDFs and image-based documents:
- Install Tesseract OCR
- Install Poppler
Ensure both are added to your system PATH or configured in backend/config.py.
uvicorn backend.main:app --reloadThe FastAPI server will start at:
http://127.0.0.1:8000
Interactive API documentation:
http://127.0.0.1:8000/docs
Open a new terminal, activate the virtual environment, and run:
streamlit run frontend/app.pyThe frontend will be available at:
http://localhost:8501
- Upload one or more supported industrial documents.
- Generate embeddings to index the uploaded documents.
- Open the Chat page.
- Ask questions about your indexed documents using Retrieval-Augmented Generation (RAG).
| Method | Endpoint | Description |
|---|---|---|
GET |
/ |
Health check endpoint to verify that the API is running. |
POST |
/upload |
Upload a supported document to the server. |
POST |
/parse |
Parse an uploaded document and extract its text content. |
POST |
/chunk |
Split a document into overlapping text chunks for processing. |
POST |
/embed |
Generate embeddings for document chunks and index them in ChromaDB. |
POST |
/extract-entities |
Extract named entities from an indexed document. |
POST |
/search |
Perform semantic similarity search across indexed documents. |
POST |
/ask |
Answer user queries using Retrieval-Augmented Generation (RAG). |
GET |
/documents |
Retrieve the indexed document repository and metadata. |
DELETE |
/documents/{document_id} |
Delete a document and its associated embeddings from the repository. |
POST |
/reset |
Reset the ChromaDB vector database (development utility). |
The platform exposes RESTful APIs for document ingestion, semantic indexing, entity extraction, repository management, and Retrieval-Augmented Generation (RAG).
User
│
▼
Streamlit Frontend
├──────────────────┐
▼ ▼
Upload Documents Ask Question
│ │
▼ ▼
Document Parsing Query Embedding
│ │
┌─────────┴─────────┐ │
▼ ▼ ▼
Native Parsing OCR (if needed)
│
▼
Text Chunking
│
▼
Batch Embedding Generation
│
▼
ChromaDB Vector Store
│ │
│ ▼
│ Semantic Search
│ │
▼ ▼
Entity Extraction Retrieved Context
│ │
▼ ▼
Structured Entities Ollama LLM
│ │
└──────────┬──────┘
▼
Confidence + Source Citations
industrial-knowledge-intelligence/
│
├── .venv/
│
├── backend/
│ ├── chunking/
│ ├── core/
│ ├── embedding/
│ ├── llm/
│ ├── models/
│ ├── parsers/
│ ├── services/
│ ├── utils/
│ ├── vectorstore/
│ ├── __init__.py
│ ├── config.py
│ └── main.py
│
├── chroma_db/
│
├── docs/
│ └── learning_journal.md
│
├── frontend/
│ ├── components/
│ │ └── sidebar.py
│ │
│ ├── pages/
│ │ ├── 1_upload.py
│ │ ├── 2_chat.py
│ │ └── 3_repository.py
│ │
│ ├── utils/
│ │ └── chat_export.py
│ │
│ ├── api.py
│ ├── app.py
│ ├── config.py
│ └── requirements.txt
│
├── uploads/
│
├── .gitignore
├── CHANGELOG.md
├── README.md
└── requirements.txt
> **Note:** The `uploads/` and `chroma_db/` directories are created automatically at runtime and are excluded from version control via `.gitignore`.
- ✔ FastAPI backend
- ✔ Streamlit frontend
- ✔ Multi-format upload
- ✔ Multi-document upload
- ✔ OCR support
- ✔ Camera capture
- ✔ Multi-format parsing
- ✔ Chunking
- ✔ Local embeddings
- ✔ ChromaDB
- ✔ Semantic search
- ✔ RAG pipeline
- ✔ Conversational AI
- ✔ Confidence scoring
- ✔ Source citations
- ✔ Suggested questions
- Upload one or more industrial documents.
- Documents are parsed based on their format.
- OCR is automatically invoked for scanned PDFs or image-based documents while searchable PDFs are parsed directly.
- Text is divided into overlapping chunks.
- Each chunk is converted into embeddings using Ollama.
- Embeddings are stored in ChromaDB.
- User submits a question through the chat interface.
- Relevant chunks are retrieved using semantic similarity.
- Retrieved context is passed to the local LLM.
- The generated response is displayed with:
- Confidence score
- Source citations
- Relevance scores
- Grouped document references
This platform runs entirely on local AI models using Ollama, ensuring:
- Complete data privacy
- No dependency on cloud APIs
- No token costs
- Offline document intelligence
- Fast semantic retrieval for industrial environments
Upload one or more industrial documents, including scanned PDFs and images, for automatic parsing, OCR, chunking, and semantic indexing.
Interact with the indexed knowledge base using Retrieval-Augmented Generation (RAG). Responses include confidence scores and source citations.
View indexed documents, document metadata, and repository statistics from a centralized dashboard.
- Fully local AI pipeline (No external APIs)
- Retrieval-Augmented Generation (RAG)
- OCR-enabled document intelligence
- Multi-document semantic search
- Context-aware conversational AI
- Confidence-aware responses
- Source-grounded answers
- Modular service-oriented architecture
- Persistent vector database
- Streamlit-based interactive interface
🚧 Active Development
Current Release: v0.13.0
The project is actively evolving with planned enhancements such as voice interaction, knowledge graph generation, and deployment support.
- Docker support
- User authentication
- Cloud deployment
- Hybrid search
- Voice-based querying
- Industrial Knowledge Graph generation
- P&ID diagram understanding
- Fine-tuned industrial LLM
This project was developed to gain hands-on experience in designing and implementing an end-to-end Retrieval-Augmented Generation (RAG) system using local AI models and modern backend technologies.
- FastAPI backend development
- Service-oriented architecture
- Retrieval-Augmented Generation (RAG)
- LangChain
- Ollama
- ChromaDB
- Vector databases
- Semantic search
- Local LLM deployment
- Production-ready AI system design
- OCR pipelines
- Streamlit application development
- AI system integration
This project is developed for learning, research, and hackathon purposes.


