NOTE: This cookbook is identical to the single-turn converastion cookbook, except that the chain & configuration are changed to support multi-turn conversations.
This cookbook creates a multi-turn conversation capable RAG chain with PDF files stored in a UC Volume.
Create a UC Volume and load PDF files. You can use the PDFs from the directory sample_pdfs
to get started quickly - these PDFs are a few recent research papers from Matei's lab.
Open and follow the steps in the notebook 1_load_pdf_to_vector_index
to load PDF files from the UC Volume to a Vector Index. The sample notebook uses the BGE embedding model hosted on FMAPI.
- Open the notebook
2_rag_chain_multi_turn
and run the code locally to test the chain. This chain uses theDatabricks-DBRX-Instruct
model hosted on FMAPI.
-
Take the JSON output from the last cell in the
1_load_pdf_to_vector_index
notebook and overwrite thebaseline_config
in Cell 17 of3_multi_turn_pdf_driver_notebook.py
configuration so your chain will be logged with the configuration of the vector index you just created.- Pro tip: Modify the prompts here to try improving the quality of the RAG chain!
-
Run all cells in this notebook to log, evaluate, and deploy this chain!
-
Share the deployed Review App with your users to interact with the chain and provide feedback.