Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The requirement is to build a web application that evaluates the responses of different LLM models in the Question and Answering task. The models to
The requirement is to build a web application that evaluates the responses of different LLM models in the Question and Answering task. The models to compare are as follows
gptturbo
gpt
Llamabchat
Falconbinstruct
Integrate a vector database into the application. The vector database needs to store information scraped from the websites provided.
When the user enters a prompt, query the vector database to retrieve search results based on the user's prompt, get all relevant results and then query each of the LLMs with the new prompt that contains the search results and the user's initial query.
The LLMs should be able to reference the search results and respond with an answer to the user's initial query. The prompt should be engineered in such a way that the model should only reference the search results to construct the response and not its own knowledge.
Please note the backend application needs to be in Python. Usage of streamlit is not allowed.
The primary objectives are as follows:
Design and develop a web application that accepts user prompts and provides the response of the LLMs
Implement a scraping logic to scrape the mentioned website, and store the information in a vector database.
When a new user prompt is received, Query all the mentioned LLMs with the search results from the vector database and the user's query. And then send this output to the frontend.
Implement a mechanism to compare and evaluate the generated outputs to find the bestperforming LLM for the given user input.
Implement Websockets or ServerSent Events SSE to enable realtime streaming of responses to the frontend.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started