Manage creation, updates, queries, and lifecycle operations for document indexes, ensuring scalable and robust content organization.
CREATE_INDEX
LIST_INDICES
ADD_DOCUMENTS
LIST_DOCUMENTS
SEARCH
ASK
DELETE_DOCUMENT
DELETE_INDEX
RENAME_INDEX
Flexible Index Creation
Scalable Content Updates
Advanced Retrieval & Queries
Lifecycle Management
CREATE_INDEX
Name | Definition | Format |
---|---|---|
index_name | A unique name for the new document index (required). Example: "legal_documents_archive" . | String |
documents | List of document content to include (required). Example: ["Contract 1 text", "Contract 2"] . | List of String |
metadata | (Optional) JSON object for tagging/index-level metadata. Example: {"category": "contracts"} . | JSON Object |
index_type | (Optional) "dynamic" or "static" (default: "static" ) to define future updates. | String |
LIST_INDICES
ADD_DOCUMENTS
Name | Definition | Format |
---|---|---|
index_name | The index to update with new documents (required). | String |
documents | List of documents to add (required). | List of String |
metadata | (Optional) JSON object for appended docs’ metadata. | JSON Object |
LIST_DOCUMENTS
Name | Definition | Format |
---|---|---|
index_name | Name of the index whose document list is retrieved (required). | String |
SEARCH
Name | Definition | Format |
---|---|---|
index_name | Name of the index to search (required). | String |
query | Keywords or phrases to find (required). | String |
filters | (Optional) JSON object to filter results by metadata. Example: {"year": "2023"} . | JSON Object |
top_n | (Optional) Number of results to return (default: 10 ). | Integer |
ASK
Name | Definition | Format |
---|---|---|
index_name | Name of the index for the natural language query (required). | String |
question | A question about the indexed content (required). | String |
DELETE_DOCUMENT
Name | Definition | Format |
---|---|---|
index_name | Name of the index containing the doc to delete (required). | String |
document_id | Unique identifier of the document to remove (string, required). Acquirable via LIST_DOCUMENTS . | String |
DELETE_INDEX
Name | Definition | Format |
---|---|---|
index_name | Name of the document index to remove permanently (required). | String |
RENAME_INDEX
Name | Definition | Format |
---|---|---|
current_name | Existing name of the index (required). | String |
new_name | New name for the index (required). | String |
"All_Product_Manuals"
index for quick reference of product user guides."technical_specs_index"
while retaining final docs."finance_reports_index"
to confirm Q2 budgets are uploaded."marketing_plans_2023"
to "marketing_plans_current"
after updates.project_manager_tools
to manage multi-project docs in a single index.database_tools
to store query outputs or logs in an indexed environment.process_scheduler_tools
to schedule index updates or cleanup tasks.manage_tests_tools
for storing test logs or documentation, ensuring easy future retrieval."static"
, but choose "dynamic"
if frequent doc additions or removals are expected.CREATE_INDEX
) with a name and set of documents. If the index is dynamic, additional documents can be appended (ADD_DOCUMENTS
). Searching can be direct (SEARCH
) or more question-oriented (ASK
). Over time, documents or entire indexes can be removed (DELETE_DOCUMENT
or DELETE_INDEX
), reflecting your content lifecycle. If naming conventions shift, RENAME_INDEX
helps reorganize indexes without re-creating them from scratch.
Example
_create_index(index_name="Research_Archive", documents=["Paper1 text", "Paper2 text"], index_type="dynamic")
_add_documents_to_index(index_name="Research_Archive", documents=["Paper3 text"])
_search(index_name="Research_Archive", query="Quantum entanglement", top_n=5)
_ask(index_name="Research_Archive", question="What are the main findings on quantum entanglement?")
_list_documents(index_name="Research_Archive")
_delete_document(index_name="Research_Archive", document_id="doc_34567")
or _delete_index(index_name="Research_Archive")