import chromadb from chromadb.config import Settings import sys import os KB_PATH = "data/knowledge_base" if not os.path.exists(KB_PATH): print(f"❌ Path not found: {KB_PATH}") sys.exit(1) try: print(f"📂 Checking {KB_PATH}...") client = chromadb.PersistentClient(path=KB_PATH) col = client.get_collection("medical_knowledge") count = col.count() print(f"✅ Collection found: {col.name}") print(f"📊 Documents: {count}") if count == 0: print("❌ Collection is EMPTY!") sys.exit(1) # Check if vectors exist res = col.peek() if not res['embeddings']: print("❌ No embeddings found!") else: print("✅ Embeddings present.") except Exception as e: print(f"❌ Error: {e}") sys.exit(1)