New
WEBINAR | An AI Operating Model for Content Organization and Personalization
May 14, 2024

Clarifai 10.4: From Zero to App in 5 minutes

Table of Contents:

From 0 to app in 5 minutes-1

This blog post focuses on new features and improvements. For a comprehensive list, including bug fixes, please see the release notes.

Newly introduced App templates for streamlined app creation.

We are introducing pre-built, ready-to-use templates that simplifies the app creation process for various usecases. Each template comes with a range of resources, such as datasets, models, workflows, and modules, allowing you to quickly get started with your app creation process.

When you choose a template to create an app, the configurations and resources available in the template will be preemptively applied to your new application. You can use the pre-built components to quickly apply AI to your specific use case.

Why use an App Template?

  • Time efficiency — App templates provide a head start in your AI development journey. They offer a ready-made foundation to launch your application much faster than starting from scratch.

  • Leverage pre-existing resources — App templates empower you to leverage pre-existing resources, such as models, workflows, or modules. Instead of starting from scratch, you can begin with a fully equipped application that addresses a particular use case.

  • Ease of customization — While app templates provide a foundation for AI development, they are often highly customizable. You can easily modify the template to suit your preferences.

To access the templates:

  1. You can either go to the community Apps section and filter the apps by selecting the "Templates" option on the right side.
    Screenshot 2024-05-12 at 2.50.46 PM
  2. Or you can choose the "Use an App template" option by creating your app from the create option on the top right side.

Screenshot 2024-05-12 at 2.53.47 PM

Along with the existing templates in the recent release, added new templates such as Sentiment Analysis and Text Moderation. Let's look at the details of each template:

  • Text Moderation Template, which provides ready-to-use workflows and models, leveraging NLP Models and LLMs to automatically monitor and detect inappropriate or harmful text content.

    Here are some of the workflows available in the Text Moderation template for various usecases:

    1. Multilingual moderation Classifier Workflow: This workflow is wrapped around the Multilingual text moderation model that classifies text as toxic, insult, obscene, identity_hate and severe_toxic.

    2. English text moderation Classifier Workflow: This workflow is wrapped around the English text moderation model that classifies english text as toxic, insult, obscene, identity_hate and severe_toxic.

    3. Text-moderation-mistral-7b: Workflow uses Mistral-7b Model with specified prompt template for text moderation that identify and filter out any hate speech, violent language and explicit content and Respond with 'Inappropriate' if such content is present and 'Appropriate' otherwise.

    4. Text-moderation-misinformation-dbrx: Workflow uses DBRX Model with specified prompt template for Misinformation moderation that identify and filter out  misinformation or unsubstantiated claims, especially related to health, science, or news events and respond with 'Potential Misinformation' if the content seems questionable or 'Likely Reliable' if the information appears to be credible.

    5. LlamaGuard-prompt-moderation: Workflow uses Llama Guard Model with specified prompt template for safety of LLMs input prompts. 
    Screenshot 2024-05-11 at 12.25.39 PM
  • Sentimental Analysis Template, which provides a guide for sentimental analysis and comes with several ready-to-use sentimental analysis workflows and models dealing with different use cases, leveraging different NLP models and LLMs.

    Here are a few workflows from the template.

    1. Tweet sentiment Analysis Workflow: This workflow uses twitter-roberta-base-sentiment-latest model trained on ~124M tweets, and finetuned for sentiment analysis with the TweetEval benchmark. 

    2. Multilingual Sentiment Analysis-DistilBERT Workflow: This workflow uses distilbert-base-multilingual-cased-sentiments model, finetuned for sentiment analysis in multiple languages.

    3. Financial sentiments Analysis-FinBERT Workflow: This workflow uses finbert, A BERT-based model fine-tuned on financial text for high-accuracy sentiment analysis in the finance domain.

    4. Sentimental-analysis-mistral-7b Workflow: Workflow uses Mistral-7b Model with a specified prompt template for sentimental analysis and predicts if the sentence/ pargraph is positive/negative or neutral sentiment.

    Screenshot 2024-05-11 at 12.26.30 PM
  • Chatbot Template, which allows you to develop AI chatbots swiftly using Clarifai LLMs, offering personalized assistance and integrating external data with RAG framework for enhanced capabilities.

    The template consists of Clarifai's Chatbot Module that lets you chat with several Large Language Models with a single UI interface. 

  • Image Moderation Template, which provides diverse AI-powered workflows for automatically filtering and categorizing inappropriate or harmful images based on various criteria.

    Here are a few models and workflows that the Image Moderation Template consists of.

    1. NSFW Recognition model predicts the likelihood that an image contains suggestive or sexually explicit nudity. It's a great solution for anyone trying to moderate or filter nudity from their platform automatically. It is limited to nudity-specific use cases.

    2. NSFW-recognition workflow: This workflow is wrapped around NSFW Recognition Classifier that classifies the images as nudity, sexually-explicit imagery.

    3. Hate-symbol-detection workflow: This workflow is wrapped around Hate symbol-detector that detects the ADL-recognized hate symbol.

  • Content Generation Template, which empowers users to efficiently create diverse, tailored text, from emails and blogs to social media content and stories, enhancing communication and creativity.

    This App Template discusses several content generation use cases such as Email writing, Blog writing, Question Answering, Storytelling, Social media content and comes with several ready-to-use workflows for content creation.

  • Document Summarization Template, which is an app template for document summarization — supports 3 levels that start with Novice and end up with Expert.

    This template explore 3 primary methods for summarization that start with Novice and end up with Expert.

    1. Sentence and Paragraph Summarization: This helps to summarise a few paragraphs and want to one-off summarize. You can simply submit the text for summarization through the following workflow, and it will return a condensed version:

    2. Page-level Summarization: This method addresses the challenge of summarizing texts spanning multiple pages.

    3. Summarize an entire book: This method can help to summarise the entire book with the Best Representation Vectors Method.

  • RAG Template, which streamlines the creation of Retrieval-Augmented Generation (RAG) applications with Clarifai, enhancing LLMs with external knowledge for accurate, up-to-date information generation.

    The App template includes pre-built RAG agents, leveraging different LLM models and optimized through various prompt engineering techniques, to name a few.

    1. Rag-agent-gpt4-turbo-naive: This RAG Agent uses GPT-4 Turbo LLM model with a simple prompt for straightforward integration.

    2. Rag-agent-claude2-1-CoT-few-shot: This RAG Agent uses the Claude-2.1 LLM model with CoT prompting for enhanced reasoning and performance.

Published new models

  • Wrapped Command-R+, a highly efficient, multilingual, enterprise-grade LLM optimized for real-world business applications, boasting advanced RAG capabilities and a 128k-token context window.
    Screenshot 2024-05-11 at 12.49.33 PM
  • Wrapped Gemini 1.5 Pro, a powerful, efficient LLM with 1 million long-context window, enabling advanced reasoning and comprehension across various data types.
    Screenshot 2024-05-11 at 12.51.06 PM
  • Wrapped Mixtral-8x22B, the latest and largest Mixture of Expert LLM from Mistral AI. It's a state-of-the-art machine learning model using Mixture 8 of Experts (MoE) 22b models.
    Screenshot 2024-05-11 at 12.52.43 PM
  • Wrapped Qwen1.5-32B, a model that provides competitive AI performance with optimized efficiency, making it a strong choice for diverse, multilingual applications.
  • Clarifai-hosted Gemma-1.1-7b-it, a lightweight, decoder-only LLM trained on 6 trillion tokens of diverse text data, suitable for various text generation tasks with improved quality and safety measures.
  • Clarifai-hosted Llama-3-8B-Instruct. Llama 3 instruction-tuned models are optimized for dialogue use cases and outperform many of the available open source chat LLMs on common industry benchmarks.
  • Wrapped Llama-3-70B-Instruct, an advanced, scalable language model designed for diverse applications, offering state-of-the-art performance in coding, reasoning, and multi-use conversational capabilities.
  • Wrapped Llama-3-70B. Llama-3 is a state-of-the-art large language model designed for enhanced reasoning and coding. It has a broad application across multiple languages and tasks.
    Screenshot 2024-05-11 at 12.58.20 PM
  • Clarifai-hosted LLaVA-v1.6-Mistral-7B, a high-performance, efficient, and cross-lingual large multimodal model, boasting state-of-the-art capabilities in visual reasoning, OCR, and zero-shot Chinese multimodal understanding.
  • Clarifai-hosted LLaVA-1.5-7b, a state-of-the-art language vision model that represents a significant advancement in the field of multimodal artificial intelligence.

Added symmetric and asymmetric text search capabilities within the Input-Manager

  • Symmetric search allows users to find text inputs that closely resemble other text inputs, facilitating easy identification of similar content. On the other hand, asymmetric search empowers users to search for text inputs that effectively answer specific query questions, enhancing the precision and relevance of search results.
    Screenshot 2024-05-12 at 4.14.27 PM

Python SDK

Added new features. Learn more about them here.

  • Added a flag to download a model. If the export_dir parameter is provided in Model().export(), the exported model will be saved in the specified directory. Otherwise, the export status will be shown.
  • Added support for Label IDs in Dataloaders (using the label_ids parameter) and get_proto functions in the Inputs class.
  • Implemented pagination feature in Search. Added pagination parameter in the Search() class and included per_page and page_no parameters in the Search().query() method.
  • Added algorithm parameter to Search().
  • Added root certificate support to establish secure gRPC connections by including a root_certificates_path parameter in all relevant classes and authentication helpers. Also, updated gRPC to the latest version.
  • Added missing VERSION and requirements.txt files to setup.py.

Made some improvements

  • Upgraded to the latest version of the clarifai-grpc package (version 10.3.4) to leverage the newer gRPC functionality.
  • RAG apps, workflows, and other resources are now automatically set up using UUIDs in their IDs instead of timestamps. This change helps avoid race conditions.
  • Changed logger for Inputs().upload_annotations to display full details of failed annotations.
  • Updated the model upload CLI documentation.
  • Limited the maximum upload batch size for Inputs().upload_inputs() function. Also addressed the inconsistency in the model version ID parameter between App.model() and Model().
  • Removed runners from the SDK.

Node SDK

Added some features

  • Added a new Dataset class with several methods for handling datasets, including creating and deleting versions, listing versions, and uploading data from a folder or a CSV file.
  • Added several new methods to the Input class for handling inputs, including methods for bulk uploading, waiting for inputs, deleting failed inputs, and retrying uploads.
  • Added several new methods and properties to the Search class, including support for different search algorithms and metrics, and improved handling of queries and pagination.

Made an improvement

  • Since the uuidv4 package has been deprecated in npm, we replaced it with the recommended uuid package.

Enabled deletion of associated model assets when removing a model annotation

  • Now, when deleting a model annotation, the associated model assets are also marked as deleted.

Community

Added ability to browse the resources in a template

  • You can now access a modal popup on a template’s overview page that allows you to easily view the resources available in it, including inputs, datasets, models, workflows, and modules.

Introduced an easier way to add collaborators

  • We added an option to add app collaborators from the App Overview screen.

Introduced underscores for creating an app ID

  • You can now use underscores when creating an app ID.

Moved app templates and starred apps to their own paths

  • Previously, we implemented this as parameter filters. We relocated templates and starred filters to separate URLs. You can now access templates at apps/templates and starred apps at apps/starred.

Disabled Use Model button for models with no versions

  • As it's not possible to send API calls to models with no versions, we've disabled the Use Model button if no version exists. Therefore, you'll need to create a version first before using a model.

Increased font size for various texts in mobile view

  • We enhanced the readability of texts in various areas, such as app IDs, user IDs, and field placeholders, by increasing their font size in mobile view.

Added resource pricing on the Model-Viewer page for some types of models

  • We added pricing information for these model types: text-to-text, image-to-text, and multimodal-to-text.
    Screenshot 2024-05-12 at 7.18.15 AM

Organization Settings and Management

Improved organization invitation emails

  • We improved organization invitation emails by adding details of the person who sent the invitation. The email now includes their user ID and user name, which enhances the legitimacy of the invitation.