T-RAG: on-premise RAG with finetuned LLM and tree-based entity context for governance document QA
A large non-profit organization needed secure, on-premise question answering over its private governance documents but could not use API-based LLMs due to data leakage risks, faced limited computational resources, and required reliably correct responses to organizational queries.
T-RAG, combining RAG with a finetuned open-source LLM and a tree structure for organizational entity hierarchies, performs better than a simple RAG or finetuning implementation alone.
Frequently asked questions
What did this team achieve with this AI workflow?
T-RAG, combining RAG with a finetuned open-source LLM and a tree structure for organizational entity hierarchies, performs better than a simple RAG or finetuning implementation alone.
What tools did this team use?
LangChain, Llama-2, QLoRA, vector database.
What results were reported?
T-RAG vs RAG or finetuning-only performance: performs better than a simple RAG or finetuning implementation; Finetuning instruction dataset size: 1,614 question and answer pairs; trainable parameter reduction with QLoRA: about 200 times reduction compared to the full set of parameters in the model (source-reported, not independently verified).
How is this back office ops AI workflow structured?
PDF document ingested → Document chunked and embedded → QA dataset generated for finetuning → LLM finetuned with QLoRA → User query received → Org entity detection in query → Tree context retrieval → Augmented response generated.