Pebblo enables developers to safely load data and promote their Gen AI app to deployment without worrying about the organization’s compliance and security requirements. The project identifies semantic topics and entities found in the loaded data and summarizes them on the UI or a PDF report.
Pebblo has two components.
- Pebblo Daemon - a REST api application with topic-classifier, entity-classifier and reporting features
- Pebblo Safe DataLoader - a thin wrapper to Gen-AI framework's data loaders
This project hosts the pebblo-langchain package required for Pebblo Safe DataLoader for Langchain. See the main Pebblo project repository for more details on the Pebblo Daemon at https://github.com/daxa-ai/pebblo
Pebblo Safe DataLoader currently supports Langchain framework.
Install pebblo-langchain package in the Python environment where the RAG application is running. Add it as one of the dependencies in pyproject.toml or any other methods used for dependency management.
pip install pebblo-langchainAdd PebbloSafeLoader wrapper to the existing Langchain document loader(s) used in the RAG application. PebbloSafeLoader is interface compatible with Langchain BaseLoader. The application can continue to use load() and lazy_load() methods as it would on an Langchain document loader.
Here is the snippet of Lanchain RAG application using CSVLoader before enabling PebbloSafeLoader.
from langchain.document_loaders.csv_loader import CSVLoader
loader = CSVLoader(file_path)
documents = loader.load()
vectordb = Chroma.from_documents(documents, OpenAIEmbeddings())The Pebblo SafeLoader can be enabled with few lines of code change to the above snippet.
from langchain.document_loaders.csv_loader import CSVLoader
from pebblo_langchain.langchain_community.document_loaders.pebblo import PebbloSafeLoader
loader = PebbloSafeLoader(
CSVLoader(file_path),
name="acme-corp-rag-1", # App name (Mandatory)
owner="Joe Smith", # Owner (Optional)
description="Support productivity RAG application", # Description (Optional)
)
documents = loader.load()
vectordb = Chroma.from_documents(documents, OpenAIEmbeddings())See here for samples with Pebblo enabled RAG applications and this document for more details.
Pebblo is a open-source community project. If you want to contribute see Contributor Guidelines for more details.
Pebblo is released under the MIT License
