Corporate law RAG system with advanced retrieval and context handling
pip install corplaw-rag
from corplaw_rag import CorpLawRAG
# Initialize the RAG system
rag = CorpLawRAG(
document_path="./legal_docs",
embedding_model="text-embedding-3-small",
llm_model="gpt-4"
)
# Index documents
rag.index_documents()
# Query the system
response = rag.query(
"What are the filing requirements for a Delaware C-Corp?",
context_window=3,
include_citations=True
)
print(response.answer)
print(response.sources)MIT