GPT on my website
One of the frequently used templates at Relevance is GPT on my website. This Tool enables you to find the answer to a given question on a website.
Tool execution
Tools and templates can be
-
tested on individually provided inputs:
-
set to fetch the data from a dataset and apply the analysis on the whole dataset:
How to use the Tool
Locate the Tool in the template page and click on Use template
.
You can use the Tool as is or
clone it.
Tool inputs and output
The Tool requires two inputs:
- URL to a website to look at (Website)
- A question to answer (Question):
Provide the input data and hit
Run once
, you will see the LLM response in a few seconds similar to what is shown in the image below.
The output is the answer to the question based on the provided information.
Tool components
If you clone a template, or make a Tool from scratch, you will have access to the Build tab. Build is where one put together different components to build a Tool suitable for their needs.
User inputs
Both inputs in this Tool are of Text input. The first one is to provide a URL and the second one to enter a question.
Text input: An input text component suitable for short text pieces, such as name, topic, a question.
Tool steps
There are 5 components under the Tool steps in this analysis flow. These components take care of three tasks: extracting the website content, preparing the data for search, and the LLM step.
Extract the website Content
-
URL control
A Javascript code component is available to Run Javascript codes when necessary.
In this Tool, the code-snippet checks the URL format.
-
Scrape the website
Extract Website Content is a ready-to-use component for scraping website contents. All that is needed a a URL to a website which allows scraping.
Data preparation and vector search
-
Split text
Split text breaks large text content such as a PDF file or content of a scraped website to smaller chunks of text. When working with large amount of text for tasks such as question-answering, it is unlikely that the whole content all-together is the answer to a given question. Therefore, it is highly recommended to break the content into smaller chunks (i.e. text splitting).
-
Vectorize and search array
Vectors are representation of data in vector space. In other words, vectors are numeric representationds in which items that are semantically close to each other are located close to one another as well. This is a how AI and many machine learning algorithms work accurately. The Vectorize and search component takes the source content (e.g. content of a PDF file) and a query, vectorizes the data and query and returns the most relevance piece in the data source as the answer to the query.
Large Language Model (LLM)
A large language model component is all set up to provide you access to GPT (and many other LLMs). In the prompt section, you will provide the required information as well as instructions to what is expected to be done.
- Provide the context at the top
- Be short and precise with your instruction/request from the LLM
- Note what you expect instead of noting what you don’t want