5.4 Remove an Ingested Document

Use model delete to remove vectors associated with a previously ingested document.

model delete removes the document chunks, vector embeddings, and associated metadata from the specified vector table. It does not delete the original file from the local file system.

Syntax

MODEL DELETE -file-path <file>
-table <vector-table> [-debug] [-verbose]

The source file must still exist and must be a regular file. SQLcl calculates the content hash of the file and uses it to identify and remove the corresponding document data from the specified vector table.

Example

MODEL DELETE -file-path "./knowledge-base/guide.pdf" 
-table HR_DOCS

Note:

If the file has changed since it was ingested, SQLcl might not find a matching document. If the document was not ingested into the specified table, SQLcl reports that no matching document was found.