From the course: Hands-On AI: RAG using LlamaIndex

Unlock the full course today

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

Prompt engineering for RAG

Prompt engineering for RAG

- [Instructor] In this video, I'm going to show you how to customize the prompt template that is associated with your query engine. Now, before we proceed, you should install the following packages to your environment. This is because we are going to be importing some helper functions. These helper functions require that these packages be installed. A heads up that I won't be using FastEmbed or Mistral AI throughout the course, but I have made the functions extensively enough so that should you choose to use a free option like FastEmbed for an embedding model, or if you want to hack around with Mistral AI, it's going to be easy for you to do so. So let's go ahead and get started. So we start by doing our imports, and this sys append here just makes it so that we can import our helper functions. Instantiate our API keys, and now we can start using our helper functions to set up our LLM Embedding model vector store and create an index. So you can see here that we end up saving quite a…

Contents