The latest 0.30.0
update is full of many improvements designed to streamline operations and enhance functionality across a broad spectrum of applications. In addition to introducing powerful new tools and extending the capabilities of our existing drivers, this release focuses heavily on refining the Griptape interface. We've implemented numerous refactors and breaking changes, including substantial configuration adjustments and renaming, in order to simplify and enhance user interactions with our platform. Here’s a detailed look at what’s new, how it works, and why it's beneficial for your projects.
Simplifying Configurations and Enhancing Flexibility
Our update simplifies the way configurations are managed across the platform. The introduction of griptape.configs.Defaults
allows developers to set default values for configurations in one centralized location, reducing redundancy and potential errors across multiple project setups. This change not only saves time but also ensures consistency across deployments, making it easier to manage and scale applications efficiently.
Previously you would configure a specific Structure with a provider configuration for that Structure. However, if you wanted to override all Structures with the same configuration, you would need to specify it multiple times. Now you can set the Default for all Structures and Drivers to pick up the global configuration.
Simplifying Event Configuration
The implementation of the global event bus
offers a streamlined approach to publishing and subscribing to events within applications. This centralized event management system simplifies communication between components, enhancing modularity and maintainability. Whether it’s a microservice architecture or a complex enterprise application, the global event bus ensures that all components can communicate effectively, reducing coupling and improving code clarity.
In the following example, you can configure the global EventBus
to count tokens used across all drivers in your application.
Refactored TaskMemory
A major enhancement in this release is also the restructuring of how TaskMemory
is managed, which involves decomposing the original TaskMemoryClient
into three distinct tools—each tailored to specific functionalities. This change aims to optimize task management within applications by providing more targeted, efficient tools:
PromptSummaryTool
: Designed to facilitate quick and efficient summarization of content, this tool helps in distilling extensive text into concise summaries, ideal for reporting or generating insights from large datasets.QueryTool
: This tool enhances the querying capabilities of applications, allowing for more precise and context-aware responses to user inquiries, improving the user experience and the application’s responsiveness.ExtractionTool
: Specialized in extracting structured data from unstructured inputs, this tool is crucial for applications that need to process and convert large volumes of text into actionable data.
These tools replace the previous one-size-fits-all TaskMemoryClient
, offering more specialized functionalities that cater to specific needs, thereby improving performance and usability. By segmenting the TaskMemory
functionalities, we enable developers to integrate and manage these tasks more effectively within their projects.
You can try out the following code examples to see how the different tools function with the same information.
PromptSummaryTool
In the output below you can see the Tool returns a summary of the information it found stored in TaskMemory
, from which the LLM then determines the final answer to the initial prompt.
QueryTool
Here we can see the output of the Tool is much more succinct than the summary as it specifically queried for a question vs. summarizing the entire contents.
ExtractionTool
Note: The ExtractionTool
requires an ExtractionEngine
to tell it which format you’d like to extract the information into. Griptape offers a few pre-baked extraction engines, but you can build a custom one as well.
These results differ from the previous two Tools as the ExtractionTool
will return the information it found in TaskMemory
in json format.
Revolutionizing Data Management with AstraDbVectorStoreDriver
The new AstraDbVectorStoreDriver
marks a major advancement in our platform's ability to interact with DataStax Astra DB. This integration allows developers to leverage a scalable, cloud-native database solution for managing large datasets efficiently. Whether you're handling millions of data points for machine learning models or storing high volumes of transactional data, the AstraDbVectorStoreDriver
ensures your operations are smooth and scalable. This is especially useful for applications that require robust data retrieval capabilities and high availability.
Custom Schema Properties and Enhanced Query Functionality
With the introduction of the ability to set custom schema properties on Tool Activities
, developers can now tailor the functionality of tools to meet specific application requirements. This feature allows for the addition of extra schema properties that can dictate how tools validate, process, or handle data, providing a layer of customization that adapts to complex use cases.
In this example, we add a `sort` property to the `search` Activity which will be added as a Google custom search query parameter.
Additionally, the TranslateQueryRagModule
enhances the RagEngine's ability to interact with a global user base by automatically translating input queries into multiple languages. This functionality is crucial for applications that serve diverse populations, ensuring that language barriers do not hinder user interaction.
The following example shows a simple RAG pipeline that translates incoming queries into English, retrieves data from a local vector store, and generates a response.
Advancements in Observability and Monitoring
Observability is key to maintaining the health and performance of applications. The update brings several new observability drivers, such as the DatadogObservabilityDriver
and OpenTelemetryObservabilityDriver
, which provide detailed insights into applications' workings. These tools are essential for real-time monitoring and can help pinpoint issues before they affect the user experience, ensuring your application remains reliable and performant under various conditions.
Conclusion
This release is designed to empower developers by providing more control, enhancing flexibility, and offering powerful tools for better data management, event handling, and observability. By integrating these new features, developers can build more robust, efficient, and scalable applications. Dive into these updates and explore how they can transform your projects, streamlining operations and boosting performance.
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Block quote
Ordered list
- Item 1
- Item 2
- Item 3
Unordered list
- Item A
- Item B
- Item C
Bold text
Emphasis
Superscript
Subscript