How santhi-tech/tata-automotive-rag works
Tata Automotive RAG ingests product knowledge from four catalogue categories, normalizes it, enriches missing text/image embeddings, and persists searchable records. Users query through the Streamlit UI or authenticated REST API; retrieval scopes results by category, combines vector and keyword search, and returns grounded multilingual answers with sources and image results. The map includes shared loader infrastructure and the local Ollama service. Some subsystem links reflect README architecture because their implementation was not fully sampled.
Main entry points: pipeline.py Ingestion Pipeline · retriever.py Category-Scoped Retrieval · loader.py Loader Registry · routes.py REST API
Components 23
Ingestion
- Ingestion Pipeline
src/ingestion/pipeline.py - Loader Registry
src/ingestion/loader/loader.py - Cars Loader
src/ingestion/loader/cars_loader.py - Generic Vehicle Loader
src/ingestion/loader/generic_loader.py - Motorcycles Loader
src/ingestion/loader/motorcycles_loader.py - Scooters Loader
src/ingestion/loader/scooters_loader.py - Spare Parts Loader
src/ingestion/loader/spare_parts_loader.py - Browser & Image Fetch
src/ingestion/loader/base_loader.py - Document Normalizer
src/ingestion/normalization/document_normalizer.py - Attribute Normalization
src/ingestion/normalization/attributes.py
Knowledge Store
- Persistent Image Files
src/ingestion/images/image_store.py - Metadata Store
src/ingestion/metadata/metadata_store.py - PostgreSQL + pgvector
Query & Serving
- Streamlit UI
src/app/ui_streamlit.py - REST API
src/api/v1/routes.py - JWT Authentication
src/api/v1/auth.py - API Dependencies
src/api/deps.py - Category-Scoped Retrieval
src/retrieval/retriever.py
Model Service
- Embedding & Vision Client
src/ingestion/embedding/embedder.py - Ollama
Other components
- Catalogue Operator
- Product Websites
- User
Connections 32
- Catalogue Operator → Ingestion Pipeline: starts ingestion
src/ingestion/pipeline.py - Ingestion Pipeline → Loader Registry: selects loaders
src/ingestion/pipeline.py - Loader Registry → Cars Loader: dispatches category
src/ingestion/loader/loader.py - Loader Registry → Motorcycles Loader: dispatches category
src/ingestion/loader/loader.py - Loader Registry → Scooters Loader: dispatches category
src/ingestion/loader/loader.py - Loader Registry → Spare Parts Loader: dispatches category
src/ingestion/loader/loader.py - Cars Loader → Browser & Image Fetch: uses browser helpers
src/ingestion/loader/cars_loader.py - Generic Vehicle Loader → Browser & Image Fetch: extends loader
src/ingestion/loader/generic_loader.py - Motorcycles Loader → Generic Vehicle Loader: uses generic loader
src/ingestion/loader/motorcycles_loader.py - Scooters Loader → Generic Vehicle Loader: uses generic loader
src/ingestion/loader/scooters_loader.py - Spare Parts Loader → Browser & Image Fetch: uses browser helpers
src/ingestion/loader/spare_parts_loader.py - Product Websites → Cars Loader: provides pages
README.md - Product Websites → Generic Vehicle Loader: provides pages
README.md - Product Websites → Spare Parts Loader: provides pages
README.md - Ingestion Pipeline → Document Normalizer: normalizes documents
src/ingestion/pipeline.py - Document Normalizer → Attribute Normalization: canonicalizes attributes
src/ingestion/normalization/document_normalizer.py - Document Normalizer → Persistent Image Files: resolves image paths
src/ingestion/normalization/document_normalizer.py - Ingestion Pipeline → Embedding & Vision Client: embeds missing content
src/ingestion/pipeline.py - Ingestion Pipeline → Metadata Store: upserts documents
src/ingestion/pipeline.py - Metadata Store → PostgreSQL + pgvector: writes chunks & images
README.md - Ingestion Pipeline → PostgreSQL + pgvector: persists ingestion state
- Embedding & Vision Client → Ollama: requests embeddings & captions
src/ingestion/embedding/embedder.py - User → Streamlit UI: asks questions
README.md - User → REST API: calls endpoints
README.md - REST API → JWT Authentication: authenticates requests
README.md - REST API → API Dependencies: uses dependencies
src/api/v1/routes.py - Streamlit UI → Category-Scoped Retrieval: submits queries
src/app/ui_streamlit.py - REST API → Category-Scoped Retrieval: serves search
- Category-Scoped Retrieval → Embedding & Vision Client: embeds query
README.md - Category-Scoped Retrieval → PostgreSQL + pgvector: searches scoped vectors & keywords
README.md - Category-Scoped Retrieval → Ollama: generates grounded answers
README.md - Category-Scoped Retrieval → Streamlit UI: returns answers & images
README.md