hadith-ingestion/hadith-ingestion/scripts/verify_embeddings.sh

27 lines
862 B
Bash
Executable File

#!/bin/bash
echo "=== EMBEDDING VERIFICATION ==="
echo ""
# 1. Database check
echo "1. Checking database..."
psql -h pg.betelgeusebytes.io -U hadith_ingest -d hadith_db -t -c "
SELECT
'Total hadiths: ' || COUNT(*) ||
' | With embeddings: ' || COUNT(*) FILTER (WHERE embedding_generated = TRUE) ||
' | Missing: ' || COUNT(*) FILTER (WHERE embedding_generated = FALSE)
FROM hadiths;"
# 2. Qdrant check
echo ""
echo "2. Checking Qdrant..."
QDRANT_COUNT=$(curl -k -s https://vector.betelgeusebytes.io/collections/hadith_embeddings | jq -r '.result.points_count')
echo "Qdrant vectors: $QDRANT_COUNT"
# 3. Collection info
echo ""
echo "3. Collection details..."
curl -k -s https://vector.betelgeusebytes.io/collections/hadith_embeddings | jq '.result | {points_count, vectors_count, status, optimizer_status}'
echo ""
echo "=== VERIFICATION COMPLETE ==="