Lesson 2

Working with Vector Stores

This lesson covers the management of vector stores in Bland.

LEARNING OBJECTIVES
  • Create and update vector stores with POST operations

  • List vector stores and their details using GET operations

  • Delete vector stores with POST operations

TABLE OF CONTENTS

    What is a Vector Store?

    A vector store is data converted to numbers so that a machine (like our Agent) can read it. In the scheme of Bland, you can think of Vector Stores as ‘guidebooks’  or ‘answer keys’  that our Agents can use to look up information.   

    Why Are Vector Stores Useful?

    Why Are Vector Stores Useful?

    Why Are Vector Stores Useful?

    So why bother with a vector store when you could just tell your Agent what to do in a prompt?  

    If you remember from our prompting guide prompts do best when they can be kept under 2,000 words.  So naturally, vector stores come in handy when you want your agent to have access to more information.

    Quick Example

    Maybe your Agent is doing some sales calls to prospective clients and it’d be handy for it to have access to all of the features, benefits, and pricing options of your current product.   

    Passing that info via a Vector store is a great way to make sure you Agent can handle those kinds of questions. 

    Note: The agent will automatically search the vector store for you (if it determines that it needs more information).

    Using Vector Stores With the Bland API 

    You can perform five actions using vector stores with the Bland API

    1

    Create vector stores

    2

    Update existing vector stores

    3

    List all vector stores

    4

    List vector store details

    5

    Delete vector store

    Useful fields when dealing with Vectors

    Name

    This is for your organization, name vectors in simple, but descriptive ways

    Description

    The description of the vector store is how our Agent will determine whether or not to look for info inside it.  This can be a longer description of the contents of the store, or what terms to use to search for vectors in the store. This is visible to the AI, so making it descriptive can help the AI understand when to use it or not.

    Text

    This is the actual ‘text’ data that you want to store.  Your documents, notes, files etc. as long as they’re translated to plain text before storing.  

    With these three fields, you’re ready to start creating and manipulating vector stores.

    API: Creating a Vector Store 

    For Developers: Read the API Docs:  Link

    To create a vector store, we will be using all 3 of the main vector fields into a POST request.

    Examples of Useful Vector Stores 

    [ potential section ] 

    API: Updating a Vector Store 

    Updating a Vector store will require the same fields as creating one, with the addition of the vector_id.

    Fields:

    • vector_id

    • name

    • description

    • text

    API: Deleting a Vector Store 

    Deleting a Vector store will require the Vector_ID and an authorized DELETE request. 

    Fields:

    • vector_id

    Adding Your Vector Store to Your Agent

    To make your vector store accessible to your Agent, you’ll need to pass it as a “tool” when making your phone call API request. 

    Note: You must use the standard/call endpoint to add tools. Include the “tools” argument in your JSON body. 

    ` "tools": [

        "KB-55e64dae-1585-4632-ae97-c909c288c6bc"

    ]

    Table of contents
      Scroll to top