๐ Build the RAG application
Let's create a simple RAG workflow that takes in a user query, retrieves contextually relevant documents from MongoDB Atlas, and passes the query and retrieved context to an LLM to generate an answer to the user question.
Fill in any <CODE_BLOCK_N>
placeholders and run the cells under the Step 8: Build the RAG application section in the notebook to build the RAG "application".
The answers for code blocks in this section are as follows:
CODE_BLOCK_14
Answer
vector_search(user_query)
CODE_BLOCK_15
Answer
create_prompt(user_query)
CODE_BLOCK_16
Answer
[{"role": "user", "content": prompt}]