Content
The Content plugins are used to manipulate and analyze text data. These plugins are used to summarize, label, and read text data.
Table of contents
List of Content Plugins & Agents
Index | Title | Access | Description of the Plugin/Agent | Category |
---|---|---|---|---|
1 | Data Labeling | Paid users only | This plugin labels your data | Content |
2 | Read File | Paid users only | Open supported documents (including speech to text & images) and display their plain/text content | Content |
3 | Sentiment Analysis | Free Plugin | This plugin lets you fine emotions/sentiment in context | Content |
4 | Split Text | Free Plugin | This plugin lets you cut long content into smaller chunks | Content |
5 | Summarize Text | Paid users only | This plugin lets you summarize long content | Content |
6 | Summarize Website | Paid users only | This plugin lets you summarize website content | Content |
7 | Summarize File | Paid users only | Import file content, summarize the content in chunks and ingest the summaries | Content |
We will only cover the plugins and agents that are for Paid users only
.
Data Labeling
The Data Labeling
plugin assigns suitable labels to content to enhance data access control within an organization. Labeling Criteria Labels
are based strictly on the primary context of the content. Multiple labels can be assigned to a single piece of content, but only the most relevant ones should be included.
Examples:
- If the content contains personal identifiable information, the label should be “PII”.
- If the content is about a person, the label should be “Biographies”.
- If the content contains healthcare information, the label should be “PHI”.
- If the content contains governmental controlled unclassified information or for official use only (FOUO) content, the label should be “CUI”.
- If the content is about regulation, the label should be “Regulations”.
The plugin provides the top 5 most relevant labels in English.
Step 1 - Navigate to the Ask Sage Prompt Settings
section and select Prompt Templates
. Followed by then selecting the Data Labeling
plugin.
Step 2 - Enter the content you want to label in the top text box.
Do not update the prompt text unless you know what you are doing.
Step 3 - Click on the Submit
button to get the generated plugin prompt and then submit the prompt to get the labels.
Example of Data Labeling Plugin
Try out the
Data Labeling
plugin with the examples below to see how it works.
Health Care Example:
Mr. John Doe was accompanied by his daughter, Ms. Jane Doe, for the examination. Mr. Doe is a 60-year-old man, who is widowed and retired. Mr. Doe is currently living with his daughter, Jane, in Jane’s apartment. Ms. Jane Doe informed me that Mr. John Doe used to work as a factory supervisor.
Mr. John Doe has a history of medical conditions. He has had diabetes and hyperlipidemia since 1995 and suffered several heart attacks in 2010. He subsequently developed heart problems (ischemic cardiomyopathy), congestive heart failure, and chronic kidney disease and was treated in XYZ Hospital.
He was last admitted to the XYZ Hospital on 5 May 2022 till 20 May 2022, during which he was diagnosed to have suffered from a myocardial infarction. This was confirmed by ECG and echocardiogram tests.
Code Example:
apiVersion: apps/v1
kind: Deployment
metadata:
name: webapp-deployment
namespace: default
labels:
app: webapp
spec:
replicas: 3
selector:
matchLabels:
app: webapp
template:
metadata:
labels:
app: webapp
spec:
containers:
- name: webapp
image: nginx:latest
ports:
- containerPort: 80
env:
- name: APP_ENV
valueFrom:
configMapKeyRef:
name: webapp-config
key: APP_ENV
- name: APP_DEBUG
valueFrom:
configMapKeyRef:
name: webapp-config
key: APP_DEBUG
- name: APP_VERSION
valueFrom:
configMapKeyRef:
name: webapp-config
key: APP_VERSION
- name: DB_USERNAME
valueFrom:
secretKeyRef:
name: webapp-secret
key: DB_USERNAME
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: webapp-secret
key: DB_PASSWORD
volumeMounts:
- name: config-volume
mountPath: /etc/config
volumes:
- name: config-volume
configMap:
name: webapp-config
Legal Contract Example:
**INTELLECTUAL PROPERTY AGREEMENT**
**This Intellectual Property Agreement ("Agreement") is made and entered into as of August 8, 2024, by and between Tech Innovators Inc., a Delaware corporation with its principal place of business at 1234 Innovation Drive, Wilmington, DE 19801 ("Company"), and John Doe, an individual residing at 5678 Creator Lane, Newark, DE 19711 ("Inventor").**
**RECITALS**
WHEREAS, the Inventor has developed certain intellectual property related to an Internet of Things (IoT) device (the "Invention");
WHEREAS, the Company desires to acquire certain rights to the Invention and the Inventor is willing to grant such rights to the Company under the terms and conditions set forth herein;
NOW, THEREFORE, in consideration of the mutual covenants and promises contained herein, the parties agree as follows:
**1. DEFINITIONS**
1.1 "Invention" means the IoT device and all related technology, designs, algorithms, software, hardware, and documentation developed by the Inventor, as described in Exhibit A attached hereto.
1.2 "Patent Rights" means all patents and patent applications, including any continuations, continuations-in-part, divisions, reissues, reexaminations, and extensions thereof, related to the Invention.
1.3 "Confidential Information" means any non-public information disclosed by one party to the other party, either directly or indirectly, in writing, orally, or by inspection of tangible objects, that is designated as "Confidential" or that reasonably should be understood to be confidential given the nature of the information and the circumstances of disclosure.
**2. ASSIGNMENT OF RIGHTS**
2.1 **Assignment**. The Inventor hereby assigns to the Company all right, title, and interest in and to the Invention, including all Patent Rights, copyrights, trade secrets, and other intellectual property rights therein.
2.2 **Further Assurances**. The Inventor agrees to execute all documents and take all actions reasonably requested by the Company to perfect the Company's rights in the Invention and to assist the Company in obtaining, maintaining, and enforcing the Patent Rights and other intellectual property rights in the Invention.
**3. CONSIDERATION**
3.1 **Payment**. In consideration for the assignment of the Invention, the Company shall pay the Inventor the sum of $50,000, payable as follows: $25,000 upon execution of this Agreement and $25,000 upon the successful filing of the first patent application related to the Invention.
3.2 **Royalties**. The Company shall pay the Inventor a royalty of 5% of the net sales of products incorporating the Invention, payable quarterly within thirty (30) days after the end of each calendar quarter.
**4. CONFIDENTIALITY**
4.1 **Obligations**. Each party agrees to maintain the confidentiality of the other party's Confidential Information and to use such Confidential Information only for the purposes of this Agreement. Each party agrees to take all reasonable measures to protect the confidentiality of the other party's Confidential Information.
4.2 **Exclusions**. Confidential Information does not include information that (a) is or becomes publicly known through no breach of this Agreement, (b) is received from a third party without breach of any obligation of confidentiality, (c) is independently developed without use of the other party's Confidential Information, or (d) is required to be disclosed by law or court order.
**5. REPRESENTATIONS AND WARRANTIES**
5.1 **By Inventor**. The Inventor represents and warrants that (a) the Inventor is the sole owner of the Invention and has the right to assign the Invention to the Company, (b) the Invention does not infringe any third party's intellectual property rights, and (c) the Inventor has not granted any rights in the Invention to any third party.
5.2 **By Company**. The Company represents and warrants that it has the full power and authority to enter into this Agreement and to perform its obligations hereunder.
**6. INDEMNIFICATION**
6.1 **By Inventor**. The Inventor agrees to indemnify, defend, and hold harmless the Company from and against any and all claims, liabilities, damages, losses, and expenses (including reasonable attorneys' fees) arising out of or in connection with any breach of the Inventor's representations and warranties set forth in Section 5.1.
6.2 **By Company**. The Company agrees to indemnify, defend, and hold harmless the Inventor from and against any and all claims, liabilities, damages, losses, and expenses (including reasonable attorneys' fees) arising out of or in connection with any breach of the Company's representations and warranties set forth in Section 5.2.
**7. MISCELLANEOUS**
7.1 **Governing Law**. This Agreement shall be governed by and construed in accordance with the laws of the State of Delaware, without regard to its conflict of laws principles.
7.2 **Entire Agreement**. This Agreement constitutes the entire agreement between the parties with respect to the subject matter hereof and supersedes all prior and contemporaneous agreements, understandings, and representations, whether oral or written.
7.3 **Amendments**. This Agreement may be amended only by a written instrument signed by both parties.
7.4 **Severability**. If any provision of this Agreement is held to be invalid or unenforceable, the remaining provisions shall continue in full force and effect.
7.5 **Counterparts**. This Agreement may be executed in counterparts, each of which shall be deemed an original, but all of which together shall constitute one and the same instrument.
IN WITNESS WHEREOF, the parties have executed this Agreement as of the date first above written.
**Tech Innovators Inc.**
By: ___________________________
Name: Jane Smith
Title: CEO
**John Doe**
By: ___________________________
Name: John Doe
---
**Exhibit A**
**Description of the Invention**
The Invention is an IoT device designed for smart home automation. It includes the following components and functionalities:
- **Hardware**: A microcontroller unit (MCU), Wi-Fi module, temperature and humidity sensors, motion detector, and power supply unit.
- **Software**: Embedded firmware for device control, mobile application for user interface, and cloud-based backend for data storage and analytics.
- **Functionality**: The device can monitor environmental conditions, detect motion, and send alerts to the user's mobile application. It can also integrate with other smart home devices through standard communication protocols such as MQTT and HTTP.
Read File
The Read File
plugin can be used with the following supported documents (including speech to text & images) and display the data in plain/text content. The plugin supports the following file types:
Data Type | File Format | Example | Max Size Per File |
---|---|---|---|
Text | .txt, .docx, .pdf, .pptx, .ppt, .csv, .cc, .sql, .cs, .hh, .c, .php, .js, .py, .html, .xml, .msg, .odt, .epub, .eml, .rtf, .doc, .json, .md, .tsv, .yaml, .yml, .java, .rb, .sh, .bat, .ps1 | example.txt | 50MB |
Image | .jpg, .jpeg, .png | example.jpg | 50MB |
Audio | .wav, .mp3, .mp4, .mpeg, .mpga, .m4a, .webm | example.wav | 500MB |
Compressed | .zip | example.zip | 50MB |
Spreadsheet | .xlsx, .tsv | example.xlsx | 50MB |
Presentation | .pptx, .ppt | example.pptx | 50MB |
Code | .cc, .sql, .cs, .hh, .c, .php, .js, .py, .java, .rb, .sh, .bat, .ps1 | example.py | 50MB |
E-book | .epub | example.epub | 50MB |
.eml, .msg | example.eml | 50MB | |
Rich Text | .rtf | example.rtf | 50MB |
Markup | .md, .html, .xml | example.html | 50MB |
Data Interchange | .json, .yaml, .yml | example.json | 50MB |
Step 1 - Navigate to the Ask Sage Prompt Settings
section and select Prompt Templates
. Followed by selecting the Read File
plugin.
Step 2 - Click on the Choose File
button to upload the file you want to read.
Step 3 - Select the file reader strategy
from the dropdown list. The options are:
-
Auto (default): This is the default setting, where the system automatically selects the most appropriate file reading strategy based on the file type and content. It aims to balance speed and accuracy.
-
Fast: This strategy prioritizes speed over accuracy. It is useful when you need to quickly process a large number of files and can tolerate some loss in detail or accuracy.
-
Hi_res (for OCR recognition): This strategy is designed for high-resolution processing, particularly for Optical Character Recognition (OCR). It is useful for extracting text from images or scanned documents where high accuracy is required.
If you are unsure which strategy to choose, you can leave it as the default “Auto” setting.
Step 4 - Click on the Submit
button to get the generated plugin prompt and then submit the prompt to read the file.
Example of Read File Plugin
- Run the
Read File
plugin with the following image file:
Results after processing the image file:
Summarize Text
The Summarize Text
plugin is used to summarize long content. The plugin generates a concise summary of the input text, highlighting the key points and main ideas. The summary is designed to provide a quick overview of the content without losing important details.
The
Summarize Text
plugin is particularly useful for processing lengthy text-based content that needs to be condensed for easier understanding. It can help you save time and focus on the most relevant information, making it an essential tool for content analysis and information retrieval.
Step 1 - Navigate to the Ask Sage Prompt Settings
section and select Prompt Templates
. Followed by then selecting the Summarize Text
plugin.
Step 2 - Enter the text you want to summarize in the top text box.
There are two additional options
1. Respond in JSON format: This option will return the summary in JSON format.
2. Write an aggregate summary: This option will return an aggregate summary of the input text.
Step 3 - Click on the Submit
button to get the generated plugin prompt and then submit the prompt to get the summary.
Example of Summarize Text Plugin
You can utilize the Legal Contract Example provided in the Data Labeling
plugin to test the Summarize Text
plugin as well.
The result for the Legal Contract example was a summarized verison of the contract.
Summarize Website
The Summarize Website
plugin is used to summarize website content. The plugin generates a concise summary of the input website, which utilizes our webcrawler to extract the content from the website. The summary is designed to provide a quick overview of the website content without losing important details.
Step 1 - Navigate to the Ask Sage Prompt Settings
section and select Prompt Templates
. Followed by then selecting the Summarize Website
plugin.
Step 2 - Enter the URL of the website you want to summarize in the top text box.
Do not update the prompt text unless you know what you are doing.
Step 3 - Click on the Submit
button to get the generated plugin prompt and then submit the prompt to get the summary.
Example of Summarize Website Plugin
- Run the
Summarize Website
plugin with the following website URL: https://www.asksage.ai/
Results after processing the website URL:
Summarize File
The Summarize File
plugin is used to import file content, summarize the content in chunks, and ingest the summaries. The plugin supports the same file types as the Read File
plugin.
Step 1 - Navigate to the Ask Sage Prompt Settings
section and select Prompt Templates
. Followed by then selecting the Summarize File
plugin.
Step 2 - Click on the Choose File
button to upload the file you want to summarize.
Step 3 - Select the file reader strategy
from the dropdown list. The options are the same as the Read File
plugin (Auto
, Fast
, Hi_res
).
Step 4 - Fill in the two remaining text boxes:
- Enter short context about the data. (Describe the data in a few words)
- Write a prompt to be used by the bot to summarize the data.
You will need to adjust the prompt to fit your use case and the type of data you are summarizing.
Step 5 - Select a Dataset
from the dropdown list if you want to ingest the summaries into a user-defined dataset in Ask Sage.
Navigate to the Ingesting Data 📚 section if you have questions about how to create a dataset in Ask Sage.
Step 6 - Click on the Submit
button to get the generated plugin prompt and then submit the prompt to summarize the file.
If you observe that the token window surpasses the limit, it is acceptable to submit the prompt as it is. The plugin will automatically divide the content into chunks and summarize them based on the token limit of the model being used, which may vary.
The result will be displayed and the user will be prompted with additional options to ingest the summaries into a user-defined dataset
in Ask Sage.
The options are:
A) Ingest the data into the dataset
specified in the plugin at step 5.
/yes
B) User can skip
and then is prompted with the option to re-run the summarization plugin on the summarized results or to stop
the process.
/skip
C) User can stop
the process.
/stop
Example of Summarize File Plugin
- Run the
Summarize File
plugin with a research paper. - For example, the paper that lead to the Transformer architecture in NLP: Attention is All You Need
Results after processing the research paper:
- Ask Sage chunks the content and summarizes it in chunks.
- Ask Sage shows the summarized content
- User is prompted if they want to ingest the summaries into a user defined
dataset
in Ask Sage.
This is a powerful feature that allows users to ingest summarized content into a dataset for future use. This is particularly useful for organizing and managing large amounts of data in Ask Sage, while also enabling users to dictate how much of the data they want to ingest at a time.