Searching Vectors
Learn how to search vectors for semantic similarity and retrieve relevant results
Searching Vectors
Vector search enables you to find relevant information from your vector stores using semantic similarity. Unlike traditional keyword search, vector search understands meaning and context, making it ideal for finding related information even when exact keywords don't match.
What is Vector Search?
Vector search uses semantic similarity to find relevant information:
- Semantic Understanding: Understands meaning and context, not just keywords
- Similarity Matching: Finds similar content based on vector distance
- Relevance Scoring: Returns results with similarity scores
- Filtered Results: Filter results by data source (Objects, Files, Reports)
How Vector Search Works
Search Process
- Query Input: Enter your search query as natural language
- Query Embedding: Your query is converted to an embedding using the same model as the vector
- Similarity Calculation: System calculates similarity between query embedding and stored embeddings
- Result Retrieval: Returns top-K most similar results above the similarity threshold
- Result Display: Shows results with content, similarity scores, and metadata
Similarity Scoring
Results are scored based on similarity:
- Score Range: 0.0 to 1.0 (0% to 100%)
- Higher Scores: Indicate more similar/relevant results
- Threshold Filtering: Only results above the similarity threshold are returned
- Cosine Similarity: Uses cosine distance to measure similarity
Searching a Vector
Access Vector Search
To search a vector:
- Navigate to the Vectors page
- Find the vector in the list
- Click the "Search" icon next to the vector
- The vector search interface opens
Configure Search Parameters
Before searching, configure search parameters:
Set Similarity Threshold
Set the minimum similarity score for results.
Field: Similarity Threshold
Range: 0.0 to 1.0
Default: 0.3 (30%)
How to set:
- Use the slider to adjust threshold
- Or enter a value directly in the input field
- Lower threshold = more results (less strict)
- Higher threshold = fewer results (more strict)
Recommendation: Start with 0.3 and adjust based on result quality.
Set Top K
Set the maximum number of results to return.
Field: Top K
Range: 1 to 100
Default: 5
How to set:
- Enter the number of results you want
- Higher values return more results but may include less relevant ones
- Lower values return fewer but more relevant results
Recommendation: Start with 5-10 results and adjust based on needs.
Filter by Data Sources (Optional)
Filter results to specific data sources:
For Object Vectors:
- Objects Filter: Select specific Objects to search within
- How to select: Use multi-select dropdown to choose Objects
- Use Case: Search within specific Objects only
For File Vectors:
- Files Filter: Select specific files to search within
- How to select: Use multi-select dropdown to choose files
- Use Case: Search within specific documents only
For Report Vectors:
- Reports Filter: Select specific reports to search within
- How to select: Use multi-select dropdown to choose reports
- Use Case: Search within specific report configurations only
Note: Filters are optional. If no filters are selected, all data sources in the vector are searched.
Enter Search Query
Enter your search query:
Field: Search Query
How to enter:
- Type your query in natural language
- Use descriptive phrases that capture what you're looking for
- Examples:
- "customer orders from last month"
- "product pricing information"
- "workflow for order processing"
Query Processing:
- Query is automatically debounced (waits 500ms after typing stops)
- Query is converted to embedding using the vector's embedding model
- Search executes automatically when query is ready
Execute Search
Click the "Search" button or press Enter to execute the search.
Search Execution:
- Query embedding is generated
- Similarity search is performed
- Results are filtered by threshold and top-K
- Results are displayed in a table
Understanding Search Results
Result Table
Search results are displayed in a table with three columns:
Content Column
Shows the actual content from the data source:
- Text Content: The text that matched your query
- Scrollable: Long content can be scrolled within the cell
- Source Context: Content comes from the original data source
Score Column
Shows the similarity score:
- Percentage: Displayed as percentage (0% to 100%)
- Higher = Better: Higher scores indicate more relevant results
- Threshold: Only results above threshold are shown
Metadata Column
Shows metadata about the result:
- Source Information: Which data source the result came from
- Source ID: ID of the source (Object ID, File ID, etc.)
- Additional Metadata: Other relevant information
- JSON Format: Metadata displayed as formatted JSON
Result Information
Above the results table:
- Result Count: Number of results found
- Filtered Results: Only results above similarity threshold are shown
- Sorted by Score: Results sorted by similarity score (highest first)
Search Best Practices
Query Formulation
- Natural Language: Use natural language queries, not keywords
- Descriptive: Be descriptive about what you're looking for
- Context-Aware: Include context in your query
- Examples:
- Good: "customer orders with status pending"
- Less Effective: "orders pending"
Similarity Threshold
- Start Low: Start with lower threshold (0.3) to see more results
- Adjust Up: Increase threshold if too many irrelevant results
- Adjust Down: Decrease threshold if missing relevant results
- Domain-Specific: Threshold may vary by domain and data type
Top K Configuration
- Start Moderate: Start with 5-10 results
- Increase if Needed: Increase if you need more results
- Decrease for Precision: Decrease for more focused results
- Consider Use Case: Adjust based on your specific use case
Filtering
- Use Filters: Use data source filters to narrow search scope
- Specific Searches: Filter to specific Objects/Files/Reports when needed
- Broad Searches: Remove filters for broader searches
- Performance: Filtering can improve search performance
Use Cases
Finding Related Data
Search for data related to a specific topic:
- Example: "customer contact information"
- Use Case: Find all customer records and related data
- Result: Returns relevant customer records with contact details
Semantic Discovery
Discover information using meaning:
- Example: "order processing workflows"
- Use Case: Find workflows related to order processing
- Result: Returns workflows that handle orders, even if they don't contain exact keywords
Context Retrieval for AI
Retrieve context for AI agents:
- Example: "product specifications"
- Use Case: Provide context to AI agent about products
- Result: Returns relevant product information for AI agent context
Related Introduction
- Vectors Introduction - Overview of vectors
- Creating Vectors - Learn how to create vectors
- Using Vectors with AI Agents - Understand how vectors integrate with AI agents