-
Book Overview & Buying
-
Table Of Contents
Unlocking Data with Generative AI and RAG - Second Edition
By :
This code can be found in the CHAPTER5-1_SECURING_YOUR_KEYS.ipynb file in the CHAPTER_05 directory of the GitHub repository.
In Chapter 2, we introduced a security-driven practice of hiding your sensitive API keys in a separate file using the python-dotenv package. While we covered the basic implementation there, this chapter provides an opportunity to explore this approach in greater depth and understand why it’s such an important security measure for RAG applications.
As your RAG application expands, you will likely accumulate multiple API keys for your LLM provider, vector database services, monitoring tools, and more. Even if you only have the OpenAI API key, instituting proper security measures is essential. This key can be used to run up expensive bills on your OpenAI account, exposing you to potential financial risk.
The most typical reason to implement this approach is when you are using a...