• MATCHES
  • CONTEXT
  • RELEVANCE
  • HUMAN

How to run similarity searches with your AI

Connect Redis Vector to your AI client to perform high-speed vector lookups. Once connected, your agent can query your embedding database to find related data points.

Ask AI about this page

Short answer

How do I run similarity searches with my AI?

Your AI client uses the search_vectors tool to perform K-Nearest Neighbor (KNN) searches. It takes an embedding you provide and returns the most mathematically similar vectors from your Redis database. You get a list of the closest neighbors immediately.

The search results

What you get from a search

Running a similarity search produces specific data points based on your vector space.

MATCHES

Nearest neighbor results

The AI identifies the vectors with the smallest distance to your query. You receive the specific data attached to those matching embeddings.

CONTEXT

Relevant data retrieval

Your agent pulls the metadata associated with the found vectors. This allows your AI to answer questions using the context of the most similar items.

RELEVANCE

Similarity scores

The search returns how closely each neighbor matches your input. You can use these scores to filter out weak matches.

HUMAN

Manual review needed

You must decide if the mathematical similarity actually meets your semantic needs. The AI provides the closest matches, but you verify the quality.

The workflow

What your AI does when the search request arrives.

The AI handles the heavy lifting of communicating with your vector database.

  1. Receive query

    Your agent receives a request to find data similar to a specific concept or vector.

    search_vectors
  2. Execute KNN

    The AI calls the search tool to run a K-Nearest Neighbor algorithm against your Redis instance.

    search_vectors
  3. Fetch neighbors

    The tool identifies the closest vectors and pulls their associated metadata.

    search_vectors
  4. Present results

    Your agent organizes the retrieved neighbors and presents them to you in your chat interface.

    search_vectors

Try it

Copy these to start.

Use these prompts to trigger your first similarity search.

Starting points

These are starting points. You should replace the specific topics or vector IDs with your own data.

Redis Vector Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_zP1SqypHeKOFu0yRPw2yTUOrfnlmdOQBZrAWkuF4/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat — Redis Vector capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "redis-vector-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_zP1SqypHeKOFu0yRPw2yTUOrfnlmdOQBZrAWkuF4/mcp"
    }
  }
}
Copy into chat04
  • Find the top 5 most similar vectors to this embedding: [insert vector]

  • Search for neighbors in Redis that are closest to the concept of 'customer churn'.

  • Run a similarity search to find documents related to the following text: [insert text]

  • Using the search_vectors tool, find the nearest neighbors for the vector ID 'user_123_embedding'.

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect Redis Vector once, then ask.

Just follow the link to connect your Redis instance. Your credentials stay encrypted, and you can start searching immediately through your preferred AI client.

Connect Redis Vector to your AI

FAQ

How this task behaves

  • 01

    Can the AI create new vectors in Redis?

    No. This connector only provides the ability to search existing vectors using the search_vectors tool.

  • 02

    Does the AI delete my existing embeddings?

    No. The AI cannot delete or modify your data; it only performs read-only similarity searches.

  • 03

    How many neighbors will it find?

    The number of neighbors depends on the K value you specify in your prompt or request.

  • 04

    Can I search by text instead of a vector?

    The tool performs searches based on embeddings. You must provide the vector or have your AI client generate the embedding first.

  • 05

    Does the AI decide which neighbors are 'best'?

    The AI uses mathematical distance to find the nearest neighbors, but you must decide if those matches are useful for your specific task.

  • More questions about Redis Vector? The Connector page answers them. See everything the Redis Vector Connector can do

Connect Redis Vector to Claude, Cursor, ChatGPT & more