Teradata Package for LangChain Function Reference - delete_by_ids - Teradata® Package for LangChain - Look here for syntax, methods and examples for the functions included in the Teradata langchain-teradata package.

Teradata® Package for LangChain Function Reference

Deployment
VantageCloud
Edition
Enterprise
Product
Teradata® Package for LangChain
Release Number
20.00.00.01
Published
December 2025
ft:locale
en-US
ft:lastEdition
2025-12-19
dita:id
Langchain-Teradata_FxRef_Lake
Product Category
Teradata Vantage
libs.teradata.langchain_teradata.TeradataVectorStore.delete_by_ids = delete_by_ids(self, filename: str, ids: list, **kwargs)
DESCRIPTION:
    Deletes specific chunks from a file in the vector store.
    Note: * Only applicable for file-based Vector Store.
          * "ids" refer to the list of 'TD_ID' that can be found
            by calling the "get_indexes_embeddings" method.
 
PARAMETERS:
    filename:
        Required Argument.
        Specifies the name of the file from which chunks are to be deleted.
        Types: str
 
    ids:
        Required Argument.
        Specifies the list of chunk IDs to be deleted from the specified file.
        Types: list of int or str
 
RETURNS:
    None
 
RAISES:
    TeradataMlException.
 
EXAMPLES:
    # Load necessary imports.
    >>> from langchain_teradata import TeradataVectorStore
 
    # Create an instance of an 'file-based' vector store by passing path
    # to a PDF file in "documents".
    >>> vs = TeradataVectorStore.from_documents(name = "vs_example_1",
                                                documents = "SQL_Fundamentals.pdf",
                                                embedding = "amazon.titan-embed-text-v1")
 
    # Delete specific chunks from the file "SQL_Fundamentals.pdf" in the vector store.
    >>> vs.delete_by_ids(filename="SQL_Fundamentals.pdf", ids=[1, 2, 3])