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.
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
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.
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.
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
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 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