diff --git a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/.gitignore b/week5/community-contributions/NTSA_knowledge_base_and_chatbot/.gitignore new file mode 100644 index 0000000..17fad10 --- /dev/null +++ b/week5/community-contributions/NTSA_knowledge_base_and_chatbot/.gitignore @@ -0,0 +1,31 @@ +# ChromaDB and vector databases +langchain_chroma_db/ +*.db +*.sqlite3 + +# Large knowledge bases (keep only samples) +ntsa_comprehensive_knowledge_base/ +ntsa_knowledge_base/ + +# Python cache +__pycache__/ +*.pyc +*.pyo + +# Jupyter notebook checkpoints +.ipynb_checkpoints/ + +# Environment files +.env +.venv/ + +# OS files +.DS_Store +Thumbs.db + +# Logs +*.log + +# Temporary files +*.tmp +*.temp diff --git a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/langchain_chroma_db/7cebb62e-759b-48d4-b3a3-6784fa04bd4e/data_level0.bin b/week5/community-contributions/NTSA_knowledge_base_and_chatbot/langchain_chroma_db/7cebb62e-759b-48d4-b3a3-6784fa04bd4e/data_level0.bin deleted file mode 100644 index 0f872dc..0000000 Binary files a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/langchain_chroma_db/7cebb62e-759b-48d4-b3a3-6784fa04bd4e/data_level0.bin and /dev/null differ diff --git a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/langchain_chroma_db/7cebb62e-759b-48d4-b3a3-6784fa04bd4e/header.bin b/week5/community-contributions/NTSA_knowledge_base_and_chatbot/langchain_chroma_db/7cebb62e-759b-48d4-b3a3-6784fa04bd4e/header.bin deleted file mode 100644 index bb54792..0000000 Binary files a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/langchain_chroma_db/7cebb62e-759b-48d4-b3a3-6784fa04bd4e/header.bin and /dev/null differ diff --git a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/langchain_chroma_db/7cebb62e-759b-48d4-b3a3-6784fa04bd4e/length.bin b/week5/community-contributions/NTSA_knowledge_base_and_chatbot/langchain_chroma_db/7cebb62e-759b-48d4-b3a3-6784fa04bd4e/length.bin deleted file mode 100644 index 66d94b3..0000000 --- a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/langchain_chroma_db/7cebb62e-759b-48d4-b3a3-6784fa04bd4e/length.bin +++ /dev/null @@ -1 +0,0 @@ -invalid type: string "1. [mailto:info@ntsa.go.ke](mailto:info@ntsa.go.ke)\n2. [https://ntsa.go.ke/careers](https://ntsa.go.ke/careers)\n3. [https://ntsa.go.ke/downloads](https://ntsa.go.ke/downloads)\n4. [https://ntsa.go.ke/faqs](https://ntsa.go.ke/faqs)\n5. [https://ntsa.go.ke/feedback](https://ntsa.go.ke/feedback)\n6. [https://serviceportal.ntsa.go.ke/](https://serviceportal.ntsa.go.ke/)\nenter) \ No newline at end of file diff --git a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/langchain_chroma_db/7cebb62e-759b-48d4-b3a3-6784fa04bd4e/link_lists.bin b/week5/community-contributions/NTSA_knowledge_base_and_chatbot/langchain_chroma_db/7cebb62e-759b-48d4-b3a3-6784fa04bd4e/link_lists.bin deleted file mode 100644 index e69de29..0000000 diff --git a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/langchain_integration.py b/week5/community-contributions/NTSA_knowledge_base_and_chatbot/langchain_integration.py deleted file mode 100644 index 2ac41b8..0000000 --- a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/langchain_integration.py +++ /dev/null @@ -1,407 +0,0 @@ -#!/usr/bin/env python3 -""" -LangChain Integration for NTSA Knowledge Base -Provides advanced document processing and conversational AI capabilities -""" - -import os -import json -from pathlib import Path -from typing import List, Dict, Any, Optional -from datetime import datetime - -# Optional imports with fallbacks -try: - import plotly.graph_objects as go - import plotly.express as px - PLOTLY_AVAILABLE = True -except ImportError: - PLOTLY_AVAILABLE = False - -try: - from sklearn.manifold import TSNE - from sklearn.decomposition import PCA - SKLEARN_AVAILABLE = True -except ImportError: - SKLEARN_AVAILABLE = False - -try: - import numpy as np - NUMPY_AVAILABLE = True -except ImportError: - NUMPY_AVAILABLE = False - -# LangChain imports -try: - from langchain.text_splitter import RecursiveCharacterTextSplitter - from langchain.embeddings import HuggingFaceEmbeddings - from langchain.vectorstores import Chroma - from langchain.chains import ConversationalRetrievalChain - from langchain.memory import ConversationBufferMemory - from langchain.llms import OpenAI - from langchain_openai import ChatOpenAI - LANGCHAIN_AVAILABLE = True -except ImportError: - LANGCHAIN_AVAILABLE = False - - -class LangChainKnowledgeBase: - """Advanced knowledge base using LangChain for document processing and conversational AI""" - - def __init__(self, knowledge_base_dir: str = "ntsa_comprehensive_knowledge_base", - vector_db_dir: str = "langchain_chroma_db"): - self.knowledge_base_dir = Path(knowledge_base_dir) - self.vector_db_dir = Path(vector_db_dir) - self.documents = [] - self.vectorstore = None - self.qa_chain = None - self.memory = None - - # Initialize components - self._setup_directories() - self._load_documents() - - def _setup_directories(self): - """Setup required directories""" - self.vector_db_dir.mkdir(exist_ok=True) - print(f"āœ… Vector database directory: {self.vector_db_dir}") - - def _load_documents(self): - """Load documents from the knowledge base""" - print("šŸ“š Loading documents from knowledge base...") - - if not self.knowledge_base_dir.exists(): - print(f"āŒ Knowledge base directory not found: {self.knowledge_base_dir}") - return - - documents = [] - for md_file in self.knowledge_base_dir.rglob("*.md"): - try: - with open(md_file, 'r', encoding='utf-8') as f: - content = f.read() - documents.append({ - 'file': str(md_file), - 'content': content, - 'title': md_file.stem, - 'category': md_file.parent.name - }) - except Exception as e: - print(f"āš ļø Error reading {md_file}: {e}") - - self.documents = documents - print(f"āœ… Loaded {len(documents)} documents") - - def create_vector_store(self, chunk_size: int = 1000, chunk_overlap: int = 200): - """Create vector store from documents""" - if not LANGCHAIN_AVAILABLE: - print("āŒ LangChain not available. Cannot create vector store.") - return False - - if not self.documents: - print("āŒ No documents loaded. Cannot create vector store.") - return False - - try: - print("šŸ”§ Creating vector store...") - - # Split documents into chunks - text_splitter = RecursiveCharacterTextSplitter( - chunk_size=chunk_size, - chunk_overlap=chunk_overlap, - length_function=len, - ) - - texts = [] - metadatas = [] - - for doc in self.documents: - chunks = text_splitter.split_text(doc['content']) - for chunk in chunks: - texts.append(chunk) - metadatas.append({ - 'source': doc['file'], - 'title': doc['title'], - 'category': doc['category'] - }) - - print(f"šŸ“„ Created {len(texts)} text chunks") - - # Create embeddings - try: - embeddings = HuggingFaceEmbeddings( - model_name="sentence-transformers/all-MiniLM-L6-v2" - ) - print("āœ… HuggingFace embeddings loaded") - except Exception as e: - print(f"āš ļø HuggingFace embeddings failed: {e}") - print("šŸ”„ Using OpenAI embeddings as fallback...") - from langchain.embeddings import OpenAIEmbeddings - embeddings = OpenAIEmbeddings() - - # Create vector store - self.vectorstore = Chroma.from_texts( - texts=texts, - embedding=embeddings, - metadatas=metadatas, - persist_directory=str(self.vector_db_dir) - ) - - # Persist the vector store - self.vectorstore.persist() - - print(f"āœ… Vector store created and persisted to {self.vector_db_dir}") - return True - - except Exception as e: - print(f"āŒ Error creating vector store: {e}") - return False - - def load_existing_vector_store(self): - """Load existing vector store""" - if not LANGCHAIN_AVAILABLE: - print("āŒ LangChain not available. Cannot load vector store.") - return False - - try: - print("šŸ“‚ Loading existing vector store...") - - # Create embeddings - try: - embeddings = HuggingFaceEmbeddings( - model_name="sentence-transformers/all-MiniLM-L6-v2" - ) - except Exception as e: - print(f"āš ļø HuggingFace embeddings failed: {e}") - print("šŸ”„ Using OpenAI embeddings as fallback...") - from langchain.embeddings import OpenAIEmbeddings - embeddings = OpenAIEmbeddings() - - # Load vector store - self.vectorstore = Chroma( - persist_directory=str(self.vector_db_dir), - embedding_function=embeddings - ) - - print("āœ… Vector store loaded successfully") - return True - - except Exception as e: - print(f"āŒ Error loading vector store: {e}") - return False - - def create_qa_chain(self, model_name: str = "gpt-3.5-turbo"): - """Create question-answering chain""" - if not LANGCHAIN_AVAILABLE: - print("āŒ LangChain not available. Cannot create QA chain.") - return False - - if not self.vectorstore: - print("āŒ Vector store not available. Cannot create QA chain.") - return False - - try: - print(f"šŸ”§ Creating QA chain with {model_name}...") - - # Initialize LLM - llm = ChatOpenAI( - model_name=model_name, - temperature=0.7, - max_tokens=1000 - ) - - # Create memory - self.memory = ConversationBufferMemory( - memory_key="chat_history", - return_messages=True - ) - - # Create QA chain - self.qa_chain = ConversationalRetrievalChain.from_llm( - llm=llm, - retriever=self.vectorstore.as_retriever(search_kwargs={"k": 3}), - memory=self.memory, - output_key="answer" - ) - - print("āœ… QA chain created successfully") - return True - - except Exception as e: - print(f"āŒ Error creating QA chain: {e}") - return False - - def ask_question(self, question: str) -> str: - """Ask a question to the knowledge base""" - if not self.qa_chain: - return "āŒ QA chain not available. Please create it first." - - try: - result = self.qa_chain({"question": question}) - return result["answer"] - except Exception as e: - return f"āŒ Error answering question: {e}" - - def search_documents(self, query: str, k: int = 5) -> List[Dict]: - """Search documents using vector similarity""" - if not self.vectorstore: - return [] - - try: - results = self.vectorstore.similarity_search_with_score(query, k=k) - return [ - { - "content": doc.page_content, - "metadata": doc.metadata, - "score": score - } - for doc, score in results - ] - except Exception as e: - print(f"āŒ Error searching documents: {e}") - return [] - - def visualize_embeddings(self, n_samples: int = 50, method: str = "tsne"): - """Visualize document embeddings""" - if not PLOTLY_AVAILABLE: - print("āŒ Plotly not available. Cannot create visualization.") - return - - if not SKLEARN_AVAILABLE: - print("āŒ Scikit-learn not available. Cannot create visualization.") - return - - if not NUMPY_AVAILABLE: - print("āŒ NumPy not available. Cannot create visualization.") - return - - if not self.vectorstore: - print("āŒ Vector store not available. Cannot create visualization.") - return - - try: - print("šŸ“Š Visualizing embeddings...") - - # Get all documents and embeddings - all_docs = self.vectorstore.get() - - if not all_docs or not all_docs.get('embeddings'): - print("āŒ No embeddings found in vector store.") - return - - n_samples = min(n_samples, len(all_docs['ids'])) - embeddings_array = np.array(all_docs['embeddings'][:n_samples]) - texts = all_docs['documents'][:n_samples] - - if method == "tsne": - # t-SNE dimensionality reduction - tsne = TSNE(n_components=2, random_state=42, perplexity=min(30, n_samples-1)) - embeddings_2d = tsne.fit_transform(embeddings_array) - else: - # PCA dimensionality reduction - pca = PCA(n_components=2, random_state=42) - embeddings_2d = pca.fit_transform(embeddings_array) - - # Create visualization - fig = go.Figure() - - # Add scatter plot - fig.add_trace(go.Scatter( - x=embeddings_2d[:, 0], - y=embeddings_2d[:, 1], - mode='markers', - marker=dict( - size=8, - color=range(n_samples), - colorscale='Viridis', - showscale=True - ), - text=[text[:100] + "..." if len(text) > 100 else text for text in texts], - hovertemplate='%{text}
X: %{x}
Y: %{y}' - )) - - fig.update_layout( - title=f"Document Embeddings Visualization ({method.upper()})", - xaxis_title="Dimension 1", - yaxis_title="Dimension 2", - showlegend=False - ) - - # Save and show - fig.write_html("embeddings_visualization.html") - fig.show() - - print("āœ… Embeddings visualization created and saved as 'embeddings_visualization.html'") - - except Exception as e: - print(f"āŒ Error creating visualization: {e}") - print("šŸ’” This might be due to numpy compatibility issues.") - print("šŸ’” Try using OpenAI embeddings instead of HuggingFace embeddings.") - - def get_statistics(self) -> Dict[str, Any]: - """Get knowledge base statistics""" - stats = { - "total_documents": len(self.documents), - "vector_store_available": self.vectorstore is not None, - "qa_chain_available": self.qa_chain is not None, - "categories": {} - } - - # Count documents by category - for doc in self.documents: - category = doc.get('category', 'unknown') - if category not in stats['categories']: - stats['categories'][category] = 0 - stats['categories'][category] += 1 - - return stats - - def reset_memory(self): - """Reset conversation memory""" - if self.memory: - self.memory.clear() - print("āœ… Conversation memory cleared") - - -def main(): - """Main function to demonstrate the knowledge base""" - print("šŸš€ NTSA LangChain Knowledge Base") - print("=" * 50) - - # Initialize knowledge base - kb = LangChainKnowledgeBase() - - # Create vector store - if kb.create_vector_store(): - print("āœ… Vector store created successfully") - - # Create QA chain - if kb.create_qa_chain(): - print("āœ… QA chain created successfully") - - # Test the system - test_questions = [ - "What is NTSA?", - "How do I apply for a driving license?", - "What services does NTSA provide?" - ] - - print("\nšŸ¤– Testing QA system:") - for question in test_questions: - print(f"\nQ: {question}") - answer = kb.ask_question(question) - print(f"A: {answer[:200]}{'...' if len(answer) > 200 else ''}") - - # Show statistics - stats = kb.get_statistics() - print(f"\nšŸ“Š Knowledge Base Statistics:") - print(f"Total documents: {stats['total_documents']}") - print(f"Categories: {stats['categories']}") - - else: - print("āŒ Failed to create QA chain") - else: - print("āŒ Failed to create vector store") - - -if __name__ == "__main__": - main() \ No newline at end of file diff --git a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_chatbot_project.ipynb b/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_chatbot_project.ipynb index 2134b15..e885967 100644 --- a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_chatbot_project.ipynb +++ b/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_chatbot_project.ipynb @@ -59,9 +59,18 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "āœ“ All libraries imported\n", + "āœ“ API Keys: OpenAI=True, Gemini=True, Claude=True\n" + ] + } + ], "source": [ "import os\n", "import sys\n", @@ -98,9 +107,22 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 6, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Configuration:\n", + " base_url: https://ntsa.go.ke\n", + " kb_dir: ntsa_knowledge_base\n", + " max_depth: 2\n", + " vector_db_dir: ./langchain_chroma_db\n", + " chunk_size: 1000\n" + ] + } + ], "source": [ "CONFIG = {\n", " 'base_url': 'https://ntsa.go.ke',\n", @@ -124,9 +146,148 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 7, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "šŸš€ Starting comprehensive NTSA scraping with Selenium...\n", + "āœ… Created directory structure in ntsa_comprehensive_knowledge_base\n", + "šŸš€ Starting comprehensive NTSA scraping...\n", + "šŸ“‹ Starting URLs: 6\n", + "šŸ“„ Max pages: 15\n", + "šŸ” Max depth: 3\n", + "āœ… Chrome driver initialized successfully\n", + "\n", + "šŸ“„ Processing (1/15): https://ntsa.go.ke\n", + "šŸ” Depth: 0\n", + "🌐 Loading: https://ntsa.go.ke\n", + "āœ… Saved: ntsa_comprehensive_knowledge_base\\services\\ntsa_NTSA__Keep_our_roads_safe_f13d765c.md\n", + "šŸ“Š Content: 6068 chars\n", + "šŸ”— Found 10 new links\n", + "\n", + "šŸ“„ Processing (2/15): https://ntsa.go.ke/about\n", + "šŸ” Depth: 0\n", + "🌐 Loading: https://ntsa.go.ke/about\n", + "āœ… Saved: ntsa_comprehensive_knowledge_base\\about\\ntsa_NTSA__About_Us_05bb6415.md\n", + "šŸ“Š Content: 1422 chars\n", + "šŸ”— Found 10 new links\n", + "\n", + "šŸ“„ Processing (3/15): https://ntsa.go.ke/services\n", + "šŸ” Depth: 0\n", + "🌐 Loading: https://ntsa.go.ke/services\n", + "āœ… Saved: ntsa_comprehensive_knowledge_base\\services\\ntsa_NTSA__NTSA_Services_7a9ee5d0.md\n", + "šŸ“Š Content: 1994 chars\n", + "šŸ”— Found 10 new links\n", + "\n", + "šŸ“„ Processing (4/15): https://ntsa.go.ke/contact\n", + "šŸ” Depth: 0\n", + "🌐 Loading: https://ntsa.go.ke/contact\n", + "āœ… Saved: ntsa_comprehensive_knowledge_base\\services\\ntsa_NTSA__Contact_Us_7bdb748a.md\n", + "šŸ“Š Content: 1587 chars\n", + "šŸ”— Found 10 new links\n", + "\n", + "šŸ“„ Processing (5/15): https://ntsa.go.ke/news\n", + "šŸ” Depth: 0\n", + "🌐 Loading: https://ntsa.go.ke/news\n", + "āœ… Saved: ntsa_comprehensive_knowledge_base\\news\\ntsa_NTSA__Media_Center_-_News__Updates_e765915c.md\n", + "šŸ“Š Content: 2481 chars\n", + "šŸ”— Found 10 new links\n", + "\n", + "šŸ“„ Processing (6/15): https://ntsa.go.ke/tenders\n", + "šŸ” Depth: 0\n", + "🌐 Loading: https://ntsa.go.ke/tenders\n", + "āœ… Saved: ntsa_comprehensive_knowledge_base\\tenders\\ntsa_NTSA__Tenders_73ac6e93.md\n", + "šŸ“Š Content: 354 chars\n", + "šŸ”— Found 10 new links\n", + "\n", + "šŸ“„ Processing (7/15): https://ntsa.go.ke/news/new-digital-licensing-system-goes-live\n", + "šŸ” Depth: 1\n", + "🌐 Loading: https://ntsa.go.ke/news/new-digital-licensing-system-goes-live\n", + "āœ… Saved: ntsa_comprehensive_knowledge_base\\news\\ntsa_NTSA__New_Digital_Licensing_System_Goes_Live__NTSA_50d5938e.md\n", + "šŸ“Š Content: 1003 chars\n", + "šŸ”— Found 10 new links\n", + "\n", + "šŸ“„ Processing (8/15): https://ntsa.go.ke/news/ntsa-launches-new-road-safety-campaign\n", + "šŸ” Depth: 1\n", + "🌐 Loading: https://ntsa.go.ke/news/ntsa-launches-new-road-safety-campaign\n", + "āœ… Saved: ntsa_comprehensive_knowledge_base\\news\\ntsa_NTSA__NTSA_Launches_New_Road_Safety_Campaign__NTSA_63481444.md\n", + "šŸ“Š Content: 1113 chars\n", + "šŸ”— Found 10 new links\n", + "\n", + "šŸ“„ Processing (9/15): https://ntsa.go.ke/news/8th-un-global-road-safety-week-concludes-with-nationwide-activities\n", + "šŸ” Depth: 1\n", + "🌐 Loading: https://ntsa.go.ke/news/8th-un-global-road-safety-week-concludes-with-nationwide-activities\n", + "āœ… Saved: ntsa_comprehensive_knowledge_base\\news\\ntsa_NTSA__8th_UN_Global_Road_Safety_Week_Concludes_wit_9636f22e.md\n", + "šŸ“Š Content: 1494 chars\n", + "šŸ”— Found 10 new links\n", + "\n", + "šŸ“„ Processing (10/15): https://ntsa.go.ke/about/who-we-are\n", + "šŸ” Depth: 1\n", + "🌐 Loading: https://ntsa.go.ke/about/who-we-are\n", + "āœ… Saved: ntsa_comprehensive_knowledge_base\\about\\ntsa_NTSA__About_Us_-_Who_We_Are_47583408.md\n", + "šŸ“Š Content: 2204 chars\n", + "šŸ”— Found 10 new links\n", + "\n", + "šŸ“„ Processing (11/15): https://ntsa.go.ke/careers\n", + "šŸ” Depth: 1\n", + "🌐 Loading: https://ntsa.go.ke/careers\n", + "āœ… Saved: ntsa_comprehensive_knowledge_base\\careers\\ntsa_Career_Opportunities__NTSA_3e462d97.md\n", + "šŸ“Š Content: 477 chars\n", + "šŸ”— Found 10 new links\n", + "\n", + "šŸ“„ Processing (12/15): https://ntsa.go.ke/services/vehicles-services\n", + "šŸ” Depth: 1\n", + "🌐 Loading: https://ntsa.go.ke/services/vehicles-services\n", + "āœ… Saved: ntsa_comprehensive_knowledge_base\\services\\ntsa_NTSA__Vehicles_Services_57ba53a1.md\n", + "šŸ“Š Content: 814 chars\n", + "šŸ”— Found 9 new links\n", + "\n", + "šŸ“„ Processing (13/15): https://ntsa.go.ke/faqs\n", + "šŸ” Depth: 1\n", + "🌐 Loading: https://ntsa.go.ke/faqs\n", + "āœ… Saved: ntsa_comprehensive_knowledge_base\\services\\ntsa_NTSA__Frequently_Asked_Questions__NTSA_Kenya_291931bf.md\n", + "šŸ“Š Content: 819 chars\n", + "šŸ”— Found 8 new links\n", + "\n", + "šŸ“„ Processing (14/15): https://ntsa.go.ke/privacy-policy\n", + "šŸ” Depth: 1\n", + "🌐 Loading: https://ntsa.go.ke/privacy-policy\n", + "āœ… Saved: ntsa_comprehensive_knowledge_base\\services\\ntsa_NTSA__Privacy_Policy__NTSA_68960874.md\n", + "šŸ“Š Content: 1130 chars\n", + "šŸ”— Found 7 new links\n", + "\n", + "šŸ“„ Processing (15/15): https://ntsa.go.ke/\n", + "šŸ” Depth: 1\n", + "🌐 Loading: https://ntsa.go.ke/\n", + "āœ… Saved: ntsa_comprehensive_knowledge_base\\services\\ntsa_NTSA__Keep_our_roads_safe_0a8e8522.md\n", + "šŸ“Š Content: 6068 chars\n", + "šŸ”— Found 10 new links\n", + "āœ… Index file created: ntsa_comprehensive_knowledge_base\\INDEX.md\n", + "āœ… Metadata saved to ntsa_comprehensive_knowledge_base\\metadata\\comprehensive_metadata.json\n", + "\n", + "šŸŽ‰ Comprehensive scraping completed!\n", + "šŸ“Š Total pages scraped: 15\n", + "āŒ Failed pages: 0\n", + "šŸ“ Output directory: c:\\Users\\Joshua\\OneDrive\\Desktop\\Projects\\AI\\Andela - Gen AI Learning\\llm_engineering\\week5\\community-contributions\\NTSA_knowledge_base_and_chatbot\\ntsa_comprehensive_knowledge_base\n", + "šŸ”š Driver closed\n", + "\n", + "āœ… Comprehensive scraping completed!\n", + "šŸ“Š Total pages scraped: 15\n", + "\n", + "šŸ“‹ Pages by category:\n", + " - About: 2\n", + " - Careers: 1\n", + " - News: 4\n", + " - Services: 7\n", + " - Tenders: 1\n", + "\n", + "šŸ“ Updated knowledge base directory: ntsa_comprehensive_knowledge_base\n" + ] + } + ], "source": [ "# Use the comprehensive scraper for better content extraction\n", "print(\"šŸš€ Starting comprehensive NTSA scraping with Selenium...\")\n", diff --git a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/INDEX.md b/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/INDEX.md index 6a51c35..83b9b61 100644 --- a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/INDEX.md +++ b/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/INDEX.md @@ -1,6 +1,6 @@ # NTSA Knowledge Base Index -**Generated:** 2025-10-24 05:34:52 +**Generated:** 2025-10-24 07:24:42 **Total Pages:** 15 ## Services @@ -42,7 +42,7 @@ ## About -- [NTSA | NTSA | About Us](ntsa_comprehensive_knowledge_base\about\ntsa_NTSA__NTSA__About_Us_05bb6415.md) +- [NTSA | About Us](ntsa_comprehensive_knowledge_base\about\ntsa_NTSA__About_Us_05bb6415.md) - URL: https://ntsa.go.ke/about - Content: 1422 chars - Depth: 0 diff --git a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/about/ntsa_NTSA__About_Us_-_Who_We_Are_47583408.md b/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/about/ntsa_NTSA__About_Us_-_Who_We_Are_47583408.md index 00839c5..97064b4 100644 --- a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/about/ntsa_NTSA__About_Us_-_Who_We_Are_47583408.md +++ b/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/about/ntsa_NTSA__About_Us_-_Who_We_Are_47583408.md @@ -1,7 +1,7 @@ # NTSA | About Us - Who We Are **URL:** https://ntsa.go.ke/about/who-we-are -**Scraped:** 2025-10-24T05:34:27.946216 +**Scraped:** 2025-10-24T07:24:13.128350 **Content Length:** 2204 characters --- diff --git a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/careers/ntsa_Career_Opportunities__NTSA_3e462d97.md b/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/careers/ntsa_Career_Opportunities__NTSA_3e462d97.md index 3194a3c..0d68e68 100644 --- a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/careers/ntsa_Career_Opportunities__NTSA_3e462d97.md +++ b/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/careers/ntsa_Career_Opportunities__NTSA_3e462d97.md @@ -1,7 +1,7 @@ # Career Opportunities | NTSA **URL:** https://ntsa.go.ke/careers -**Scraped:** 2025-10-24T05:34:32.578853 +**Scraped:** 2025-10-24T07:24:18.790660 **Content Length:** 477 characters --- diff --git a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/metadata/comprehensive_metadata.json b/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/metadata/comprehensive_metadata.json index 609ec5b..2db9859 100644 --- a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/metadata/comprehensive_metadata.json +++ b/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/metadata/comprehensive_metadata.json @@ -3,7 +3,7 @@ "base_url": "https://ntsa.go.ke", "total_pages_scraped": 15, "failed_pages": 0, - "scraping_timestamp": "2025-10-24T05:34:52.991790", + "scraping_timestamp": "2025-10-24T07:24:42.107607", "output_directory": "ntsa_comprehensive_knowledge_base" }, "scraped_pages": [ @@ -17,8 +17,8 @@ }, { "url": "https://ntsa.go.ke/about", - "title": "NTSA | NTSA | About Us", - "file_path": "ntsa_comprehensive_knowledge_base\\about\\ntsa_NTSA__NTSA__About_Us_05bb6415.md", + "title": "NTSA | About Us", + "file_path": "ntsa_comprehensive_knowledge_base\\about\\ntsa_NTSA__About_Us_05bb6415.md", "category": "about", "content_length": 1422, "depth": 0 diff --git a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/news/ntsa_NTSA__8th_UN_Global_Road_Safety_Week_Concludes_wit_9636f22e.md b/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/news/ntsa_NTSA__8th_UN_Global_Road_Safety_Week_Concludes_wit_9636f22e.md index 651cc3a..c0d8648 100644 --- a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/news/ntsa_NTSA__8th_UN_Global_Road_Safety_Week_Concludes_wit_9636f22e.md +++ b/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/news/ntsa_NTSA__8th_UN_Global_Road_Safety_Week_Concludes_wit_9636f22e.md @@ -1,7 +1,7 @@ # NTSA | 8th UN Global Road Safety Week Concludes with Nationwide Activities | NTSA Kenya **URL:** https://ntsa.go.ke/news/8th-un-global-road-safety-week-concludes-with-nationwide-activities -**Scraped:** 2025-10-24T05:34:23.386582 +**Scraped:** 2025-10-24T07:24:08.503078 **Content Length:** 1494 characters --- diff --git a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/news/ntsa_NTSA__Media_Center_-_News__Updates_e765915c.md b/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/news/ntsa_NTSA__Media_Center_-_News__Updates_e765915c.md index 68b877e..d4d2d29 100644 --- a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/news/ntsa_NTSA__Media_Center_-_News__Updates_e765915c.md +++ b/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/news/ntsa_NTSA__Media_Center_-_News__Updates_e765915c.md @@ -1,7 +1,7 @@ # NTSA | Media Center - News & Updates **URL:** https://ntsa.go.ke/news -**Scraped:** 2025-10-24T05:34:04.407247 +**Scraped:** 2025-10-24T07:23:48.561059 **Content Length:** 2481 characters --- diff --git a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/news/ntsa_NTSA__NTSA_Launches_New_Road_Safety_Campaign__NTSA_63481444.md b/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/news/ntsa_NTSA__NTSA_Launches_New_Road_Safety_Campaign__NTSA_63481444.md index 9e01daf..f65c0c2 100644 --- a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/news/ntsa_NTSA__NTSA_Launches_New_Road_Safety_Campaign__NTSA_63481444.md +++ b/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/news/ntsa_NTSA__NTSA_Launches_New_Road_Safety_Campaign__NTSA_63481444.md @@ -1,7 +1,7 @@ # NTSA | NTSA Launches New Road Safety Campaign | NTSA Kenya **URL:** https://ntsa.go.ke/news/ntsa-launches-new-road-safety-campaign -**Scraped:** 2025-10-24T05:34:18.816453 +**Scraped:** 2025-10-24T07:24:03.599976 **Content Length:** 1113 characters --- diff --git a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/news/ntsa_NTSA__New_Digital_Licensing_System_Goes_Live__NTSA_50d5938e.md b/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/news/ntsa_NTSA__New_Digital_Licensing_System_Goes_Live__NTSA_50d5938e.md index f2d9c79..5210494 100644 --- a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/news/ntsa_NTSA__New_Digital_Licensing_System_Goes_Live__NTSA_50d5938e.md +++ b/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/news/ntsa_NTSA__New_Digital_Licensing_System_Goes_Live__NTSA_50d5938e.md @@ -1,7 +1,7 @@ # NTSA | New Digital Licensing System Goes Live | NTSA Kenya **URL:** https://ntsa.go.ke/news/new-digital-licensing-system-goes-live -**Scraped:** 2025-10-24T05:34:14.170148 +**Scraped:** 2025-10-24T07:23:58.993952 **Content Length:** 1003 characters --- diff --git a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/raw_html/Career_Opportunities__NTSA_3e462d97.html b/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/raw_html/Career_Opportunities__NTSA_3e462d97.html index e2911c3..7c79e42 100644 --- a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/raw_html/Career_Opportunities__NTSA_3e462d97.html +++ b/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/raw_html/Career_Opportunities__NTSA_3e462d97.html @@ -1,7 +1,7 @@ - + Career Opportunities | NTSA diff --git a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/raw_html/NTSA__8th_UN_Global_Road_Safety_Week_Concludes_wit_9636f22e.html b/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/raw_html/NTSA__8th_UN_Global_Road_Safety_Week_Concludes_wit_9636f22e.html index c5775ae..ff10f00 100644 --- a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/raw_html/NTSA__8th_UN_Global_Road_Safety_Week_Concludes_wit_9636f22e.html +++ b/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/raw_html/NTSA__8th_UN_Global_Road_Safety_Week_Concludes_wit_9636f22e.html @@ -1,7 +1,7 @@ - + NTSA | 8th UN Global Road Safety Week Concludes with Nationwide Activities | NTSA Kenya diff --git a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/raw_html/NTSA__About_Us_-_Who_We_Are_47583408.html b/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/raw_html/NTSA__About_Us_-_Who_We_Are_47583408.html index 070a246..abcdb15 100644 --- a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/raw_html/NTSA__About_Us_-_Who_We_Are_47583408.html +++ b/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/raw_html/NTSA__About_Us_-_Who_We_Are_47583408.html @@ -1,7 +1,7 @@ - + NTSA | About Us - Who We Are diff --git a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/raw_html/NTSA__Contact_Us_7bdb748a.html b/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/raw_html/NTSA__Contact_Us_7bdb748a.html index ea5cfc2..6cb120e 100644 --- a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/raw_html/NTSA__Contact_Us_7bdb748a.html +++ b/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/raw_html/NTSA__Contact_Us_7bdb748a.html @@ -1,7 +1,7 @@ - + NTSA | Contact Us diff --git a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/raw_html/NTSA__Frequently_Asked_Questions__NTSA_Kenya_291931bf.html b/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/raw_html/NTSA__Frequently_Asked_Questions__NTSA_Kenya_291931bf.html index 228db77..a023d0c 100644 --- a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/raw_html/NTSA__Frequently_Asked_Questions__NTSA_Kenya_291931bf.html +++ b/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/raw_html/NTSA__Frequently_Asked_Questions__NTSA_Kenya_291931bf.html @@ -1,7 +1,7 @@ - + NTSA | Frequently Asked Questions | NTSA Kenya diff --git a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/raw_html/NTSA__Keep_our_roads_safe_0a8e8522.html b/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/raw_html/NTSA__Keep_our_roads_safe_0a8e8522.html index e05448a..2757778 100644 --- a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/raw_html/NTSA__Keep_our_roads_safe_0a8e8522.html +++ b/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/raw_html/NTSA__Keep_our_roads_safe_0a8e8522.html @@ -1,7 +1,7 @@ - + NTSA | Keep our roads safe @@ -32,7 +32,7 @@ 0 0.433 0.567 0 0 0 0.475 0.525 0 0 0 0 0 1 0">
NTSA Logo
NTSA Logo
Home
Tenders
Contact Us
Customer Feedback
Inter-Agency Road Safety Conference

Inter-Agency Road Safety Conference graced by CS Ministry of Roads and Transport Davis Chirchir

We care about keeping you safe on the roads

The National Transport and Safety Authority continually improves accessibility and safety of Kenya's road transport system for all.

TUVUKE SALAMA - Safe Crossings, Safer Children

Together with our partners, we are championing for safer school crossing zones to save our children on the roads.

Quick Search

Find a Service

Use the quick search to find information or services instantly.

Welcome to The New and Improved NTSA Online Services

Access all NTSA services through your eCitizen account—everything you need in one place with one account. All the TIMS services and many more are available in our new and simple-to-use platform.

NTSA Dashboard Preview
Live Portal
30+ Services
Online Services

Discover All NTSA Online Services

With over 30 services available online, explore what you can do on the new online portal.

News & Updates

Latest News & Updates

Stay informed with the latest announcements, initiatives, and updates from NTSA

View All News
Kenya Recognized for Technological Advancement and Public Service Excellence at APSCA Awards
Oct 13, 2025

Kenya Recognized for Technological Advancement and Public Service Excellence at APSCA Awards

Kenya’s innovation in public service has earned continental acclaim at the APSCA Awards, with NTSA recognized for leading the nation’s digital transformation journey toward smarter, paperless governance.

Read Full Story
LIST OF APPROVED MOTOR VEHICLE BODY BUILDERS, CONFORMITY ASSESSORS AND SPEED LIMITERS SUPPLIERS IN KENYA
Sep 01, 2025

LIST OF APPROVED MOTOR VEHICLE BODY BUILDERS, CONFORMITY ASSESSORS AND SPEED LIMITERS SUPPLIERS IN KENYA

LIST OF APPROVED MOTOR VEHICLE BODY BUILDERS, CONFORMITY ASSESSORS AND SPEED LIMITERS SUPPLIERS IN KENYA

Read Full Story
Operation Watoto Wafike Salama – Free Motor Vehicle Inspection Clinics
Aug 20, 2025

Operation Watoto Wafike Salama – Free Motor Vehicle Inspection Clinics

NTSA is offering free motor vehicle inspection clinics for all school transport vehicles across its centres. The initiative aims to enhance the safety of children as schools reopen.

Read Full Story
Road Safety

Drive Safe, Arrive Safe

Always Wear Your Seatbelt

Seatbelts reduce the risk of fatal injury by 45%. Buckle up every time.

+Beware of fraudsters impersonating NTSA on platforms like TikTok to solicit money and personal details.

Read Full Story
8th UN Global Road Safety Week Concludes with Nationwide Activities
May 15, 2025

8th UN Global Road Safety Week Concludes with Nationwide Activities

NTSA wraps up a successful week of road safety awareness, engaging partners and communities across Kenya to promote the protection of vulnerable road users.

Read Full Story
NTSA and Vihiga County Partner to Promote Road Safety During UN Global Road Safety Week 2025
May 13, 2025

NTSA and Vihiga County Partner to Promote Road Safety During UN Global Road Safety Week 2025

NTSA and Vihiga County Government #CTSC sensitized pedestrians, boda boda riders, and drivers in Mbale town as part of #UNGRSW2025.

Read Full Story
NTSA Launches New Road Safety Campaign
Dec 22, 2024

NTSA Launches New Road Safety Campaign

NTSA launches a comprehensive six-month road safety campaign to reduce accidents and promote safer driving practices.

Read Full Story
NTSA Partners with County Governments
May 24, 2023

NTSA Partners with County Governments

NTSA forms strategic partnerships with county governments to enhance road safety and transport management.

Read Full Story
New Digital Licensing System Goes Live
Dec 28, 2020

New Digital Licensing System Goes Live

NTSA introduces a new digital licensing system to streamline services and improve efficiency.

Read Full Story
Kenya Recognized for Technological Advancement and Public Service Excellence at APSCA Awards
Oct 13, 2025

Kenya Recognized for Technological Advancement and Public Service Excellence at APSCA Awards

Kenya’s innovation in public service has earned continental acclaim at the APSCA Awards, with NTSA recognized for leading the nation’s digital transformation journey toward smarter, paperless governance.

Read Full Story
LIST OF APPROVED MOTOR VEHICLE BODY BUILDERS, CONFORMITY ASSESSORS AND SPEED LIMITERS SUPPLIERS IN KENYA
Sep 01, 2025

LIST OF APPROVED MOTOR VEHICLE BODY BUILDERS, CONFORMITY ASSESSORS AND SPEED LIMITERS SUPPLIERS IN KENYA

LIST OF APPROVED MOTOR VEHICLE BODY BUILDERS, CONFORMITY ASSESSORS AND SPEED LIMITERS SUPPLIERS IN KENYA

Read Full Story
Operation Watoto Wafike Salama – Free Motor Vehicle Inspection Clinics
Aug 20, 2025

Operation Watoto Wafike Salama – Free Motor Vehicle Inspection Clinics

NTSA is offering free motor vehicle inspection clinics for all school transport vehicles across its centres. The initiative aims to enhance the safety of children as schools reopen.

Read Full Story
Road Safety

Drive Safe, Arrive Safe

Always Wear Your Seatbelt

Seatbelts reduce the risk of fatal injury by 45%. Buckle up every time.

\ No newline at end of file diff --git a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/raw_html/NTSA__Keep_our_roads_safe_f13d765c.html b/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/raw_html/NTSA__Keep_our_roads_safe_f13d765c.html index 66c12d1..e76a30e 100644 --- a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/raw_html/NTSA__Keep_our_roads_safe_f13d765c.html +++ b/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/raw_html/NTSA__Keep_our_roads_safe_f13d765c.html @@ -1,7 +1,7 @@ - + NTSA | Keep our roads safe @@ -32,7 +32,7 @@ 0 0.433 0.567 0 0 0 0.475 0.525 0 0 0 0 0 1 0">
NTSA Logo
NTSA Logo
Home
Tenders
Contact Us
Customer Feedback
Inter-Agency Road Safety Conference

Inter-Agency Road Safety Conference graced by CS Ministry of Roads and Transport Davis Chirchir

We care about keeping you safe on the roads

The National Transport and Safety Authority continually improves accessibility and safety of Kenya's road transport system for all.

TUVUKE SALAMA - Safe Crossings, Safer Children

Together with our partners, we are championing for safer school crossing zones to save our children on the roads.

Quick Search

Find a Service

Use the quick search to find information or services instantly.

Welcome to The New and Improved NTSA Online Services

Access all NTSA services through your eCitizen account—everything you need in one place with one account. All the TIMS services and many more are available in our new and simple-to-use platform.

NTSA Dashboard Preview
Live Portal
30+ Services
Online Services

Discover All NTSA Online Services

With over 30 services available online, explore what you can do on the new online portal.

News & Updates

Latest News & Updates

Stay informed with the latest announcements, initiatives, and updates from NTSA

View All News
Kenya Recognized for Technological Advancement and Public Service Excellence at APSCA Awards
Oct 13, 2025

Kenya Recognized for Technological Advancement and Public Service Excellence at APSCA Awards

Kenya’s innovation in public service has earned continental acclaim at the APSCA Awards, with NTSA recognized for leading the nation’s digital transformation journey toward smarter, paperless governance.

Read Full Story
LIST OF APPROVED MOTOR VEHICLE BODY BUILDERS, CONFORMITY ASSESSORS AND SPEED LIMITERS SUPPLIERS IN KENYA
Sep 01, 2025

LIST OF APPROVED MOTOR VEHICLE BODY BUILDERS, CONFORMITY ASSESSORS AND SPEED LIMITERS SUPPLIERS IN KENYA

LIST OF APPROVED MOTOR VEHICLE BODY BUILDERS, CONFORMITY ASSESSORS AND SPEED LIMITERS SUPPLIERS IN KENYA

Read Full Story
Operation Watoto Wafike Salama – Free Motor Vehicle Inspection Clinics
Aug 20, 2025

Operation Watoto Wafike Salama – Free Motor Vehicle Inspection Clinics

NTSA is offering free motor vehicle inspection clinics for all school transport vehicles across its centres. The initiative aims to enhance the safety of children as schools reopen.

Read Full Story
Road Safety

Drive Safe, Arrive Safe

Always Wear Your Seatbelt

Seatbelts reduce the risk of fatal injury by 45%. Buckle up every time.

+Beware of fraudsters impersonating NTSA on platforms like TikTok to solicit money and personal details.

Read Full Story
8th UN Global Road Safety Week Concludes with Nationwide Activities
May 15, 2025

8th UN Global Road Safety Week Concludes with Nationwide Activities

NTSA wraps up a successful week of road safety awareness, engaging partners and communities across Kenya to promote the protection of vulnerable road users.

Read Full Story
NTSA and Vihiga County Partner to Promote Road Safety During UN Global Road Safety Week 2025
May 13, 2025

NTSA and Vihiga County Partner to Promote Road Safety During UN Global Road Safety Week 2025

NTSA and Vihiga County Government #CTSC sensitized pedestrians, boda boda riders, and drivers in Mbale town as part of #UNGRSW2025.

Read Full Story
NTSA Launches New Road Safety Campaign
Dec 22, 2024

NTSA Launches New Road Safety Campaign

NTSA launches a comprehensive six-month road safety campaign to reduce accidents and promote safer driving practices.

Read Full Story
NTSA Partners with County Governments
May 24, 2023

NTSA Partners with County Governments

NTSA forms strategic partnerships with county governments to enhance road safety and transport management.

Read Full Story
New Digital Licensing System Goes Live
Dec 28, 2020

New Digital Licensing System Goes Live

NTSA introduces a new digital licensing system to streamline services and improve efficiency.

Read Full Story
Kenya Recognized for Technological Advancement and Public Service Excellence at APSCA Awards
Oct 13, 2025

Kenya Recognized for Technological Advancement and Public Service Excellence at APSCA Awards

Kenya’s innovation in public service has earned continental acclaim at the APSCA Awards, with NTSA recognized for leading the nation’s digital transformation journey toward smarter, paperless governance.

Read Full Story
LIST OF APPROVED MOTOR VEHICLE BODY BUILDERS, CONFORMITY ASSESSORS AND SPEED LIMITERS SUPPLIERS IN KENYA
Sep 01, 2025

LIST OF APPROVED MOTOR VEHICLE BODY BUILDERS, CONFORMITY ASSESSORS AND SPEED LIMITERS SUPPLIERS IN KENYA

LIST OF APPROVED MOTOR VEHICLE BODY BUILDERS, CONFORMITY ASSESSORS AND SPEED LIMITERS SUPPLIERS IN KENYA

Read Full Story
Operation Watoto Wafike Salama – Free Motor Vehicle Inspection Clinics
Aug 20, 2025

Operation Watoto Wafike Salama – Free Motor Vehicle Inspection Clinics

NTSA is offering free motor vehicle inspection clinics for all school transport vehicles across its centres. The initiative aims to enhance the safety of children as schools reopen.

Read Full Story
Road Safety

Drive Safe, Arrive Safe

Always Wear Your Seatbelt

Seatbelts reduce the risk of fatal injury by 45%. Buckle up every time.

\ No newline at end of file diff --git a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/raw_html/NTSA__Media_Center_-_News__Updates_e765915c.html b/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/raw_html/NTSA__Media_Center_-_News__Updates_e765915c.html index 922fcb9..1273d7f 100644 --- a/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/raw_html/NTSA__Media_Center_-_News__Updates_e765915c.html +++ b/week5/community-contributions/NTSA_knowledge_base_and_chatbot/ntsa_comprehensive_knowledge_base/raw_html/NTSA__Media_Center_-_News__Updates_e765915c.html @@ -1,7 +1,7 @@ - + NTSA | Media Center - News & Updates @@ -20,7 +20,7 @@ - +