Overview
The Tror Gen AI SDK empowers you to create, manage, and utilize knowledge bases to enhance the capabilities of your Large Language Models (LLMs). This knowledge base acts as a central source of information for your LLMs, enabling them to deliver well-informed and comprehensive responses during chat interactions.
This guide provides an overview of the functionalities within the Tror Gen AI SDK that empower you to effectively manage your knowledge base collection:
Knowledge Base Creation Methods
The SDK offers various methods for constructing your knowledge bases, allowing you to integrate information from different sources:
-
File Upload: Directly upload relevant documents containing the knowledge you want to incorporate (e.g., user manuals, technical specifications).
-
SQL Database Integration: Connect to a structured SQL database to leverage existing knowledge stored in tables.
-
Confluence Integration: Integrate content from your Confluence workspace, enabling the use of wiki pages or specific content for your LLM.
Choosing the Right Method
The optimal method depends on the format and location of your existing knowledge. Refer to the dedicated sections within the documentation for detailed instructions and code examples for each creation method.
Retrieving All Knowledge Bases
The get_knowledgebases function within the SDK allows you to retrieve a list of all your knowledge bases. This functionality provides a helpful overview of your knowledge base collection and aids in selecting the appropriate one for your LLM interactions.
-
Understanding the Response: The function typically returns a list of dictionaries, with each dictionary representing a knowledge base. This information might include the knowledge base ID, name, and potentially the integration method used for creation.
-
Benefits: Gaining visibility into your knowledge bases simplifies selection during LLM development and helps identify unused knowledge bases for potential deletion (refer to the "Removing a Knowledge Base" section).
Removing a Knowledge Base:
The delete_knowledgebase function empowers you to delete knowledge bases that are no longer required within your application. This is helpful for:
-
Evolving Needs: As your application or the information landscape changes, knowledge bases might become irrelevant. Deleting them frees up resources and keeps your collection organized.
-
Unused Knowledge Bases: If you have knowledge bases that are not actively used in your LLM interactions, you can declutter your collection by removing them.