Vector Indexing Guide
Learn how to manage document embeddings and vector operations
Vector Indexing with Vedaya
This guide explains how to use Vedaya’s Vector Indexing API to manage document embeddings, retrieve statistics, and perform vector operations.
Overview
Vedaya’s Vector Indexing system allows you to:
- Generate and store vector embeddings for your documents
- Retrieve statistics about indexed data
- Get embeddings for specific files
- Generate vectors locally
- Download original documents
Getting Statistics
To get statistics about your indexed data:
The response includes information such as:
Listing Indexed Documents
To retrieve a list of all your indexed documents:
The response includes metadata about each document:
Getting Sample Chunks
To retrieve sample chunks with their vector embeddings:
Getting File Embeddings
To retrieve embeddings for a specific file:
The response includes chunked text and corresponding vector embeddings:
Generating Local Vectors
For simple use cases or testing, you can generate vectors locally:
This starts an asynchronous process to generate vectors locally. You can check the status of this process:
Downloading Documents
To download the original document:
Understanding Embeddings
Vector embeddings are numerical representations of text that capture semantic meaning. In Vedaya:
- Each document is split into chunks
- Each chunk is converted to a vector using an embedding model
- The default embedding dimension is typically 768 or 1536, depending on the model
- Similar text chunks have similar vector representations
- These vectors enable semantic search, clustering, and other NLP operations
Working with Vector Similarity
When you query the knowledge base, Vedaya uses vector similarity to find relevant chunks:
- The query text is converted to a vector using the same embedding model
- Vector similarity (usually cosine similarity) is computed between query and chunks
- Chunks with the highest similarity scores are returned
- This enables semantic search rather than just keyword matching
Best Practices
- Embedding Models: Use consistent embedding models across your workflow
- Chunk Size: Optimal chunk size depends on your use case; experiment to find the best setting
- Monitoring: Regularly check the vector indexing stats to understand your data growth
- Local vs. Cloud: Use local vector generation for testing, but prefer cloud-based embeddings for production
- Performance: For large document collections, consider batch processing to optimize performance
For more details on available endpoints and parameters, see the Vector Indexing API Reference.