Activating session time
When working in real-life dynamic RAG projects, such as in this scenario, time is essential! For example, if the daily decision-making meeting is at 10 a.m., the RAG preparation team might have to start preparing for this meeting at 8 a.m. to gather the data online, in processed company data batches, or in any other way necessary for the meeting’s goal.
First, activate a GPU if one is available. On Google Colab, for example, go to Runtime | Change runtime type and select a GPU if possible and available. If not, the notebook will take a bit longer but will run on a CPU. Then, go through each section in this chapter, running the notebook cell by cell to understand the process in depth.
The following code activates a measure of the session time once the environment is installed all the way to the end of the notebook:
# Start timing before the request
session_start_time = time.time()
Finally, restart the session, go to Runtime again, and...