🏠
Toolhouse
DiscordGithubSign upGo to App
  • 🏠Toolhouse
  • Quick start: deploy your first agent
  • Build agents with the th file
  • Test agents before deploying
  • Deploy and run your agents
  • Using RAG
  • Agent workers
    • Running Agents asynchronously
      • API Reference
    • Schedule autonomous runs
      • API Reference
  • Toolhouse SDK
    • ✨Quick start (Python)
    • ✨Quick start (TypeScript)
    • Using LlamaIndex
    • Using Vercel AI
  • Choose MCP servers for your agent
  • Customize agents for your end users
  • Execution logs
  • Go to app
  • Toolhouse Platform: walkthrough
    • Agent Studio
      • Variables
Powered by GitBook
On this page
  • Basic flow
  • Supported File Types

Using RAG

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.

th rag create employee_policy_documents
2

Upload files

Use th rag add to upload one or more files into a folder.

th rag add employee_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-dc8cb0f86c7b

title: HR Employee Handbook

prompt: |
  Look into the internal company knowledge to answer this question: 
  {question}.
  
public: false
rag: 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.

Extension
MIME Type

.pdf

application/pdf

.txt

text/plain

.text

text/plain

.log

text/plain

.ini

text/plain

.conf

text/plain

.csv

text/plain

.asc

text/plain

.lst

text/plain

.md

text/plain

.sh

text/plain

.py

text/plain

.js

text/plain

.css

text/plain

.html

text/plain

.htm

text/plain

.xml

text/plain

.json

text/plain

.yaml

text/plain

.yml

text/plain

PreviousDeploy and run your agentsNextAgent workers

Last updated 3 days ago