From the course: Learning Amazon Bedrock

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

RAG application approach

RAG application approach

- [Instructor] Let's first take a look at the steps involved as we build out this application. We will start by preparing the data. First, we're going to take our document, load it in memory, and create embeddings to represent the content as numerical vectors. We will then store the embeddings in an in-memory vector store. Once the document has been indexed and stored, we will then configure our LLM. We will create a prompt template, which gives the LLM instructions on how to process incoming requests. When a query is provided by the user, we will first perform a similarity search in our vector store. This retrieves relevant information that can be added to the context for our prompt. The prompt is then augmented to include the results from the vector store before it is sent to the model. We then invoke the LLM and parse the output. The generated response will then contain information that was specific to our document. That's pretty cool and a lightweight RAG architecture…

Contents