Run your first vector search

This tutorial walks you through running your first Vector Search query so you can retrieve relevant smart bites from the Vector Catalog using natural language. Vector Search powers semantic retrieval for RAG, agents, and search over contracts, policies, and other unstructured documents.

What Vector Search is in Bundata

Vector Search lets you query the Vector Catalog with natural language or embeddings to get ranked smart bites. Results support RAG (retrieval-augmented generation), agent grounding, and semantic search over your document base. Each result includes metadata and source lineage so you can trace content back to the original document and run. The catalog stores vector-ready intelligence — structured output prepared for retrieval, semantic search, and AI workflows — produced by context-aware and schema-aware extraction.

Prerequisites

Step 1: Ensure the catalog has data

  1. Confirm that extraction (and optionally ingestion) has run and written to a Vector Catalog collection. You can check in the platform at Platform → Catalog (or your org’s URL).
  2. Open a collection and verify it contains smart bites (and optionally embeddings). If the collection is empty, run an extraction or ingestion workflow that targets this collection, then retry. See Vector Catalog overview.

Step 2: Open the search UI or API

  1. Platform UI: Go to Platform → Vector Search (or the search entry point in your platform). Use the search box to enter a query.
  2. API: Use the search endpoint from your app or script. Send a POST request with collection_id, query (natural language), and optional limit and metadata filters. See API reference and Vector Search overview.

Choose the collection that matches your use case (e.g. contracts, invoices, policies) so results are relevant.

Step 3: Enter a query

  1. Enter a natural-language question or statement, e.g. “What is the refund policy?”, “Which contract mentions termination for cause?”, or “Summarize the key dates in this document.”
  2. The system converts the query into an embedding (if needed) and runs semantic retrieval over the collection, returning ranked smart bites that best match the meaning of the query. See Semantic retrieval.
  3. Optionally apply metadata filters (e.g. document type, date range, source) to narrow results. See Filtering.

Step 4: Review results and source lineage

  1. Inspect the returned chunks: text, metadata, and scores (if returned).
  2. Use source lineage to trace each chunk back to the original document and extraction run. This is essential for grounded answers, citations, and audit. See Vector Catalog → Lineage.
  3. In an app or agent, you would typically pass the top N chunks to an LLM as context and include source information in the response. See First agent and Agents grounding.

What happens behind the scenes

Your query is embedded (if you send text), and the catalog is searched for the nearest vectors or matching smart bites. Results are ranked by relevance. The catalog stores vector-ready intelligence produced by extraction and enrichment, so search runs over the same document intelligence layer that feeds agents and workflows. Product overview: Product → Vector Search.

Expected output

You should see a list of chunks (smart bites) with:

  • Snippet or full text of the chunk
  • Metadata (e.g. source path, document type, page)
  • Source lineage (document ID, run ID) for citation
  • Optional relevance score

If you see no results, confirm the collection has data and that your query or filters are not too restrictive. See Vector Search best practices.

Common mistakes

  • Searching an empty or stale collection — Run ingestion and extraction first; ensure workflows keep the catalog up to date.
  • No filtering — Use metadata filters to narrow results and improve relevance (e.g. by document type or date).
  • Ignoring source lineage — Always surface source and document in the UI or agent response for trust and debugging.

Next steps