Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI Studio
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Yandex Foundation Models
    • About Yandex Foundation Models
      • Overview
        • Overview
        • Retrieval
        • WebSearch
        • Rephrasing queries
    • Quotas and limits
  • Compatibility with OpenAI
  • Access management
  • Pricing policy
  • Audit Trails events
  • Public materials
  • Release notes
  1. Concepts
  2. AI Assistant API
  3. Tools
  4. Retrieval

VectorStore

Written by
Yandex Cloud
Updated at September 18, 2025

VectorStore enables an AI assistant to search your own files, i.e., a knowledge base, for information to use in a response. Together with VectorStore, you can use a tailored paraphrase model, which rephrases user queries to improve search quality.

To enable your AI assistant to use your knowledge base:

  1. Upload the knowledge base files using the API or ML SDK.
  2. Create a search index for your files. After that, you can delete the files you uploaded if you do not need citations.
  3. Connect the search index to your assistant. You can enable citations if the search index files are not deleted.
  4. Optionally, configure a strategy for using search indexes so that the assistant would access them only when required.
  5. Optionally, enable the paraphrase model as an additional layer in your assistant.

By default, the VectorStore tool accesses the index on each user request to the assistant. The tool finds and returns relevant extracts from source files, and the model uses this information to generate a response.

AI assistants do not always need to use a search index to respond to a user’s query: the general information available to the model is often enough to answer most questions. When setting up your assistant, you can define a strategy for accessing VectorStore so that the assistant’s model would decide on its own when it should search for information in the index.

To enable your AI assistant to use VectorStore according to an access strategy, do the following:

SDK
cURL

In ML SDK, provide search index access instructions to the model in the call_strategy parameter when creating the VectorStore tool. Then, when creating your AI assistant, provide the resulting object with VectorStore in the tools parameter.

...
tool = sdk.tools.search_index(
    search_index,
    call_strategy={
        "type": "function",
        "function": {"name": "search-function-name", "instruction": "<search_usage_instructions>"},
    },
)

assistant = sdk.assistants.create(
    "yandexgpt", 
    instruction = "You are an internal corporate documentation assistant. Answer politely. If the information is not in the documents below, don't make up your answer.", 
    tools=[tool])
thread = sdk.threads.create()
...

In the API, when creating or updating an AI assistant, provide search index access instructions to the model in the tools array of the request body in the callStrategy object.

{
  ...
  "tools": [
    {
      "searchIndex": {
        "searchIndexIds": [
          "<search_index_ID>"
        ],
        "maxNumResults": "<maximum_number_of_returned_fragments>",
        "callStrategy": {
          "autoCall": {
            "instruction": "<search_usage_instructions>"
          }
        }
      }
    }
  ]
}

Where:

  • searchIndexIds: Array with IDs of search indexes the assistant will use. Currently, you can specify only one index.
  • maxNumResults: Maximum number of results a search can return.
  • instruction: Search usage instructions with guidelines for the assistant on when it should access the search index.

Search usage instructions which you provide in a strategy is essentially a prompt telling the assistant when it should access the search index. Here is an example:

"instruction": "Search through the knowledge base only when the user specifically asks you to do so."

See alsoSee also

  • Source files
  • Search indexes
  • Paraphrasing queries
  • Creating a RAG assistant with the VectorStore tool
  • WebSearch

Was the article helpful?

Previous
Overview
Next
WebSearch
© 2025 Direct Cursus Technology L.L.C.