Knowledge Base Guide

AI System

Complete guide for updating SHELTR-AI Knowledge Base documents with embedding regeneration

Version 1.0.0β€’August 22, 2025

Current System Overview

The Knowledge Base is critical for chatbot instruction. When you update documents, embeddings must be regenerated for the chatbots to use the latest information. This guide covers all methods for updating documents and ensuring proper embedding regeneration.

πŸ“Š Current Knowledge Base Status

Storage Structure: Firebase Storage knowledge-base/public/ (9 markdown files)
Firestore Collection: knowledge_documents (9 document records)
Embeddings: knowledge_chunks (62+ embedding chunks for chatbot RAG)
Status: βœ… All documents loaded and operational

Available Documents (9 Total)
Current knowledge base documents
  • β€’ README.md β†’ SHELTR Platform Overview
  • β€’ blockchain.md β†’ SHELTR Blockchain Technical Documentation
  • β€’ donor-guide.md β†’ Donor User Guide
  • β€’ hacking_homelessness.md β†’ Hacking Homelessness Strategy
  • β€’ participant-guide.md β†’ Participant User Guide
  • β€’ shelter-admin-guide.md β†’ Shelter Admin Guide
  • β€’ sheltr-tokenomics.md β†’ SHELTR Tokenomics and SmartFundβ„’ Model
  • β€’ system-design.md β†’ SHELTR System Design and Architecture
  • β€’ whitepaper_final.md β†’ SHELTR White Paper
Update Methods
Three different approaches for updating documents

Method 1: Script-Based Update (Recommended)

Use for bulk updates or when you have local markdown files

  • β€’ List available documents
  • β€’ Update single document
  • β€’ Update specific document by ID
  • β€’ Update all documents from directory

Method 2: UI-Based Update

Use for individual document updates through the dashboard

  • β€’ Login as Super Admin
  • β€’ Find document to update
  • β€’ Edit content in text editor
  • β€’ Save with automatic embedding regeneration

Method 3: Direct File Replacement

Advanced users only - requires manual embedding regeneration

Embedding Regeneration Process

Why Embeddings Matter

  • β€’ Chatbots use embeddings for semantic search
  • β€’ Enables RAG (Retrieval-Augmented Generation)
  • β€’ When document content changes, old embeddings become outdated
  • β€’ New embeddings ensure chatbots have access to latest information

Automatic vs Manual Regeneration

βœ… Automatic Regeneration
  • β€’ Using the update script
  • β€’ Using UI update with file upload
  • β€’ Using the new API endpoint
❌ Manual Regeneration Needed
  • β€’ Directly editing files in Firebase Storage
  • β€’ Manually updating Firestore documents
  • β€’ Importing documents via other methods

πŸ”§ Recommended Workflow

For Regular Updates: Edit markdown files locally β†’ Run update script β†’ Verify in dashboard β†’ Test chatbot responses
For Single Document Updates: Edit specific file β†’ Update using script β†’ Check dashboard for updated chunk count
Always verify that embeddings were regenerated and chatbot responses reflect new information