Your Toolhouse agents can perform Retrieval Augmented Generation (RAG) using your own data. Toolhouse includes a fully managed RAG pipeline that includes storage, upload, chunking, and retrieval. Toolhouse RAG is already integrated into your agent.
Here's how Toolhouse RAG works:
You upload files to the Toolhouse RAG.
Toolhouse triggers the RAG pipeline. Your RAG files will be analyzed to determine the chunking strategy.
You assign a RAG folder to one or more agents.
When you call the agent, it will know that it has a RAG folder available and it will be automatically prompted to use your RAG folder to complement its knowledge and better inform its context.
Basic flow
1
Create a folder
You can create RAG folders using th rag create <folder_name>. You will need to create at least one folder in order to use RAG. Subfolders are not supported.
thragcreateemployee_policy_documents
2
Upload files
Use th rag add to upload one or more files into a folder.
thragaddemployee_policy_documents*.pdf
3
Reference the folder in the agent file
You will need to update your th file with rag: <folder_name>. This will tell your agent to perform RAG on that folder.
id:69ba3e7e-xxxx-xxxx-xxxx-dc8cb0f86c7btitle:HR Employee Handbookprompt:| Look into the internal company knowledge to answer this question: {question}.public:falserag:employee_policy_documents
4
Run and deploy
Test out your agent's behavior by using th run . When you are satisfied with the results, run th deploy to enable RAG on your agent.
Every time the agent is called, the agent will decide to perform one or more RAG queries to retrieve data from your RAG folder.
Supported File Types
Toolhouse RAG supports most text-based files and PDFs. The size limit is 10 MB for each file you upload.