Detailed Explanation
By calculating the dot product of two normalized vectors divided by the product of their magnitudes, cosine similarity isolates conceptual similarity independently of document length. In PostgreSQL pgvector, HNSW indexes find the nearest vectors by cosine distance without scanning every row, which keeps retrieval fast as the knowledge base grows.
How It Works in CustomerGPT
CustomerGPT evaluates cosine similarity on incoming customer questions to select only the top-k most relevant knowledge segments before invoking GPT-5.6.
Related Glossary Terms
Frequently Asked Questions
Deploy Grounded RAG AI for Your Support
Get started in under 2 minutes with our 14-day free trial.
Start Free Trial →