The city wants to build a generative AI app to customize search patterns for relevant information related to the city’s municipal department.
Deploy a state-of-the-art foundation model by using Amazon SageMaker JumpStart.
To test that the endpoint works for general questions, submit the question: Which day comes after Friday?
The data is formatted as a .csv file with two columns: Question and Answer. Pandas is used to create a DataFrame that provides for quick removal of the question column, leaving only the answer column as the data library.
Multiple built-in functions exist in LangChain to read different file formats, such as .txt, .html, and .pdf.
Based on the question, identify the top K most relevant documents, where K = 3 in this solution.
With the Q&A application that is built from the code in this notebook, users can ask a free-form question.
Using the prompt, which chains the top 3 most relevant documents and question, send the question to the LLM for an answer
Overall response was not so good somewhat it’s not completed , may be we can change the foundation model like — Flan-T5 Base model Deploy a second SageMaker endpoint, using an ml.g5.2xlarge instance and the Flan-T5 Base foundation model.
If you’ve found value in this article, you’ll love the content I create as a freelance writer. So please follow me to not miss the coming articles which can transform your learning and will skill up in your career.